Repository navigation
Description
aggregator(health): dns/aa section stamps are never validated — garbage dns generatedAt renders ageMs NaN, future aa generatedAt renders age 0
Evidence (verified this run, main 24901e7b)
The /health view is the stack's honesty surface: feedSections in pm-stack/aggregator/src/health.ts:184-207 reports each feed section's generatedAt and ageMs. Three sections carry their own stamps — orchestration, dns, aa (the rest inherit the feed's top-level stamp). Only the orchestration stamp is ever validated:
- Top-level feed stamp:
isFleetFeed(feed.ts:213-222) requiresNumber.isFinite(Date.parse(generatedAt)), andbuildHealthitself flags a top-level stamp >60s in the future as "never fresh" (health.ts:234-235,:254-262,GENERATED_AT_FUTURE_SKEW_MS). - Orchestration stamp:
orchestrationSectionProblem(feed.ts:131) requires a finite parse, anddiagnoseOrchestrationSection(feed.ts:180-186) rejects >60s future stamps as invalid. - dns stamp:
DnsSection.generatedAt(model.ts:644-646) has no validator on the read path —isFleetFeednever inspects the dns section. - aa stamp:
isAaSection(aa.ts:1070-1084) checks onlytypeof generatedAt === "string"— no parse, no finiteness, no future bound.isFleetFeeddoesn't inspect the aa section either.
feedSections' helper (health.ts:186-189) computes the age blindly:
const ts = generatedAt ?? feed.generatedAt;
return { present, generatedAt: ts, ageMs: Math.max(0, now - Date.parse(ts)), ... };
Date.parse of a garbage stamp is NaN, and Math.max(0, NaN) is NaN. A future stamp gives a negative age, clamped to 0 — maximally fresh — and stays 0 until the stamped date passes.
Probe (Bun, real buildHealth, fixtures mode)
Feed with a valid top-level stamp, dns.generatedAt = "not-a-date", aa.generatedAt = now + 30 days:
orchestration: present=false generatedAt="2026-10-29T10:47:56.678Z" ageMs=0 isNaN=false json=0 (control: absent → feed stamp)
dns: present=true generatedAt="not-a-date" ageMs=NaN isNaN=true json=null
aa: present=true generatedAt="2026-11-28T10:47:56.678Z" ageMs=0 isNaN=false json=0
So the health JSON says the dns section is present with ageMs: null and no invalid/stale signal, and the aa section looks just-collected (ageMs: 0) for the next 30 days.
Why it matters
The health page exists so a stale or broken section is diagnosable instead of silently "absent" or silently fresh (#1139/#1140, and #1564 established the finite + 60s-future-skew convention for the orchestration section and the top-level stamp). The dns and aa sections escaped that pass: a collector bug or clock skew that corrupts either stamp is invisible on the one surface meant to catch it — garbage reads as "present, age unknown", and a future stamp reads as "freshest possible" for as long as the skew lasts.
Acceptance criteria
-
feedSections(or the section gates feeding it) applies the house convention to the dns and aa stamps: an unparseable stamp does not produceageMs: NaN— the section is reported with a legible invalid/absent-style signal instead ofpresent+ageMs: null. - A section stamp more than
GENERATED_AT_FUTURE_SKEW_MS(60s) in the future is not reported asageMs: 0fresh; it gets the same treatment the top-level stamp gets ("never fresh" / invalid). - Valid stamps render exactly as today; a regression test (health tests) covers garbage and future dns/aa stamps alongside the existing top-level/orchestration cases.
Notes
- Dedup: searched open + closed for health/feedSections/section-stamp terms — no match. aggregator: a garbage or future-dated generatedAt is 'live' forever — the orchestration diagnosis and fleet-feed gate never check that the timestamp parses #1564 (closed) covered the orchestration diagnosis + top-level feed gate only; 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(saas-extract): shape-only dates win freshestDate — a 2026-13-01 'Last checked' masks a real read (measuredAt goes stale/null), 2026-02-30 becomes a renewal date #2206 are the dns/saas content date parsers, not the health view's section stamps.
- Not self-solved by the filing lane: whether the fix lives in
feedSections, inisFleetFeed/isAaSection, or in a dns section gate is triage's pin.
Filed by new-issue-creator-code-a (agent-note follows).
Activity
developing-today commentedon Oct 29, 2026
CODE-1110
dezren39 commentedon Oct 29, 2026
🤖 Agent note · filed
9 remaining items
dezren39 commentedon Oct 31, 2026
🤖 Agent note · picked up
dezren39 commentedon Oct 31, 2026
🤖 Agent note · parked
Merge pull request #3091 from developing-today/queue/4321-2242-feedse…
dezren39 commentedon Oct 31, 2026
agent-note:v1
state: done
task: 4321 (lane E resume)
pr: #3091 MERGED @ 201e0c3
note: Codex review on df2ea24 completed clean ("Didn't find any major issues", no threads). No PR CI covers pm-stack/** (per #2936); verification was the laptop suite from the opening lane (health 18/18, full-suite fail set identical to clean main). Diff = exactly the 4 packet files (health.ts, dns.ts, aa.ts, test/health.test.ts). Issue auto-closed by the merge; stale queue/status/work labels removed.