You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Other Console browser tests rewrite Command records in place while a page is open #1350
Console browser test files other than the Inbox tests still rewrite Command records in place with fs.writeFile while a page is open. That is the hazard behind #1223, so they can fail intermittently the same way and block a release.
Evidence
Cause, diagnosed in the pull request for Intermittent Inbox selection browser failures block releases #1223 (branch issue-1223): writeFile truncates and then writes. A push that reads the record in between gets an unparsable file. src/logs/reading/cache.rs parses it with serde_json::from_slice(...).ok(), the row is left out of that push, and the Inbox's morph() clears its selection and focus. The recorder never exposes a partial record: it replaces records with a temp file and rename (src/logs/effects.rsreplace_record; Stop requests use src/logs/stop.rspersist_noclobber).
A held-open torn write reproduced all three Inbox CI failure signatures. The Inbox tests now use replaceRecord from console/tests/records.cjs (temp file + rename).
Remaining in-place record writes while a page is open, as reported by the review of that pull request: console/tests/stop.test.cjs:56,105, notifications.test.cjs:128,194, logs.test.cjs:38-246, time.test.cjs:130-339, waterfall.test.cjs:135, themes-regressions.test.cjs:50. Example, time.test.cjs:130: await writeFile(path, JSON.stringify(fixture)); await page.getByText(fixture.issue.title, { exact: true }).waitFor();
Raised by
The Standards and Spec reviews of the pull request for #1223 (branch issue-1223).
Why this was not decided there
#1223's Agent Brief scopes the work to "The Inbox browser tests". No failure in these other files has been observed or reproduced yet, so whether to convert them, and in which pull request, is for the Day shift to decide.
Convert the remaining non-Inbox Console browser fixtures that publish or replace Command records during live observation to the existing replaceRecord helper in console/tests/records.cjs. This fits one standalone Ticket.
Confirmed diagnosis
Investigated selected Base commit 02c96545737cbd35efb69dd1ef93594f218ba9f2, matching local main. src/logs/reading/cache.rs:128 turns unparsable record JSON into None; src/logs/reading.rs:474 skips that record. An in-place writeFile can therefore temporarily remove a Command from a refreshed page. Production recording already publishes complete records through a temporary file and rename (src/logs/effects.rs:80); the browser fixtures should follow that publication behavior.
The existing test several tabs notify once per rise, including a rise after a fall; off stays off passes normally. A scratch preload intercepted only its title update at console/tests/notifications.test.cjs:130, truncated the record, and held completion until all three pages displayed Needs you falling from 2 to 1 and the shared notification snapshot recorded that fall. After restoring the complete updated JSON, the existing assertion at line 133 failed with actual notification count 2, expected 1. The same targeted update routed through replaceRecord passed, with the previous complete record still readable before rename. This confirms a failure outside the Inbox test file and supports proceeding with the conversion.
Scope
Use the shared helper for Command-record creation, updates and restores that can overlap Console observation in stop.test.cjs, notifications.test.cjs, logs.test.cjs, time.test.cjs, waterfall.test.cjs, and themes-regressions.test.cjs. Include the additional confirmed live update and restore in console/tests/spans.test.cjs:169,176, after the Waterfall page opens at line 150. Review setup writes separately: several locations cited in the original report precede browser navigation. Converting those for consistency is acceptable. Preserve intentional writes and appends to logs, Session traces, configuration and other non-record fixtures, along with existing assertions and cleanup. Keep this change within the browser-test fixtures and shared helper.
Acceptance and validation
All identified live Command-record publications and restores use temporary-file replacement through replaceRecord. Preserve the notification test's assertion that a title-only update produces no extra notification. Do not mask the race with longer timeouts or retries. Run the affected browser files during implementation, then scripts/affected-tests main, which selects the Console build and browser suite for Console changes.
Activity
JacobStephens2 commentedon Nov 10, 2026
Agent Brief
Convert the remaining non-Inbox Console browser fixtures that publish or replace Command records during live observation to the existing
replaceRecordhelper inconsole/tests/records.cjs. This fits one standalone Ticket.Confirmed diagnosis
Investigated selected Base commit
02c96545737cbd35efb69dd1ef93594f218ba9f2, matching localmain.src/logs/reading/cache.rs:128turns unparsable record JSON intoNone;src/logs/reading.rs:474skips that record. An in-placewriteFilecan therefore temporarily remove a Command from a refreshed page. Production recording already publishes complete records through a temporary file and rename (src/logs/effects.rs:80); the browser fixtures should follow that publication behavior.The existing test
several tabs notify once per rise, including a rise after a fall; off stays offpasses normally. A scratch preload intercepted only its title update atconsole/tests/notifications.test.cjs:130, truncated the record, and held completion until all three pages displayed Needs you falling from 2 to 1 and the shared notification snapshot recorded that fall. After restoring the complete updated JSON, the existing assertion at line 133 failed with actual notification count 2, expected 1. The same targeted update routed throughreplaceRecordpassed, with the previous complete record still readable before rename. This confirms a failure outside the Inbox test file and supports proceeding with the conversion.Scope
Use the shared helper for Command-record creation, updates and restores that can overlap Console observation in
stop.test.cjs,notifications.test.cjs,logs.test.cjs,time.test.cjs,waterfall.test.cjs, andthemes-regressions.test.cjs. Include the additional confirmed live update and restore inconsole/tests/spans.test.cjs:169,176, after the Waterfall page opens at line 150. Review setup writes separately: several locations cited in the original report precede browser navigation. Converting those for consistency is acceptable. Preserve intentional writes and appends to logs, Session traces, configuration and other non-record fixtures, along with existing assertions and cleanup. Keep this change within the browser-test fixtures and shared helper.Acceptance and validation
All identified live Command-record publications and restores use temporary-file replacement through
replaceRecord. Preserve the notification test's assertion that a title-only update produces no extra notification. Do not mask the race with longer timeouts or retries. Run the affected browser files during implementation, thenscripts/affected-tests main, which selects the Console build and browser suite for Console changes.