Repository navigation
fix(aggregator): bound /quota and /api/quota.json with the assembly deadline (#5082) - #16838
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Contributor
Author
|
Verification recorded on #5082: pm-aggregator-tests run 46279874269 — "Run aggregator tests" step success (incl. the new /quota + /api/quota.json deadline coverage); the run's only failure is the Typecheck step TS5102, the pre-existing #16835 breakage on an untouched file (fix held by lane 0640-AG). Ready for merge. |
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.
Refs #5082.
Slice
Bound the quota pair —
/quotaand/api/quota.json— with the dashboard assembly deadline (BOUNDED_DASHBOARD_PATHSinpm-stack/aggregator/src/assembly-deadline.ts), the same treatment the board/overview/program routes already have.Why: at #5082's filing the quota path answered in ~0.03 s and was deliberately left unbounded, but steward runs 444/449/450/453 (2026-11-17) measured the quota assembly itself stalling past a 25 s client cap with zero bytes — the issue was reopened on that evidence. The handlers fail soft per facet (
.catchto an empty view), but nothing bounds a facet read that never settles, and/api/quota.jsonawaitssource.quota()/source.usage()with no catch at all. Bounded, a stalled quota assembly degrades to the marked-stale last good (or the disk copy after a restart), or a 503 with a real body — never an empty reply. That is the #5082 acceptance item "a slow assembly degrades to a visible stale/error state instead of an empty reply", extended to the routes where the failure family most recently reproduced.Tests (oracle: the #5082 acceptance above)
test/assembly-deadline.test.ts: the routes table grows to eight; the per-route stall tests (visible non-empty bounded response), late-success stale-seeding tests, and the stale-marker cases now cover/quota(HTML banner) and/api/quota.json(JSONstale: true) alongside the existing six.Verification: fleet-command run 46279018709 on this branch (
bun test test/assembly-deadline.test.tsin pm-stack/aggregator) — verdict to be read from the job log and recorded on #5082.Live probe evidence (2026-11-29, laptop aggregator, before this change)
Repeated probes of the four routes named in the issue all answered 200 fast (warm): /board 0.06–0.12 s, /api/board.json 0.009 s, /api/overview.json 0.025 s, /frag/overview 0.013 s; /program 169,755 B across five hits (one earlier 1,367,153 B hit observed once, not reproduced — noted on the issue). The empty-reply deaths do not reproduce warm today; the remaining unbounded surface was the quota pair.
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-29T15:33:44Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "ac3f377b7f752f50918f491d7443b79e95b5dc34" }, "auth_subject": "felix", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.