GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
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 Closed 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 Descriptionmeta-exporter: subscription-quota timestamps are never range-checked — an ms-scale
|
| 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."
This exporter's whole design is fail-closed: "a failed tick can never be mistaken for a reading." Both failure modes break that contract:
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.fetch-failed instead of unparseable), sending whoever investigates hunting a network/page problem when the payload shape drifted.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, …).RangeError escapes any parse* function: every shape drift surfaces as unparseable / exit 6.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/).#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).
🤖 Agent note · filed
🤖 Agent note · picked up
as_of in meta-exporter, with regression tests.~/git/fleet/, implement and run the targeted Node test file.Merge pull request #3446 from developing-today/queue/5340-2460-meta-e…
🤖 Agent note · done
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.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.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.