Repository navigation
perf(daemon): drain the session derivation audit by work, not by tick - #5697
Conversation
After a cold build promotes, the session summary, usage-rollup and profile domains are swept by bounded audit passes (128 discovered, 64 published). The periodic convergence tick ran one pass per 60 s, so the derived phase advanced 64 sessions per domain per minute regardless of free writer or compute time. Run passes back to back within a 45 s budget while the audit has domains left; every pass keeps its bounds. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fcaf55b9f1
ℹ️ 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".
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14825db7d0
ℹ️ 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".
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f50d71348
ℹ️ 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".
Budget gains deadline_at, a monotonic instant the kernel checks beside the relative deadline, so time a pass spends waiting for the owner lock or a compute worker is spent from the tick's budget. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Summary
After a cold build promotes, the session derivation audit (summary, usage rollup, profile) now runs bounded passes back to back within a 45 s budget per periodic tick. Before, it ran one pass per tick.
Problem (evidence)
I ran a fresh-build benchmark: a 144-file private sample, cold-built through
polylogued run --cold-build-index, measured withdevtools bench fresh-build(#5678). The session derivations published in bursts of at most 64 keys a minute. Each audit pass is bounded at 128 discovered and 64 published keys per domain, and_periodic_convergence_checkran one pass per 60 s tick. Profiles for 148 sessions finished 312 s after promotion, while the writer sat idle between bursts. At full-archive scale that is one minute per 64 sessions per domain.Solution
ComposedSessionProfiles.converge_backlog(budget_s)repeats the bounded pass while the audit still has domains to sweep, within the budget. The periodic convergence check calls it with 45 s. Every pass keeps its page and publication bounds, so no writer hold grows. The ordinarycallback(None)is still one bounded pass.Verification
devtools test tests/unit/daemon/test_session_profile_composition.py "tests/unit/daemon/test_daemon_cli.py::test_daemon_startup_catch_up_and_restart_repair_session_profiles": PASSED.test_backlog_call_sweeps_every_domain_in_bounded_passes: one backlog call publishes a profile for every session (more than 129) over several passes of at most 64 each. Anti-vacuity: a single pass leaves the audit pending with fewer profiles than sessions.Residuals
cli.pyandsession_profile_composition.pyare outside the derived schema-identity closure.🤖 Generated with Claude Code
https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4