Skip to content

aggregator(quota-extract): monthDayTime accepts out-of-range minutes — 'Oct 30, 18:99 UTC' becomes a fabricated 19:39 resetsAt instead of null #9003

Closed

Description

@dezren39

Finding

monthDayTime in pm-stack/aggregator/src/quota-extract.ts (line 39 on current main a5318f8798b1) validates the month and the day-of-month, but never validates the time-of-day it captures. Its UTC round-trip check (isRequestedDate) compares only getUTCMonth() and getUTCDate(), so an out-of-range minute that does not push the constructed date across midnight is silently normalized by Date.UTC into a different, fabricated reset time instead of returning null.

Hours 24–99 happen to return null only as a side effect (they always roll the date forward a day, tripping the day check). Minutes 60–99 roll forward only one hour, so they usually pass.

Evidence

Why it matters

The aggregator's whole validation discipline in this area (issues #2196, #2383, #2470, and the sibling guards merged the same day in PRs #4136/#4142) is: a malformed provider read keeps its percentage and gets resetsAt: null — never an invented date. A dashboard line with a corrupted time (e.g. resets Oct 30, 18:99 UTC) currently produces a confident, wrong reset time on the quota card instead, which is exactly the failure mode #2196 was filed to eliminate for dates.

Acceptance criteria

  • monthDayTime returns null for any out-of-range time-of-day component (hour > 23 or minute > 59), for all three call sites (Codex, OpenCode Go, Command Code), while the window's percentage/other fields are preserved.
  • Valid times, month-case normalization, unknown-month null, out-of-range-day null, and the >30-days-past roll-forward behavior from fix(aggregator): monthDayTime — normalize month case, null on unknown month or out-of-range day (#2196) #4135 keep working unchanged.
  • Regression tests in pm-stack/aggregator/test/quota.test.ts pin at least: minute 60, minute 99 not crossing midnight (e.g. 18:99), hour 24, and a valid boundary time (23:59), across the existing three-consumer test matrix or an equivalent direct cover.
  • No other extractor's behavior changes.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    on Nov 12, 2026
  2. developing-today commented on Nov 12, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 12, 2026
  5. 27 remaining items

  6. added and removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 12, 2026
  7. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    Agent note — task 15329 parked on CI (lane any-b)

  8. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 12, 2026
  9. developing-today commented on Nov 12, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: done (fixed_merged)
    lane: any-d (task 15329, small_fix)
    summary: Resumed from the awaiting-CI checkpoint and merged PR #9033. Fresh verification at head 9b9c5cb: MERGEABLE; diff is exactly the packet scope (pm-stack/aggregator/src/quota-extract.ts + test/quota.test.ts — monthDayTime now rejects hour > 23 / minute > 59 at all three call sites with pinned regressions); Codex code review completed at this head with no findings (has_unresolved_findings: false). Every failing check is in the mcpx-test set (unit + e2e shards 0/3/4/5), the documented clean-main failure set of #8900, unrelated to this aggregator-only diff; all PR-scoped checks passed. Task 15329 completed as fixed_merged.

  10. 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 12, 2026
  11. developing-today commented on Nov 12, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: correction
    lane: any-d (task 15329, small_fix)
    summary: Correction to the task 15329 completion record: the branch field recorded there (queue/15329-9003-monthdaytime) was wrong. PR #9033's actual head branch is queue/15311-9003-monthdaytime (the PR was opened under the earlier task 15311; task 15329 was the CI-resume task that merged it). Everything else in the completion record is correct: PR #9033, merged at 3119cd2, #9003 closed.

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

Metadata

Metadata

Assignees

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobstatus:donetask/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