Skip to content

fix(aggregator): bound /quota and /api/quota.json with the assembly deadline (#5082) - #16838

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/5082-bound-quota-routes
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/5082-bound-quota-routes

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Refs #5082.

Slice

Bound the quota pair — /quota and /api/quota.json — with the dashboard assembly deadline (BOUNDED_DASHBOARD_PATHS in pm-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 (.catch to an empty view), but nothing bounds a facet read that never settles, and /api/quota.json awaits source.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 (JSON stale: true) alongside the existing six.

Verification: fleet-command run 46279018709 on this branch (bun test test/assembly-deadline.test.ts in 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-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ff8e27ff-02e0-4151-b702-316f122b3b8a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@developing-today-fleet
developing-today-fleet Bot merged commit 7610cff into main Nov 29, 2026
6 of 7 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/5082-bound-quota-routes branch November 29, 2026 15:48
@developing-today-fleet

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants