Repository navigation
Fix Fleet Inbox notification and Undo races - #2310
Conversation
|
Review run. The branch moved; no fixes were pushed. Proposed fixes remain in the local worktree. Spec axis used the linked closing issues. Standards0 actionable findings. The change reuses the existing atomic publication helper and follows repository standards. Spec0 actionable findings. Linked closing issue #2307 is the Spec. Existing assertions remain intact, and the added assertion checks that metadata updates produce no notification. No fixes were needed. No tracked files changed; no commit was made. Unaddressed findings
Review coverageBoth reviewers read the complete changed file, Final files-read listsStandards
Spec
ValidationPR #2310 was checked once immediately before validation and was open. All commands ran in this worktree.
No required command failed or could not run. Logs are under Saved: Standards report, Spec report, summary.json. Standards: 0 findings, worst issue: none. Spec: 0 findings, worst issue: none. SecurityNo unaddressed introduced findings. Delivery failedpull request changed during Review run: head moved; expected 440935d, actual 4f0c0b7 |
Keep the held-refresh Undo regression and reload check, plus main's owning-machine synchronization and no-notification baseline assertion.
Summary
Fix two races in the Fleet Inbox check: in-place fixture writes can produce a false notification, and an Undo notice accepts a click while Dismiss is still refreshing, then drops it.
Keep all existing assertions. Add a deterministic pending-Undo check, verify Undo after reload, and establish the two-row notification baseline before changing fixtures.
Closes #2307.
Evidence
Execution evidence
npm testfromconsole/at3c6e094failed withexpected /^3 need you/; actual '2 need you · …'. Original CI failure. A local reproduction that widens the live fixture's truncate/write window by 700 ms produced the same failure; atomic replacement passed that reproduction.node --test --test-name-pattern='Fleet Inbox polls' console/tests/fleet.test.cjs, with the held-refresh regression added before the UI fix, failed:Undo waits for the Dismiss refresh before accepting another action; false !== true. CI also reproduced the resulting Undo timeout.node --test --test-name-pattern='Fleet Inbox polls' console/tests/fleet.test.cjs: 1 passed against the rebuilt binary.THIRDSHIFT_CONSOLE_ASSETS="$PWD/src/console/assets" node --test console/tests/fleet.test.cjs: 2 passed.CARGO_BUILD_JOBS=3 RUST_TEST_THREADS=3 scripts/affected-tests refs/remotes/origin/main: build passed (35.00 s); all 268 Console browser tests passed (322.81 s), zero skipped. The remote ref is the supplied fixed point; localmainpredates this worktree’s base.4f0c0b7ee9d0d6c26135cfb02fddc08b0391f32c. Once those Rust checks passed, the duplicate localcargo testrun was interrupted, followingdocs/testing.md’s CI reuse rule.Seams under test: real caller/remote Consoles, Fleet polling, persisted Dismiss/Undo, live Inbox rows and browser notifications. The Notification API substitutes for OS delivery; the delayed Inbox response makes the pending-action race deterministic.
Visual evidence
Faux Command records at desktop 1440×900. Screenshots show the pending Dismiss; recordings show the Undo attempt and outcome. The existing Fleet browser test also exercises the phone viewport.
Before — Dismiss pending, desktop 1440×900
After — Dismiss pending, desktop 1440×900
Before — Dismiss/Undo walkthrough, desktop 1440×900
before-desktop.DsHBD7.mp4
After — Dismiss/Undo walkthrough, desktop 1440×900
after-desktop.exe2HQ.mp4
Review coverage
Standards: 0 actionable findings. Spec: 0 actionable findings. Both final reviewers read both changed files:
console/tests/fleet.test.cjsandsrc/console/assets/console.js. Unread changed files: none. Generated-output exclusions: none.Security: 0 introduced findings. Guidance-mode source review of
3c6e094fd0c676b2ca65dd41dc9d0a156c2b5f00...4f0c0b7ee9d0d6c26135cfb02fddc08b0391f32ccovered both changed files and supporting Dismiss/Undo state, row rendering, CSRF and scope middleware, Fleet action forwarding, and the atomic fixture helper. The addedshowDismissal()call updates button state and status text; the server still enforcesact, CSRF, owning-account checks, and configured Fleet destinations. No proof-of-concept candidate or source fix was needed. This was a source review; the existing runtime evidence above was not rerun.Unaddressed findings
Standards
None.
Spec
None.
Security
None.
Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
Blast Radius: Console
Undo now waits until the current Dismiss refresh completes. Fixture publication changes are confined to the Fleet browser test.
Built with codex codex-cli 0.169.0 · gpt-6.1-sol · xhigh