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 — meta-exporter: subscription-quota timestamps are never range-checked — an ms-scale resets_at exports a year-58790 reset as a successful reading, and an out-of-Date-range value throws a bare RangeError misclassified as fetch-failed · Issue #2460 · developing-today/code

meta-exporter: subscription-quota timestamps are never range-checked — an ms-scale resets_at exports a year-58790 reset as a successful reading, and an out-of-Date-range value throws a bare RangeError misclassified as fetch-failed #2460

New issue
Copy link
New issue
Copy link
Closed
#3446
Closed
meta-exporter: subscription-quota timestamps are never range-checked — an ms-scale resets_at exports a year-58790 reset as a successful reading, and an out-of-Date-range value throws a bare RangeError misclassified as fetch-failed#2460
#3446
Copy link
Assignees
dezren39
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

meta-exporter: subscription-quota timestamps are never range-checked — an ms-scale resets_at exports a year-58790 reset as a successful reading, and an out-of-Date-range value throws a bare RangeError misclassified as fetch-failed

Evidence (verified this run, main 5a34fa70)

pm-stack/meta-exporter/meta-quota-export.mjs, parseSubscriptionQuota (lines 61–97):

  • The numeric validation loop (line 76) checks only Number.isFinite(v) || v < 0 for window_resets_at / weekly_resets_at. There is no upper bound and no plausibility window.
  • iso (line 87) is new Date(epochSecs * 1000).toISOString() — unbounded.
  • as_of is not in the validated field set at all; consoleAsOf (line 90) calls the same iso() whenever num(q.as_of) is finite.

Probe (node, importing the real module from main):

input result
window_resets_at = 1793090405000 (millisecond-scale, finite, ≥ 0 — passes validation) exported window resetAt: "+058790-10-10T04:03:20.000Z" inside a status: "ok" success document
window_resets_at = 1e300 (finite, ≥ 0 — passes validation) bare RangeError: Invalid time value escapes parseSubscriptionQuota — err.status/err.exitCode are undefined, it is not an ExportError
as_of = 1e300 same bare RangeError from the consoleAsOf path

The escaped RangeError lands in main()'s catch-all, which wraps any non-ExportError as fetch-failed (exit 7). Per the file's own contract, shape drift is unparseable (exit 6): the header documents the failure taxonomy and the parser is documented "Throws on any shape drift — fail-closed, never partial zeros."

Why it matters

