Repository navigation
Description
Title: pm-stack(aggregator): dnsSectionFromRegisterJson accepts impossible renewal dates (2027-02-30, 2026-13-01) — the #2199 fix covered only the Markdown register path
Problem
parseDnsRegister (the Markdown path) refuses impossible calendar renewal dates since the #2199 fix (PR #4835): pm-stack/aggregator/src/dns.ts:56 requires isIsoDate(renewal) in addition to the YYYY-MM-DD shape, because an impossible date "string-sorts into the register, counts toward the annual total, and poisons nextRenewal / renewingSoon".
The JSON path — dnsSectionFromRegisterJson, whose register.json is authoritative for the fields it carries (dns.ts:95-103) — never got the same check:
pm-stack/aggregator/src/dns.ts:135:if (typeof renewal !== "string" || !/^\d{4}-\d{2}-\d{2}$/.test(renewal)) return null;— shape only, noisIsoDate.- The shared section gate
isDnsSection(dns.ts:183) likewise only requiresrenewalto be a string, so a section carrying an impossible renewal certifies as valid for the render paths.
That contradicts the function's own contract (dns.ts:100-103): "Returns null on ANY malformation … so the caller falls back to the Markdown parse instead of serving a half-invented register."
Verified this run (laptop probe, origin/main 8e76c6f)
Probe script /tmp/probe-dns.ts on the laptop, importing dnsSectionFromRegisterJson, isDnsSection, and summarizeDns from current main, with a register.json containing next_renewal values 2027-02-30 ($20), 2026-13-01 ($30), 2024-02-29 ($5, valid leap date), and 2027-01-15 ($10):
SECTION_NULL: false
DOMAINS: leap.example,month13.example,real.example,feb30.example
TOTAL: 65
IS_DNS_SECTION: true
NEXT_RENEWAL: month13.example 2026-13-01
So the impossible rows are accepted, their $50 counts toward totalAnnualListUsd, the section passes isDnsSection, and summarizeDns (dns.ts:232, string comparison e.renewal >= today) reports the nonexistent 2026-13-01 as the next renewal — exactly the harm #2199 documented for the Markdown path.
Why it matters
The JSON register is the authoritative source (#902 slice 2); a single bad next_renewal from the register job silently poisons the /dns totals, nextRenewal, and renewingSoon instead of falling back to the Markdown parse as the contract promises. The Markdown path was fixed for this exact failure mode in #4835; the authoritative path was left open.
Acceptance criteria
dnsSectionFromRegisterJsonreturnsnullwhen any row'snext_renewalis shape-valid but not a real calendar date (e.g.2027-02-30,2026-13-01,2026-00-10,2026-04-31), falling back to the Markdown parse.- Real dates still parse, including leap dates (
2024-02-29). isDnsSectionrefuses an entry whoserenewalis not a real calendar date.- New tests in
pm-stack/aggregator/test/slice3.test.tsmirror the fix(aggregator): reject impossible DNS register renewal dates (#2199) #4835 Markdown cases for the JSON path (impossible dates refused, leap date kept); existing slice3 DNS tests stay green.
Activity
dezren39 commentedon Nov 3, 2026
🤖 Agent note · filed
isIsoDatecheck todnsSectionFromRegisterJsonandisDnsSection, mirrors the fix(aggregator): reject impossible DNS register renewal dates (#2199) #4835 cases as JSON-path tests in slice3.test.ts; done when those tests pass and impossible dates fall back to the Markdown parse.dezren39 commentedon Nov 3, 2026
agent-note:v1
state: reviewed (coverage loop-back)
Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7403 (small_fix, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
Found via: coverage loop-back 2026-11-03
dezren39 commentedon Nov 4, 2026
🤖 Agent note · picked up
Merge pull request #5213 from developing-today/queue/7403-4858-dns-re…
dezren39 commentedon Nov 4, 2026
🤖 Agent note · done