Skip to content

aggregator(feed): deep quota validation — gate burn/choices, drop malformed pools/windows at loadFeed (#2429, slice 2a of #2578) - #3070

Merged
dezren39 merged 2 commits into
mainfrom
queue/4006-2578-phase2-slice2
Oct 31, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/4006-2578-phase2-slice2

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Slice 2(a) of #2578 (Phase 2 of #2576), quota side of the feed gate — fixes #2429.

What

  • isFleetFeed now requires the full section-level QuotaView shape the renderers dereference: burn present as an array and choices with its three string arrays. A feed missing them (old-collector shape) is rejected whole and falls back to fixtures like other invalid feeds, instead of crashing /quota on view.burn.map.
  • New exported predicates in feed.ts: isQuotaWindow, isQuotaPool (a non-array windows fails the pool — it can never be iterated as a collection of windows, which fabricated attention flags), isBurnSegment.
  • loadFeed sanitizes the gate-passed quota section via sanitizeQuotaView, built on the shared arrayOf drop-and-count primitive from aggregator: Phase 1 of #2576 — validate.ts primitives, the ingest contract in the README, and the malformed-input probe matrix #2577 (slice 1): malformed pools and burn segments drop individually, malformed windows drop out of their pool (credential-row windows too), and the counts ride out on the returned feed as quotaDropped — surfaced, never swallowed. Every loadFeed consumer (live source, server) now sees only renderer-safe pools/windows; the well-formed remainder still renders on /quota and /api/quota.json.
  • Existing feed() test fixtures in feed.test.ts/validate.test.ts updated to genuine QuotaView shape (burn + choices).

Tests (laptop, bun)

Remaining in #2578 slice 2 (not this PR)

Queue task 4006. pm-stack paths have no covering CI workflow, so verification is the laptop suite above; Codex review on this PR is the merge gate.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…drop malformed pools/windows at loadFeed (#2429, slice 2a of #2578)
@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 13:32
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

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: c2ad769c-277e-42c3-802b-60f062f92b8a
Commits

Reviewing files that changed from the base of the PR and between 5ff5d3c and 880b038.

Files selected for processing: 5
  • pm-stack/aggregator/src/feed.ts
  • pm-stack/aggregator/src/model.ts
  • pm-stack/aggregator/src/sources/live.ts
  • pm-stack/aggregator/test/feed.test.ts
  • pm-stack/aggregator/test/validate.test.ts
  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T14:02:00.141596Z 880b038 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42ce7aa49f

ℹ️ 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".

Comment thread pm-stack/aggregator/src/feed.ts Resolved
Comment thread pm-stack/aggregator/src/feed.ts Resolved
@dezren39

Copy link
Copy Markdown
Member Author

@codex review — both P2s fixed in 880b038 (see thread replies); please re-review.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 880b038803

ℹ️ 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".

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

Labels

None yet

Projects

None yet

1 participant