Skip to content

🤖 tests: slow sign-out test gives the pass a 2 s budget and awaits every pass - #7424

Merged
ThomasK33 merged 1 commit into
mainfrom
tests/slow-signout-pass-budget
Oct 24, 2026
Merged

ThomasK33 merged 1 commit into
mainfrom
tests/slow-signout-pass-budget

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

Fixes #7416. The test "a slow sign-out during section open does not latch journal health" failed in merge-group run 40094239818 (Test / Unit (2/6)): the pending sign-out record was still there after the test awaited the sign-out pass. The cause is test timing, not product behavior. This PR changes only the test file.

Background

  • The test gave every sign-out pass a 10 ms budget (reconciliationTimeoutMs: 10). The pass deadline is the lock time plus that budget (installService.ts completePendingSignOuts).
  • After release(), the fake logout runs the real oauth.logout, which writes the token store to disk. Locally that write ends 4-5 ms after the pass takes the lock. On CI it took more than 10 ms.
  • A logout that outlives the deadline counts as failed, and its URL stays in the record for a later pass. That is the documented fail-closed design (signOutFailure doc comment): the record keeps discovery closed, and the next pass retries.
  • The test then awaited pendingSignOutPass, which is one slot. It saw the timed-out pass settle, and no later pass cleared the record.

Implementation

  1. The passes get a 2 s budget instead of 10 ms. A test comment explains why (pass deadline vs. disk write under CI load).
  2. The test awaits settledSignOutPasses() before slow = true, so a fast-fail pass that is still running cannot meet the slow logout.
  3. After release(), the test awaits settledSignOutPasses() (the same access pattern as the other tests in this describe), not the single slot.

The guard stays: 2 s is below the test timeout, so if recover() awaited the pass, the section-open attempt would time out and store false.

Validation

All three proofs ran on Bun 1.4.3, 3 of 3 runs each. Proofs (a) and (b) used a scratch edit that is not in this PR.

Proof Scratch edit Result
(a) Red main's test + await new Promise((r) => setTimeout(r, 60)) before release() fails at the CI assertion: Received: [ "https://mcp.example.com/mcp" ]
(b) Green this PR's test + the same forced 60 ms wait passes
(c) Guard this PR's test + await this.settledSignOutPasses() after startPendingSignOutPass in recover() fails: expect(await internals.reconciliationState).toBe(true) gets Received: false after ~2.7 s

The whole file passes (242 of 242) on Bun 1.4.3. make static-check passes.

Risks

Test-only. Under the regression in proof (c), the test now takes about 2.7 s to fail instead of failing at once.


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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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-24T15:38:40.556081Z 87b1165 PR opened
🔒 Security Review ✅ Completed 2026-10-24T15:38:33.843689Z 87b1165 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.

@ThomasK33

Copy link
Copy Markdown
Member Author

Perf gate: CLEARED for head 87b1165 (perf owner). One test file only (src/node/services/agentPlugins/installService.test.ts, +11/-7). No product code, no renderer or startup path. The PR base is 8a723f7, a later main than the requested 417fa9b. That is fine.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

27 agent steps · 7 replayed from cache · 31 model calls · 218.7k tokens (70% cached)
Spend: $0.10 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 2 steps · 4 calls 23.9s
🟢 a chat survives a restart of the server 2 steps · 4 calls 23.9s
🟢 compaction.e2e.ts · 1 passed 3 steps · 7 calls 44.7s
🟢 /compact replaces the old chat with a summary 3 steps · 7 calls 44.7s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 9.8s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 9.8s
🟢 settingsRoundTrip.e2e.ts · 1 passed 3 steps · 5 calls 29.5s
🟢 a chat survives trips through Settings 3 steps · 5 calls 29.5s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 4.5s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 4.5s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 3.9s
🟢 the agent opens the playground workspace 2 steps · 1 call 3.9s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 7.3s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 7.3s
🟢 todoNudge.e2e.ts · 1 passed 2 steps · 4 calls 24.6s
🟢 the agent finishes open TODO items after the turn-end nudge 2 steps · 4 calls 24.6s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 26.6s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 3.5s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.0s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 7.6s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 5.0s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 2.9s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 3.7s

e2e 0.20.0 · 2m 58s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 8.0k tokens (21% 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 5.2s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 5.2s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 5.9s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 5.9s
🟢 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 · 17.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

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit b4ea1e4 Oct 24, 2026
33 of 34 checks passed
@ThomasK33
ThomasK33 deleted the tests/slow-signout-pass-budget branch October 24, 2026 15:58
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: installService slow sign-out test flakes in the merge queue

1 participant