Repository navigation
Description
Bug
Two fleet-feed section gates validate their generatedAt stamp with bare Date.parse, so a day-overflow date that never existed passes as a real collection time:
isAaSection(pm-stack/aggregator/src/aa.ts:1096absent form,:1100ok form):Number.isFinite(Date.parse(s.generatedAt)).isDnsSection(pm-stack/aggregator/src/dns.ts:79): the same expression.
Date.parse("2026-02-30T00:00:00.000Z") does not fail — it rolls over to 2026-03-02. So a section stamped February 30 passes both gates and is served/rendered as data collected on March 2: the live source builds provenance from it (feedAgeText, collected ${feed.aa.generatedAt}, register parsed ${feed.dns.generatedAt} in src/sources/live.ts), and renderAa/renderDns print it via fmtDate. The stamp is the freshness signal for both pages; a fabricated March date makes stale or hand-edited data look freshly collected.
The codebase already has the strict primitive for exactly this: isIsoDate/parseIsoDate in src/validate.ts re-checks calendar components so 2026-02-30 fails instead of rolling over, and sibling gates use it (orchestrationSectionProblem checks isIsoDate(s.generatedAt); isSnapshotRecord uses it for ts/resetsAt with the comment "Date.parse rolls 2026-02-30 into March, so the strict primitive is the gate"). The AA and DNS gates were never migrated.
Evidence (verified this run, main ba2e97d)
Laptop probe ~/git/fleet/probe-2026-11-01-laneA-gendates/probe.ts (Bun 1.4.2), importing the real aa.ts/dns.ts/validate.ts from the laptop clone — aa.ts md5 2dc10e70, dns.ts md5 03aab48e, validate.ts md5 2078ddfd, identical on sandbox main ba2e97d and the probe clone; full output in probe.txt in the same directory:
Date.parse("2026-02-30T00:00:00.000Z")→2026-03-02T00:00:00.000Z(rollover);isIsoDate(same)→false.- AA control (real stamp):
isAaSection→true. WithgeneratedAt: "2026-02-30T00:00:00.000Z"→true(ok form and absent form both). - DNS control (real stamp):
isDnsSection→true. With the Feb-30 stamp →true. - (Month 13 is already refused, because
Date.parsereturns NaN for it — the hole is specifically day-of-month overflow: Feb 29 in a non-leap year, Feb 30/31, Apr/Jun/Sep/Nov 31.)
Why it matters
generatedAt is how every surface answers "how old is this data". A stamp that silently becomes a different, real-looking date defeats the staleness banners and provenance lines these pages rely on, and it does so invisibly — no NaN, no "unknown", just the wrong day. The feed is a file boundary shared with the collector, older feeds, and hand/backfill tooling; the section gates are the one place supposed to keep impossible stamps out.
Acceptance criteria
isAaSection(both ok and absent forms) andisDnsSectionrefuse ageneratedAtthat is not a real ISO calendar date — at minimum the day-overflow shapes above — using the sharedisIsoDateprimitive fromvalidate.ts(or an equivalent component re-check).- A Feb-30-stamped AA or DNS section in the feed is treated as absent/invalid by the live source (existing provenance wording), not rendered with a March 2 collection date.
- Regression tests beside the existing aa/dns gate tests: Feb-30, Feb-29-2026 (non-leap), and Apr-31 stamps fail both gates; the well-formed fixture sections still pass unchanged.
- No change to the on-disk feed format or to what the collector emits for valid sections.
Distinct from: #2242 (health.ts age computation over dns/aa stamps — different file, NaN/future ages; these are the section gates themselves certifying an impossible date), #2199 (DNS register renewal dates in parseDnsRegister), #2412/#2415 (dns/aa gates' unchecked numeric/thresholds/sources fields — crash class, not the stamp), #3396/#3393 (tier-items/actions date gates).
Activity
developing-today commentedon Nov 1, 2026
CODE-1313
dezren39 commentedon Nov 1, 2026
🤖 Agent note · filed
9 remaining items
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up queue task 6084
queue/6084-3441-aa-dns-date-gatesfromd1de7ee869Date.parseacceptance with shared strictisIsoDatefromsrc/validate.ts; run focused Bun tests + aggregator suite locally.dezren39 commentedon Nov 2, 2026
🤖 Agent note · fix implemented, tests green (queue task 6084)
pm-stack/aggregator/src/aa.ts(isAaSection ok + absent branches now use shared strictisIsoDate),pm-stack/aggregator/src/dns.ts(isDnsSection likewise); regressions intest/aa-gate-2415.test.ts(ok),test/aa.test.ts(absent),test/slice3.test.ts(DNS) covering2026-02-30,2026-02-29,2026-04-31generatedAt, with well-formed controls retained.bun test test/aa-gate-2415.test.ts test/aa.test.ts test/slice3.test.ts test/validate.test.ts→ 171 pass, 0 fail.bun test(pm-stack/aggregator) → 1072 pass, 1 fail + 1 error, both from pre-existing missingweb-pushpackage intest/alerts.test.ts(import-time, unrelated to date gates).tsc --noEmitshows only the pre-existing missingbuntypes diagnostic.dezren39 commentedon Nov 2, 2026
🤖 Agent note · PR opened (queue task 6084 done, awaiting review)
main, headqueue/6084-3441-aa-dns-date-gates, commit8fac38a0b; not merged)generatedAtchecks switched toisIsoDate; regressions for the three impossible stamps; valid-section controls retained. aggregator(dns): parseDnsRegister accepts impossible renewal dates — 2026-02-30 and 2026-13-01 enter the register, count toward the annual total, and string-sort into wrong positions #2199 / aggregator(dns): isDnsSection never checks totalAnnualListUsd or entry priceUsd — a feed section that passes validation crashes /dns and the usage view on .toFixed #2412 / aggregator(aa): isAaSection never checks thresholds or sources — a section missing them passes the gate and crashes the /aa render instead of degrading #2415 left untouched.web-pushenv failure intest/alerts.test.ts.dezren39 commentedon Nov 2, 2026
🤖 Conductor binding · manual dispatch wave (Drew-ordered queue unblock) 2026-11-02
small_fix— "Fix AA and DNS gates accepting impossible generatedAt dates (aggregator(aa+dns): section gates accept an impossible generatedAt — bare Date.parse rolls 2026-02-30 to Mar 2 and both isAaSection and isDnsSection pass it as a real collection time #3441)") ↔ issue aggregator(aa+dns): section gates accept an impossible generatedAt — bare Date.parse rolls 2026-02-30 to Mar 2 and both isAaSection and isDnsSection pass it as a real collection time #3441ses_e5e63230349ffebsCg7P5IH4ck(laptop OpenChamber, agent build)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.~/git/fleet/6084-3441-aa-dns-date-gateson the laptop, branchqueue/6084-3441-aa-dns-date-gates(from origin/main d1de7ee)queuedin 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.dezren39 commentedon Nov 2, 2026
Queue task 6084 picked up (lane 8ac61616). Revalidated: issue OPEN, no superseding work, no held/Drew-owned flags. Resuming from dispatched-session checkpoint: fix + PR #4426 exist — verifying fresh (diff reviewed, targeted tests 171 pass / 0 fail) and harvesting.
Merge pull request #4426 from developing-today/queue/6084-3441-aa-dns…
dezren39 commentedon Nov 2, 2026
Queue task 6084 done. Fix merged via PR #4426 (merge 97f7105): AA/DNS generatedAt gates now use isIsoDate, rejecting impossible calendar dates. Verified: targeted suites 171 pass / 0 fail. Closing as fixed.