Repository navigation
fix(pm-stack): health snapshot, incremental reconcile streams, single-flight, cached attention (#9850) - #10466
Conversation
…-flight, cached attention (#9850)
Codex Review Summary: ❌ FailedThis 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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Refs #9850 — round 2. The round-1 fix (PR #10084) isolated the /health client and batched the writes, but the stalls came back: the projector was marked down twice more on the new build (2026-11-15 01:49Z and 02:55Z, ~3 min each), and /api/attention.json timed out four times in a row at the 03:00 CT reconcile fire on 2026-11-15 (35 s client timeouts, load 14→26) after flapping three times on 2026-11-14. This PR removes the mechanisms instead of widening the margins. The sentinel is unchanged — it was correctly reporting real stalls.
Root cause
reviewsstream ignored its cursor. Every pass re-read the full PR list and made one GitHub call per PR — for developing-today/code that is 4,758 PRs — then upserted every review found: the journal showsreviews: written=5433 ms=1692265(28 minutes of sustained writes) and whole passes of ~11.5k rows taking 22–35 minutes, recurring roughly hourly. Theprsstream likewise re-upserted all ~4,757 PRs every pass.Fix
health_snapshot_stale— a genuinely wedged event loop cannot refresh, so real death still reads as down; a dead process cannot answer at all. Without a snapshot provider (tests, embedders) the previous bounded live probe runs unchanged.{ok: true, skipped: "reconcile_in_progress"}.Evidence
test/today-cache-1179.test.tscurrently fails its 5 s hook timeout on pristine main as well under this box's load (verified both trees back to back) — pre-existing, unrelated to this change; the cache primitive itself is untouched.snapshotAgeMspresent). A local write flood does not reproduce the production stall physics (production writes queue on a remote libSQL service; a local WAL file answers readers instantly), so the request-path invariant is proven by the wedged-DB test instead: /health answers 200 from the snapshot while its DB client throws on every call.Deploy note: takes effect at the next switch after merge (server code is read at start). The soak gate on #9850 (gate-code-9850-soak) should restart from this deploy.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.