This exporter's whole design is fail-closed: "a failed tick can never be mistaken for a reading." Both failure modes break that contract:

  1. A units drift at the Meta console API (seconds → milliseconds is the classic one) silently exports a garbage resetAt as a successful reading; the quota gatherer (feat(quota-plane): quota-gatherer service in the PM stack — 15-minute tick, quota-current contract #1151) ingests these windows for reset/burn display, so the corruption propagates downstream as fact.
  2. The RangeError path writes a failure document with the wrong status (fetch-failed instead of unparseable), sending whoever investigates hunting a network/page problem when the payload shape drifted.

Acceptance criteria

  • parseSubscriptionQuota rejects epoch fields (window_resets_at, weekly_resets_at, and as_of when present) that do not produce a valid, plausible date — e.g. outside a sane window around now, or of millisecond magnitude — by throwing ExportError("unparseable", 6, …).
  • No bare RangeError escapes any parse* function: every shape drift surfaces as unparseable / exit 6.
  • New tests in meta-quota-export.test.mjs: ms-scale window_resets_at rejected; huge finite window_resets_at rejected with err.status === "unparseable"; huge as_of rejected (or explicitly pinned to null); the captured-payload test and all existing tests still pass (node --test pm-stack/meta-exporter/).

Dedup

#2175 is the CDP-plumbing timeout (transport, open); #2350 is the entry-point symlink check (open); #1566 (closed) added the window_duration_secs validation only. No open or closed issue covers the epoch/resets_at/as_of range validation. Sibling filed this run: the parsePaygBalance truncation issue (different function, different mechanism).

Activity

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

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1257

  3. dezren39
    added
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    effort/xsTrivial: expected under 30 minutes of work
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-b
    • Session / ID: new-issue-creator-code-b cron run 2026-10-29 18:20 CDT
    • Found via: filed this run
    • Task: Filed the meta-exporter quota-timestamp flaw: parseSubscriptionQuota (meta-quota-export.mjs:76) validates resets_at fields only for finite/≥0, so an ms-scale window_resets_at (1793090405000) exports resetAt "+058790-10-10" inside a status:"ok" document, and a huge finite value (1e300) makes iso() (line 87) throw a bare RangeError that escapes the parser and is misclassified by main() as fetch-failed/7 instead of unparseable/6; as_of (line 90) is not validated at all. Verified with node against the real module on main 5a34fa7 (all three cases reproduced).
    • Expectation: effort xs; done when triage pins the plausibility window for epoch fields and routes a small_fix packet with the named regression tests (ms-scale rejected, huge rejected as unparseable, no bare RangeError escapes).
    • Links: meta-exporter: subscription-quota timestamps are never range-checked — an ms-scale resets_at exports a year-58790 reset as a successful reading, and an out-of-Date-range value throws a bare RangeError misclassified as fetch-failed #2460 meta-exporter: subscription-quota timestamps are never range-checked — an ms-scale resets_at exports a year-58790 reset as a successful reading, and an out-of-Date-range value throws a bare RangeError misclassified as fetch-failed #2460 · meta-exporter: CDP plumbing has no timeout — an endpoint that accepts but never answers hangs the exporter forever and writes no failure document #2175 (CDP timeout, distinct) · meta-exporter: meta-quota-export still uses the pre-#2083 raw-path entry-point check — invoked via any symlink it silently no-ops with exit 0 #2350 (entry-point check, distinct) · meta-exporter: window_duration_secs is never validated — a missing/junk duration exports a 'window-NaNs' window as a successful reading #1566 (closed, duration_secs only)
  5. github-actions
    assigned
    dezren39
    on Oct 30, 2026
  6. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  7. 9 remaining items

  8. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  9. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: ses_e5e69a9b189ffeIuIN6iR6pCc4 · queue task 5340
    • Found via: atomic queue claim; follow-up of triage task 3676.
    • Task: Implement the pinned 2020–2100 epoch-seconds range check for reset timestamps and as_of in meta-exporter, with regression tests.
    • Expectation: Revalidate against fresh main/GitHub, create the task worktree under ~/git/fleet/, implement and run the targeted Node test file.
    • Links: meta-exporter: subscription-quota timestamps are never range-checked — an ms-scale resets_at exports a year-58790 reset as a successful reading, and an out-of-Date-range value throws a bare RangeError misclassified as fetch-failed #2460
  10. dezren39
    added a commit that references this issue on Nov 1, 2026

    Merge pull request #3446 from developing-today/queue/5340-2460-meta-e…

    ac56cb9
  11. dezren39
    closed this as completedin #3446on Nov 1, 2026
  12. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  13. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: queue task 5340
    • Outcome: fixed_merged. PR fix(meta-exporter): range-check quota epoch timestamps (#2460) #3446 merged on main as ac56cb9d4ec2e1368a01c55ada64cd63dbfdf9b0; meta-exporter: subscription-quota timestamps are never range-checked — an ms-scale resets_at exports a year-58790 reset as a successful reading, and an out-of-Date-range value throws a bare RangeError misclassified as fetch-failed #2460 closed by the merge.
    • Verification: node --test pm-stack/meta-exporter/meta-quota-export.test.mjs — 18/18 pass. No CI checks were pending; GitHub reported only CodeRabbit neutral/skipped.
    • Bookkeeping: sandbox backlog/sweep log deferred to fleet reconciliation.
  14. developing-today
    added
    status:done
    on Nov 1, 2026
  15. dezren39 commented on Nov 7, 2026

    @dezren39
    dezren39
    on Nov 7, 2026
    MemberAuthor
    More actions

    Regression note (agent-note:v1, new-issue-creator-code-a): the fix for this issue was lost when PR #6333 (commit b4cf60a) re-created pm-stack/meta-exporter/meta-quota-export.mjs from a pre-fix version. Verified on main 4cd2927 and tracked as a restore in #6894 — please do not reopen this issue; #6894 carries the acceptance criteria.

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/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

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.