Skip to content

🤖 tests: editAfterEmptyFailedReply resends after a stop-in-progress refusal - #7659

Merged
ThomasK33 merged 2 commits into
mainfrom
fix/bugbash-edit-after-empty-phone
Oct 27, 2026
Merged

ThomasK33 merged 2 commits into
mainfrom
fix/bugbash-edit-after-empty-phone

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #7655. The bug-bash repro editAfterEmptyFailedReply (#6116) flaked on phone in 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.

  • The test treated "Auto-retry stopped:" as "the Stop has settled". That text renders from the auto-retry-abandoned event, which AgentSession.interruptStream emits early (retryManager.abandon("user_interrupt")).
  • WorkspaceService.interruptStream takes the stop latch at the request boundary (latchHardInterruptCascade) and, for this Stop, releases it just before queued dispatch, after the cascade settles.
  • sendMessage refuses 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

  • Proof on c56431e with a scratch 3 s delay before the latch's early release in interruptStream (never committed):
    • The main-branch repro failed 4 of 4 runs (web and phone, 2 each).
    • The fixed repro passed 6 of 6 (web and phone, 3 each).
  • With the delay removed: --repeat-each 10 passed 20 of 20 runs (web 10, phone 10).
  • make static-check and tests/bugbash/reproRules.test.ts pass. Exact steps only, and the tags are unchanged.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $234.26

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T01:37:26.423645Z — Manual request
🔒 Security Review ✅ Completed 2026-10-27T01:36:23.364236Z c56431e Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 46.2k tokens (24% cached)
Spend: $0.09 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 1 step · 1 call 5.4s
🟢 a chat survives a restart of the server 1 step · 1 call 5.4s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 5.4s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 5.4s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 9.4s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 9.4s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 8.7s
🟢 a chat survives trips through Settings 2 steps · 1 call 8.7s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 4.4s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 4.4s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 2.3s
🟢 the agent opens the playground workspace 2 steps · 1 call 2.3s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 7.2s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 7.2s
🟢 todoNudge.e2e.ts · 1 passed 1 step · 1 call 3.0s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 3.0s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 26.9s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 4.2s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.1s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 4.9s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.5s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 6.9s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 3.2s

e2e 0.20.0 · 1m 16s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 7.9k tokens (22% cached)
Spend: $0.02 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 7.4s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 7.4s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 5.6s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 5.6s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 4.8s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 4.8s

e2e 0.20.0 · 19.9s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $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).
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: c56431e3cb

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ 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".

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit aae0fb4 Oct 27, 2026
37 of 38 checks passed
@ThomasK33
ThomasK33 deleted the fix/bugbash-edit-after-empty-phone branch October 27, 2026 02:04
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.

🤖 tests: editAfterEmptyFailedReply repro flaked on phone in the merge queue

1 participant