Repository navigation
🤖 tests: editAfterEmptyFailedReply resends after a stop-in-progress refusal - #7659
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a0939fa4a
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🟢 e2e stories (Haiku): 14 passed22 agent steps · 7 replayed from cache · 15 model calls · 46.2k tokens (24% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 16s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 7.9k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 19.9s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 5.3s · 2 targets (web, phone) · run artifacts |
…eply's stream end - Fail once the 20 s deadline passes instead of resending until the global timeout. - Match an error toast by its Dismiss button: an alert has no accessible name. - Wait for the follow-up reply's stream to end before the edit (a mid-stream edit was refused as History changed in 1 of 6 local phone runs).
|
@codex review |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Fixes #7655. The bug-bash repro
editAfterEmptyFailedReply(#6116) flaked onphonein the merge queue because its follow-up send landed inside the Stop window and was refused as retryable ("A stop is in progress for this workspace; retry once it has settled."). The repro now sends again after each such refusal, and only that refusal. The #6116 edit check is unchanged. Test-only change.Background
The failing run (40421808497, job 121917891361) failed at the follow-up reply, before any edit, so the #6170 edit path was not involved. Its trace logs the refusal, and the screen at failure shows the "Message Send Failed" alert with the text back in the composer.
AgentSession.interruptStreamemits early (retryManager.abandon("user_interrupt")).WorkspaceService.interruptStreamtakes the stop latch at the request boundary (latchHardInterruptCascade) and, for this Stop, releases it just before queued dispatch, after the cascade settles.sendMessagerefuses while the latch is held (WORKSPACE_STOP_IN_PROGRESS_SEND_BLOCKED_MESSAGE, whose contract is "callers may simply retry afterwards").The UI has no signal for the latch release, so the test cannot wait for it. It retries per the product contract instead. #7658 tracks the UX papercut (a send during the Stop window should wait instead of failing).
Implementation
After the follow-up Send, the test waits (within the existing 20 s) for the reply, the stop-in-progress refusal (matched with the constant) or any other error toast (an alert with a Dismiss button, whatever its title). Any other toast fails at once. On the stop-in-progress refusal it dismisses the toast, waits for the toast to be gone and the text to be back in the composer, and taps Send again. Once the 20 s deadline passes, the loop fails instead of resending.
Before the edit, the test now also waits for the follow-up reply's stream to end ("Stop streaming" hidden). An edit tapped while the reply still streamed was refused as "History changed" in 1 of 6 local phone runs. The main-branch test has the same gap.
Waiting for the alert to be gone matters: Dismiss clears the toast after a 200 ms fade timer, and that timer also wipes a newer toast shown within the fade (noted in #7658).
Validation
interruptStream(never committed):--repeat-each 10passed 20 of 20 runs (web 10, phone 10).make static-checkandtests/bugbash/reproRules.test.tspass. Exact steps only, and the tags are unchanged.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$234.26