Skip to content

fix(e2e): avoid SIGPIPE in mock prompt matching - #356

Open
zpzjzj wants to merge 1 commit into
mainfrom
fix/mock-engine-prompt-matching
Open

zpzjzj wants to merge 1 commit into
mainfrom
fix/mock-engine-prompt-matching

Conversation

@zpzjzj

@zpzjzj zpzjzj commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Long prompts can make the mock engine skip a matching judge or keyword branch: with pipefail, grep -q exits early and the upstream echo can receive SIGPIPE. This can leave the correction-retry test recording only correction instead of initial\ncorrection\n, as observed in main CI run 40647801009. Retrying that run passed and restored the README CI badge.

Replace the mock's detection pipelines with Bash string matching, preserving case-sensitive judge detection and case-insensitive keyword responses. Add eight 1 MiB prompt regression cases covering initial/correction judge responses and every keyword branch; the old script was reproduced skipping the initial judge branch.

Validation:

  • make fmt and make verify (zero issues; pinned tools rebuilt with Go 1.26.0).
  • make test through the environment's existing child-reaping wrapper, required because this container's PID 1 does not reap orphan processes; all tests pass.
  • make e2e and the focused correction-retry/long-prompt tests pass.
  • bash -n and git diff --check pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T09:58:23.629063Z 7de3412 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant