Skip to content

🤖 tests: settle the sign-out pass before the component-review test swaps the record - #8106

Open
ThomasK33 wants to merge 5 commits into
mainfrom
plugin-review-signout-flake
Open

ThomasK33 wants to merge 5 commits into
mainfrom
plugin-review-signout-flake

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Why

Four timing defects in the post-update sign-outs tests of installService.test.ts. All four are in the tests. The product is unchanged.

  • component review names an unreadable sign-out record (#6627) sometimes got Installed plugin files changed during component review. Refresh the component inventory. instead of (not a regular file). The test's own discovered() call starts a sign-out pass in the background, and the test never waits for it. The pass can read the record while a swap leaves it absent, then call rm on that path. rm deletes a FIFO that replaced the record.
  • a pass starts no logout after its deadline (#6627) failed in 2 of 48 runs in a verifier at host load about 118 (expect(calls).toBe(1) received 0). The 20 ms pass budget starts when the pass takes the lock, and the record read counts against it. A pass with no time left starts no logout and keeps the record. That is correct, but a test cannot leave a 20 ms budget to the wall clock. Three more tests with the same budget fail the same way when the record read is slow.
  • Settings reads the pending, the failed and the corrupt record (#6627) assumes the 30 s retry wait after a failed pass is still running. On a slow run it ends, and a scan or a status read starts a pass that clears the fixture record.
  • The 5 s default timeout is shorter than the setup of these tests on a loaded host (1.9 to 7.9 s per run in a verifier, 4.2 to 7.2 s in my runs).

What changed

  • The component review test waits for the pass that its discovered() call started (settledSignOutPasses) before it replaces the record.
  • freezeMonotonicClock freezes the monotonic clock for the rest of a test, so a pass budget or the retry wait ends only when the test advances the clock. Five tests use it: the four tests with a 20 ms budget, and the Settings status test (it advances the clock by 31 s instead of mocking performance.now).
  • The file sets setDefaultTimeout(20_000).

Scope

Test only. No product change, no retry, no sleep. The timeout is file-wide because Bun's describe takes no timeout, and setDefaultTimeout inside a describe leaks into later describes. signOutFailure stays as it is: a pass past its deadline starts nothing and keeps the URL for the next pass. The production budget is 30 s.

Blast Radius

None for users. Every writer of the pending sign-out record (update, uninstall, the sign-out pass, signOutPluginServers) holds the cross-process plugin mutation lock. Install does not write the record. Only the component review test swapped the record outside that lock while a pass could still run. The longer default timeout changes only when a hung test fails (20 s, not 5 s).

Verification

  • Component review test, old body with the pass held at the narrow point (scratch probe): fails at the same assertion with the text above. In 3 of 24 natural runs under load, the pass read the absent record and called rm in the swap window. The rm failed on the new directory each time (EFAULT in these traces, ERR_FS_EISDIR when called on a directory alone). It deletes a FIFO.
  • Deadline tests, with a 40 ms record read added to every test of the describe (scratch): 4 tests failed before the change and 26 of 26 pass after it. Removing the deadline check from the product turns the deadline test red (3 logouts, expected 1). Removing the credential-key dedup turns the equivalent-spelling test red (2 logouts). 72 natural runs at up to 56 busy loops did not fail (smallest remaining budget at the first logout: 15.7 of 20 ms).
  • Settings status test, with a real 31 s pause before its scan (scratch): the old test failed 2 of 3 runs with Received value must be a string: false, the new one passed 3 of 3.
  • typecheck, static-check, lint-eslint, crap-check, dry-check and mutate-check exit 0. installService.test.ts at default flags: 304 pass, 0 fail.

Downgrade: not applicable, test-only change.


Generated with xum • Model: anthropic:claude-sonnet-5-5 • Thinking: xhigh • Cost: $7.71

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T17:41:51.541570Z 0da15f9 Manual request
🔒 Security Review ✅ Completed 2026-11-10T17:42:59.598520Z 0da15f9 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.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 47.1k tokens (27% 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.7s
🟢 a chat survives a restart of the server 1 step · 1 call 5.7s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 4.7s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 4.7s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 10.1s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 10.1s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 9.6s
🟢 a chat survives trips through Settings 2 steps · 1 call 9.6s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 4.7s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 4.7s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 2.9s
🟢 the agent opens the playground workspace 2 steps · 1 call 2.9s
🟢 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.4s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 3.4s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 21.2s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 3.2s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.4s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 4.5s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.0s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 2.7s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 3.3s

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

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 7.9k tokens (33% cached)
Spend: $0.01 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 6.4s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 6.4s
🟢 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 5.4s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 5.4s

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.8s · 2 targets (web, phone) · run artifacts

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Head: 0da15f9

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 0da15f951a

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

@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: 0da15f951a

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.

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