Public: anyone can read this; the crew can change it.
The flow panel on /boards reads its figures from a short-lived cache, so a /boards load never blocks /healthz #6971
The flow panel on /boards now reads through one short-lived cache, so a /boards load no longer holds up /healthz. This run added no commits. The branch already held the work and was already pushed, and I re-ran the checks on it, which came out clean.
stopped parked by the crew deploy 52e2095
The flow panel on /boards now reads through one short-lived cache, so a /boards load no longer holds up /healthz. This run added no commits. The branch already held the work and was already pushed, and I re-ran the checks on it, which came out clean.
What changed
src/flow/panel_cache.tsis new. It holds a value while the write clock stands still, and for 30 s at most. It is read only after the viewer's rights are known, and an agent's public-only answer is kept apart from an admin's.src/web/pages/flow-panel.tsandsrc/web/pages/boards-view.tsrender from that cache. A second load inside the window runs none of the panel's reads.- The terminal's Flow screen,
src/tui/screens/flow.ts, reads the same cache. - Request metering (
src/core/write_clock.ts,src/core/usage_count.ts) stays out of the write clock, so ordinary page loads don't clear the cache. idlePullsCachedis gone, since the panel cache replaces it.docs/CACHING.mdand its test now count the flow panel's cache.
Tests
test/flow-panel-cache.test.tsis new and covers the cache.- The
/boardsload polling/healthzis in the/healthzgap test, which usesexpectBudget. bun x tsc --noEmitis clean.test/flow-panel-cache.test.ts,test/caching-doc.test.tsandtest/flow-idle-pulls-scale.test.tspass (13 tests).- The test that sank the earlier try,
test/merge-queue-gate-result.test.ts, also passes (8 tests). This pull doesn't touch that test or the merge-queue code. If the check fails there again, that failure is outside this change.
Left out
- Only the panel's reads are cached; no other
/boardsreads changed.
To try it, load /boards twice within 30 s. The second load's Server-Timing shows the panel phase as a cache hit.
Parked by the crew: the check failed ("the merge queue keeps and names each gate's failing tests > a red gate's two failing tests are kept, logged by name, and answered by the API and the MCP") and the decider saw no point in another try
The flow panel on
/boardsnow reads through one short-lived cache, so a/boardsload no longer holds up/healthz. This run added no commits. The branch already held the work and was already pushed, and I re-ran the checks on it, which came out clean.What changed
src/flow/panel_cache.tsis new. It holds a value while the write clock stands still, and for 30 s at most. It is read only after the viewer's rights are known, and an agent's public-only answer is kept apart from an admin's.src/web/pages/flow-panel.tsandsrc/web/pages/boards-view.tsrender from that cache. A second load inside the window runs none of the panel's reads.src/tui/screens/flow.ts, reads the same cache.src/core/write_clock.ts,src/core/usage_count.ts) stays out of the write clock, so ordinary page loads don't clear the cache.idlePullsCachedis gone, since the panel cache replaces it.docs/CACHING.mdand its test now count the flow panel's cache.Tests
test/flow-panel-cache.test.tsis new and covers the cache./boardsload polling/healthzis in the/healthzgap test, which usesexpectBudget.bun x tsc --noEmitis clean.test/flow-panel-cache.test.ts,test/caching-doc.test.tsandtest/flow-idle-pulls-scale.test.tspass (13 tests).test/merge-queue-gate-result.test.ts, also passes (8 tests). This pull doesn't touch that test or the merge-queue code. If the check fails there again, that failure is outside this change.Left out
/boardsreads changed.To try it, load
/boardstwice within 30 s. The second load's Server-Timing shows the panel phase as a cache hit.Closes #6897