[codex] Add durable daemon restart and session browsing#69
Merged
Conversation
Daemon restarts stopped registered scanners, while Observe users could not page or filter session history. CLI capture became stale and large histories were hard to inspect. Restore registered capture before readiness, add bounded restart handling, prompt-first Unicode search, server-side pagination, navbar project controls, and refreshed brand assets. AI-assisted implementation and test scaffolding; independently reviewed. Tests: cargo test, strict Clippy, rustfmt, JavaScript syntax, isolated daemon and browser smoke.
CI blocked on RUSTSEC-2026-0185, and the lockfile retained quinn-proto 0.11.14 with a high-severity remote memory exhaustion flaw. Upgrade the transitive lock entry to patched 0.11.15. No source or public API changes.
macOS nextest could read the daemon log before redirected stderr became visible even though capture status already reported the scanner failure, making CI flaky. Poll the log for at most two seconds while preserving immediate capture-health assertions and a hard failure when the event never appears.
CI runs without a RUST_LOG filter, so the lifecycle test could not observe the scanner warning it asserts. Set the warning filter on the restart process to make the test environment deterministic.
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.
Why
Restarting the Kaizen daemon preserved SQLite history for the Web app but silently stopped registered workspace scanners, so CLI capture became stale. The Observe page also made large histories difficult to inspect because it had no pagination or unified filtering.
What
kaizen daemon restartwith bounded lifecycle IPC and startup readiness.How
Daemon startup now rebuilds its supervisor from the machine registry, runs initial scans before binding the socket and Web server, and reports scanner failures through structured warnings and capture health. Lifecycle requests use a 500 ms IPC timeout, while legitimate migration and scan startup remains bounded at 30 seconds.
Session search uses an additive SQLite prompt projection, Unicode default case folding, parameterized queries, visible derived statuses, and separate SQL paths so empty and ordinary searches avoid the status event rollup. Snapshot responses expose additive page metadata consumed by small focused Web modules.
Test plan
cargo test --quiet— 575 passed, 4 intentionally ignored performance harnessescargo clippy --all-targets -- -D warningscargo fmt --all -- --checknode --checkfor all changed JavaScript modulesRisk + rollback
Schema change is additive; rollback can revert commit without deleting session data. Older binaries ignore the new projection table. Visible-status searches still aggregate workspace event history, while empty and ordinary searches use the cheaper path.
VisualizationQuerygains a pre-1.0 Rust field; JSON remains backward-compatible through serde defaults.No feature flag: change is local-only, additive, and covered by daemon, SQLite, Web, and browser regression tests.
AI Assistance