You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
meta-exporter: parseBillingBanner accepts fractional minor units — 1050.5 exports as $10.505 of free credits instead of failing closed on shape drift #2510
parseBillingBanner (pm-stack/meta-exporter/meta-quota-export.mjs:99-111) converts the billing banner's remaining_minor_units to USD with only a type/finiteness/sign check:
Minor units are integer cents by definition — a fractional value is shape drift, and this exporter's parsers are documented to fail closed on shape drift ("Throws on any shape drift — fail-closed, never partial zeros", parseSubscriptionQuota header). But a fractional or absurd value passes here and is exported in a status: "ok" document as freeCreditsUsd:
Verified against the real module (main 7d1b081, node probe):
remaining_minor_units: 1050.5 → freeCreditsUsd = 10.505 (a half-cent that cannot exist)
remaining_minor_units: 0.1 → 0.001
remaining_minor_units: 1e15 → 10000000000000 ($10 trillion of "free credits")
Controls behave: integer 14857 → 148.57; negative and string values throw as intended.
Why it matters
freeCreditsUsd lands in the export document the aggregator's quota plane reads as the Meta card's measured free-credit balance. A drifted banner payload (API change, partial response, wrong field) currently produces a precise-looking but impossible balance instead of the exporter's unparseable (exit 6) failure document — the failure mode every sibling parser in this file is built to produce.
Related, distinct: #2460 (subscription-quota timestamps) and #2461 (parsePaygBalance truncation) are different functions in this file; neither covers the banner parser. #1301 is the null-resets_at diagnosis in parseSubscriptionQuota.
Acceptance criteria
parseBillingBanner throws unparseable (exit 6) when remaining_minor_units is not an integer (Number.isInteger), and when it exceeds a stated plausible bound if triage chooses to add one.
Regression tests in meta-quota-export.test.mjs: fractional (1050.5, 0.1) throws; the existing integer/currency/missing cases still behave as today.
Session / ID: cron new-issue-creator-code-b run 2026-10-30T02:07Z
Found via: filed this run
Task: Triage parseBillingBanner's missing integer check on remaining_minor_units: fractional minor units export as fractional-cent free credits in a status:ok document instead of the exporter's unparseable failure.
Expectation: effort xs — pin the integer (and any bound) check, add regression tests, then route a small_fix packet.
Links: probe hidden_files/probe-2026-10-29-laneB-billingbanner/probe.mjs; issue body file hidden_files/issue-code-billingbanner-minor-body.md
Disposition: Parked for 30 minutes due to the Drew-owned issue/PR hard stop. No checks, reviews, diff, branch, or worktree inspected; no source changes.
Activity
dezren39 commentedon Oct 30, 2026
🤖 Agent note · state: filed
40 remaining items
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up
fix(meta-exporter): reject fractional billing-banner minor units (#2510…
dezren39 commentedon Nov 2, 2026
🤖 Agent note · done