Repository navigation
🤖 tests: slow sign-out test gives the pass a 2 s budget and awaits every pass - #7424
Merged
Merged
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. |
Member
Author
Contributor
🟢 e2e stories (Haiku): 14 passed27 agent steps · 7 replayed from cache · 31 model calls · 218.7k tokens (70% cached) All 14 tests in 9 files
e2e 0.20.0 · 2m 58s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.0k tokens (21% cached) All 3 tests in 3 files
e2e 0.20.0 · 17.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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
reconciliationTimeoutMs: 10). The pass deadline is the lock time plus that budget (installService.tscompletePendingSignOuts).release(), the fake logout runs the realoauth.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.signOutFailuredoc comment): the record keeps discovery closed, and the next pass retries.pendingSignOutPass, which is one slot. It saw the timed-out pass settle, and no later pass cleared the record.Implementation
settledSignOutPasses()beforeslow = true, so a fast-fail pass that is still running cannot meet the slow logout.release(), the test awaitssettledSignOutPasses()(the same access pattern as the other tests in thisdescribe), 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 storefalse.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.
await new Promise((r) => setTimeout(r, 60))beforerelease()Received: [ "https://mcp.example.com/mcp" ]await this.settledSignOutPasses()afterstartPendingSignOutPassinrecover()expect(await internals.reconciliationState).toBe(true)getsReceived: falseafter ~2.7 sThe whole file passes (242 of 242) on Bun 1.4.3.
make static-checkpasses.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