Repository navigation
Fix idle Console CPU and IO with change-driven updates - #1160
Merged
Merged
Conversation
# Conflicts: # site/architecture/index.html
Merged
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
Replace all four fast polling loops. Preserve updates across atomic saves, replaced log roots, macOS canonical paths and external Session traces. Share process waits and elapsed-time deadlines while viewers are connected. Preserve loaded Theme fonts and unsubmitted Lanes filters during live updates.
Closes #1153
Evidence
60s measurements on stephens.page, using stable snapshots of its existing 6.4 GB store and isolated signed-in Consoles. Three Inbox clients consume SSE and refetch HTML on each Command notice, alongside one live log reader. The fixed binary is an unoptimized build. The service was untouched; scratch artifacts were removed.
rcharrcharAll three acceptance limits pass. Both fixed samples had zero
write_bytes; the viewer sample made zero idle refetches. Earlier socket-only viewer numbers are superseded by this stronger measurement. It exposed unnecessary recovery broadcasts, then parent-directory metadata notices; both were fixed before this final run.The extra IO came from each log reader's 250ms
appended → catalog::find → load → Snapshot::loadinventory scan, plus the unconditionalrender_page → status::inboxloop without viewers. Parsing caches alone did not remove that polling work.428a5b6. After: both exact commands pass. Retained tests cover Done → Resolved, retention expiry and an open session expiring after a child-only clock shift.cargo testtook 571s including 28.17s compilation. A separate full cross-platform CI run also passes, including all four macOS shards./usr/bin/time -p scripts/affected-tests mainpassed the site selection. Its redundant local Rust run was interrupted after 708.91s (including the site run and 0.55s Rust compilation) once exact-head Linux CI passed, asdocs/testing.mddirects. This is recorded as an interrupted local run, not a local full-suite pass.Test seams: Console binary/HTTP/SSE, fixture files, native process lifetime and Linux process IO; durable accounts with a supplied clock; child-only wall-clock injection; browser Theme editing and Lanes filter state.
Unaddressed findings
Standards
The other five advisory findings and the reproduced P2 session-expiry finding are fixed.
Spec
None. Both P2 findings are fixed and their regressions are retained.
Security
None. Guidance-mode review of the
3c53d52...HEADdiff (attack classes: auth/session, resource/file handling, availability, data isolation; no SECURITY.md or threat model in repo) found no introduced Security findings and fixed none. The one candidate considered — SSE/log streams recheckingstill_allowedon account notices plus a 60s fallback instead of every 250ms — is not a finding: notices carry no data, every new request still re-authenticates inauth::guard, allowlist/config edits raise an account notice immediately, and the revocation and expiry tests pass (console::accounts::tests,console::changes::tests, watching HTTP tests).Security review outcome
No unaddressed introduced findings.
Review coverage
Independent Standards and Spec reviews compared the branch with main, pinned to
3c53d52after merging updated main. Both axes inspected all 31 changed files, including all final fixes. Unread changed files: none. Generated-output exclusions: none. Their complete reports, earlier findings, dispositions, exact reproductions and each axis's combined files-read list are saved to.thirdshift-review-ECulfg/standards.mdandspec.mdin this worktree.Merge Danger
Door: two-way
No persisted format or log-store migration. Reverting restores the previous reader behavior.
Blast Radius: Console
Linux uses pidfds and macOS uses kqueue, with identity-only fallback when native process waits are unavailable. The macOS gate now includes filesystem notifications, account revocation, binary replacement and elapsed-time HTTP regressions.
Built with codex · gpt-6.1-sol · xhigh