GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool · Issue #3427 · developing-today/code

aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool #3427

New issue
Copy link
New issue
Copy link
Closed
#4423
Closed
aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool#3427
#4423
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 1, 2026
Issue body actions

Problem

isQuotaWindow — the feed boundary guard behind sanitizeQuotaView / loadFeed (#2429) in pm-stack/aggregator/src/feed.ts:286-296 — checks only types, never values:

  • resetsAt passes as any string (feed.ts:293: v.resetsAt === null || typeof v.resetsAt === "string")
  • limit passes as any finite number, including negative (feed.ts:291)
  • used passes as any finite number, including negative (feed.ts:292)
  • percent passes as any finite number, including negative or ≫100 (feed.ts:294)

The sister boundary for the same fields already refuses exactly these shapes: isSnapshotRecord (src/snapshots.ts:313-316) requires isNonNegative(limit) and isIsoDate(resetsAt), with the comment that downstream code dereferences them (pct-of-limit, reset comparisons). The feed gate does not, and the shared strict primitive (isIsoDate / parseIsoDate, src/validate.ts) is already imported by feed.ts for other sections.

Evidence (verified this run, main 574c04a)

Laptop probe ~/git/fleet/probe-2026-11-01-laneA-feedquota/ (copies of the real src/ tree, feed.ts md5 e564f17aea918d5281fd37d433a01017, identical to main; run with bun 1.4.2 against the real isQuotaWindow, windowPercent, poolState, computeChoices, sanitizeQuotaView). Control: a well-formed window passes. Every malformed case below also passes (isQuotaWindow=true) and survives sanitizeQuotaView with droppedWindows=0:

case result
resetsAt: "2026-02-30T05:00:00Z" kept; Date.parse rolls it to 2026-03-02T05:00:00Z
resetsAt: "banana" / resetsAt: "" kept verbatim
percent: -50, limit: null windowPercent = -50, pool reads healthy
percent: 15000, limit: null windowPercent = 15000, pool reads walled
used: -500, limit: 1000 windowPercent = -50, pool reads healthy
limit: -5, no percent windowPercent = 100 (the limit <= 0 fallback in derive.ts:156), pool reads walled with zero usage

Guidance effect, same probe: a healthy pool whose only window carries resetsAt: "2026-02-30T05:00:00Z" is returned in computeChoices(...)'s burnBeforeReset list at 2026-03-01T12:00Z — a burn-it-before-reset recommendation clocked from a day that never existed (the Mar 2 rollover is 17h out, inside RESET_SOON_MS). quota-guidance.ts:18 (soonestReset) filters only non-finite Date.parse results, so impossible-but-parseable dates sail through, while derive.ts:839 prints resetsAt.slice(0, 10) verbatim in attention flags and render.ts fmtDate renders the rolled-over March date as the reset date.

Why it matters

The ingest contract (src/validate.ts header) is that every ingested document is validated once at its boundary — shape, element types, value ranges, and real calendar dates — before any consumer sees it. The quota section is the one section whose gate stops at types: a corrupt or buggy collector write (or a hand-edited feed) injects windows that flip pools between healthy and walled and fabricate reset timing in the guidance every session-placement decision reads, instead of being dropped-and-counted by the sanitizer like every other malformed element in the same view.

Acceptance criteria

  • isQuotaWindow refuses: a resetsAt that is not null and not a real ISO calendar date (isIsoDate); a negative limit; a negative used; a percent outside [0, 100] — or, if a percent above 100 is considered legitimate for over-limit windows, the bound is stated in a comment and pinned by a test (the snapshot boundary's isPercentOf(limit) vocabulary is the precedent).
  • Malformed windows drop individually in sanitizeQuotaView with droppedWindows counting them (existing aggregator(feed): isFleetFeed checks only that quota.pools is an array — burn/choices, pool entries and windows unvalidated, one malformed pool crashes /quota #2429 behaviour for shape failures) — the pool and feed survive.
  • Regression tests in test/feed.test.ts next to the existing aggregator(feed): isFleetFeed checks only that quota.pools is an array — burn/choices, pool entries and windows unvalidated, one malformed pool crashes /quota #2429 gate tests: impossible/garbage/empty resetsAt, negative used/limit, out-of-range percent all drop; the well-formed window fixture is unchanged.
  • No change to windowPercent/poolState semantics for windows that pass the gate.

Dedup

Distinct from #2470 (quota-extract emitting unvalidated resetsAt upstream — this is the feed-ingest gate that must refuse them regardless of source), #3365 (snapshot rollup guard re-admitting shapes), #2416 (parseQuotaCurrent window entries in the gatherer overlay), and #3396/#3393/#3379 (tier-items / actions / snapshot-records date gates). Searched open + closed for isQuotaWindow, "quota window resetsAt" before filing.

Activity

Next
  1. developing-today commented on Nov 1, 2026

    @developing-today
    developing-todayBot
    on Nov 1, 2026 – with developing.today
    Contributor
    More actions

    CODE-1309

  2. dezren39
    added
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/lowNice to have; do when convenient
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/sSmall: expected under 2 hours of work
    on Nov 1, 2026
  3. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-11-01 02:35 CST
    • Found via: filed this run
    • Task: Triage the isQuotaWindow value-range/date gap in the feed quota gate and route the fix per the issue's acceptance criteria
    • Expectation: effort/s — done looks like the malformed windows in the evidence table dropping in sanitizeQuotaView with drop counts, plus regression tests
    • Links: laptop probe ~/git/fleet/probe-2026-11-01-laneA-feedquota/ (real feed.ts at main 574c04a)
  4. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    Cross-link: sibling feed-gate gap filed in the same run — #3428 (isBurnSegment accepts negative tokens, non-date from/to and inverted ranges).

  5. github-actions
    assigned
    dezren39
    on Nov 1, 2026
  6. dezren39
    added
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  7. 7 remaining items

  8. dezren39
    removed
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  9. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    Progress checkpoint (queue task 6079): tightened isQuotaWindow to require real ISO reset dates, non-negative finite limit/used, and percent in 0–100. Added regression coverage for Feb-30, negative usage/limit, -50 and 15000 percent, plus individual drop counts and valid-window preservation in sanitizeQuotaView. Running targeted aggregator feed tests now; no PR yet.

  10. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    Queue task 6079 done: implemented the guard fix, tests pass, PR opened.

    • Changed pm-stack/aggregator/src/feed.ts: isQuotaWindow now requires non-null resetsAt to satisfy isIsoDate, non-null limit/used to be non-negative finite, and percent (when present) within 0..100. Malformed windows drop individually in sanitizeQuotaView with droppedWindows counting them.
    • Added regression tests in pm-stack/aggregator/test/feed.test.ts: Feb-30 resetsAt dropped, negative used dropped, negative limit dropped, percent -50 dropped, percent 15000 dropped, valid windows untouched + droppedWindows count.
    • Test results: bun test test/feed.test.ts — 54 pass, 0 fail (run on laptop).
    • PR: fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423 (not merged, per task instructions).
  11. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Conductor binding · manual dispatch wave (Drew-ordered queue unblock) 2026-11-02

    • Queue task: 6079 (repo-health-code-pilot, small_fix — "Fix aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool #3427: isQuotaWindow must refuse non-ISO resetsAt, negative limit/used, out-of-range percent") ↔ issue aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool #3427
    • Session: ses_e5e6324c51bffeUEteFInQoIyr (laptop OpenChamber, agent build)
    • Pool: Workhorse — requested opencode-route/workhorse (route id only; pooled route, no single-plan direct seat). Gate: fresh laptop quota read this run ~09:09 CST — meta 5h 8% / weekly 2%, codex weekly 80%, openai.alternate 5h 0% / weekly 0% — Workhorse OPEN; plan quotas only, never PAYG.
    • Worktree / branch: ~/git/fleet/6079-3427-quota-window-guard on the laptop, branch queue/6079-3427-quota-window-guard (from origin/main d1de7ee)
    • Verified engaged: yes — 30 messages at first probe, 0 errors; tests passed, committing and pushing.
    • The queue task itself remains queued in the fleet queue (there is no targeted claim/binding verb yet — code#1337 / openchamber#1272); the dispatch is recorded in the task's progress. The owning lane reconciles/harvests from here, and the conductor shepherds the session.
  12. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/queuedHas a queued queue task
    on Nov 2, 2026
  13. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane
    • Session / ID: ses_e5e6302ccbdffexE7q1uopf1EH · task 6079
    • Found via: atomic claim from repo-health-code-pilot
    • Task: Reconcile the claimed quota-window fix against current GitHub state before taking any action.
    • Finding: Existing dispatched session ses_e5e6324c51bffeUEteFInQoIyr already produced open PR fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423 on the task branch. I made no edits.
  14. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane
    • Session / ID: ses_e5e6302ccbdffexE7q1uopf1EH · task 6079
    • Reason: Conflicting active work — Drew-authored PR fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423 is open on the task branch, and the recorded dispatched session is its owner. No duplicate PR or branch edits were made.
    • Resume condition: after 30 minutes, re-read PR fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423 and the owning session state; proceed only if the conflict is resolved.
    • Links: aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool #3427 aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool #3427 · PR fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423 fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423
  15. dezren39
    closed this as completedin #4423on Nov 2, 2026
  16. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done — PR merged

    • Agent: repo-worker-code (lane D)
    • Session / ID: queue task 6079 (resumed claim; PR fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423 opened by the prior claim at head 4547db65c)
    • Verification by this claim: PR fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423's diff matches the pinned packet exactly — isQuotaWindow now requires non-null resetsAt to satisfy isIsoDate, non-null limit/used to be isNonNegative (finite, >= 0), and percent to be within isPercentOf(100); the validators were read in src/validate.ts and have exactly those semantics. Regression tests cover every packet-named case (Feb-30 resetsAt, negative used, negative limit, percent -50, percent 15000, valid windows untouched, combined droppedWindows count).
    • Tests: CI registered no workflow runs on the PR in over an hour (runner backlog), so per the packet's own fallback ("laptop if CI is backlogged") the targeted suite ran on the laptop at the PR head: bun test test/feed.test.ts — 54 pass, 0 fail. Zero review threads on the PR; no Codex findings to disposition.
    • Result: PR fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423 MERGED 2026-11-02T16:46:41Z, merge commit 4843f2e21061d87df52f41c2973c2f40cd42e2d3; issue aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool #3427 closed by the PR. Queue task 6079 completed fixed_merged.
    • Links: issue aggregator(feed): isQuotaWindow accepts any string as resetsAt and any finite used/limit/percent — an impossible reset date is clocked as Mar 2 in guidance, a -50% window reads healthy and a 15000% window walls a pool #3427 · PR fix(quota): guard isQuotaWindow against impossible resetsAt, negative values, out-of-range percent #4423 · task 6079
  17. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.