Title: 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 · Issue #2199 · developing-today/code · GitHub
Open Graph Title: 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 · Issue #2199 · developing-today/code
X Title: 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 · Issue #2199 · developing-today/code
Description: 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 Summary parseDnsRegister in pm-stack/aggregator/src/dn...
Open Graph Description: 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 Summary parseD...
X Description: 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 Summary parseD...
Opengraph URL: https://github.com/developing-today/code/issues/2199
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"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","articleBody":"# 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\n\n## Summary\n\n`parseDnsRegister` in `pm-stack/aggregator/src/dns.ts` validates a register row's renewal cell with a shape-only regex — `/^\\d{4}-\\d{2}-\\d{2}$/` (dns.ts:51) — so impossible calendar dates pass as real renewals. Every downstream consumer treats the string as a date: `parseDnsRegister` sorts entries by `renewal.localeCompare` (dns.ts:66), `dnsSectionFromRegister` sums every entry's price into `totalAnnualListUsd` (dns.ts:73), and `summarizeDns` picks `nextRenewal` and the 45-day `renewingSoon` spend horizon by string comparison against today (dns.ts:104-110). A typo'd renewal in the hand-produced #902 register therefore lands in the fleet feed as fact: a `2026-13-01` domain can never appear in `renewingSoon` (month 13 sorts after every real date) yet its price still counts toward the annual total, and a `2026-02-30` sorts ahead of real February/March renewals and becomes `nextRenewal` whenever \"today\" precedes it.\n\n## Evidence (verified this run, main 318ca58a)\n\nProbe: real `parseDnsRegister` / `dnsSectionFromRegister` / `summarizeDns` under Bun, register with three rows (renewals `2026-11-01` @ $10, `2026-02-30` @ $20, `2026-13-01` @ $30):\n\n- Parsed renewals: `b.example=2026-02-30`, `a.example=2026-11-01`, `c.example=2026-13-01` — both impossible dates accepted, sorted by string (`2026-02-30` first, `2026-13-01` last).\n- `totalAnnualListUsd: 60` — the $20 and $30 prices of the impossible rows are counted.\n- With `now = 2026-01-15` the `2026-02-30` row would be `nextRenewal` and inside the 45-day horizon; the `2026-13-01` row is in no horizon, ever.\n\nFile:line (main 318ca58a):\n\n- `pm-stack/aggregator/src/dns.ts:51` — the shape-only renewal check: `if (!domain || !/^\\d{4}-\\d{2}-\\d{2}$/.test(renewal)) continue;`\n- `pm-stack/aggregator/src/dns.ts:66` — renewal sort by `localeCompare`.\n- `pm-stack/aggregator/src/dns.ts:71-75` — `dnsSectionFromRegister` totals all parsed entries' prices.\n- `pm-stack/aggregator/src/dns.ts:99-112` — `summarizeDns` string-comparison `nextRenewal` / `renewingSoon`.\n\n## Why it matters\n\nThe register is a Markdown file produced by the #902 pipeline and edited by hand; a single typo'd renewal (`2026-13-01`, `2026-02-30`) currently flows into the collector's feed section with no rejection and no log line, corrupting the two things the section exists for — what renews next (and within the 45-day spend horizon) and what the estate costs per year. The parser is documented as the fallback of record for the register (\"if #902's job ever emits register.json, this parser is the fallback\"), so its validation bar is the system's bar.\n\n## Acceptance criteria\n\n- [ ] Triage pins the rule for a non-calendar renewal date (expected: the row is refused at parse, like a row with too few cells or a missing domain — the register keeps only real dates; or, if refused rows must stay visible, they are excluded from the sort/total/horizon and marked — triage decides, silence is the one ruled-out option).\n- [ ] Regression tests in `pm-stack/aggregator/test/slice3.test.ts` (the dns parser's test home): rows with `2026-02-30`, `2026-13-01`, `2026-00-10`, `2026-04-31` do not enter the entries/total; `2024-02-29` (leap year) still parses; existing register fixtures unchanged.\n- [ ] No behavior change for real dates: sort order, `totalAnnualListUsd`, `nextRenewal`, and `renewingSoon` identical on the existing fixtures.\n\nFiled by new-issue-creator-code-b (lane B), run 2026-10-29 03:50 CDT. Dedup: #1684 (open) is summarizeDns's UTC-day aging — a different bug in the consumer, not parse validity; #2194 is the same shape-only pattern in charges-collect (different parser, input, and consumers); #902 is the register pipeline epic.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-29T09:04:43Z","url":"https://github.com/developing-today/code/issues/2199"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c68f6261-fdba-9c6a-a14a-28992e07e605 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC14:11DCCF:BA69BB:F270A8:6B063F1C |
| html-safe-nonce | 7ed7522dcc68d161daafa8d2214c7ff005a070128b1598544decc8f677c70741 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzE0OjExRENDRjpCQTY5QkI6RjI3MEE4OjZCMDYzRjFDIiwidmlzaXRvcl9pZCI6IjY3NzE4NTg4Njk5MjYxMTcxNDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | aa21c9efa4f9f65200b2da96578a1f9fba2064c02612c849adf5fe0bb225fd38 |
| hovercard-subject-tag | issue:6096410210 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/2199/issue_layout |
| twitter:image | https://opengraph.githubassets.com/762058d9fc194ef7dfaa6d730e314f11503cfa05be893749ea4f2520b9bf8332/developing-today/code/issues/2199 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/762058d9fc194ef7dfaa6d730e314f11503cfa05be893749ea4f2520b9bf8332/developing-today/code/issues/2199 |
| og:image:alt | 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 Summary parseD... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | dcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0f38f5735226749ec5e08a8649dce4cb2613d9ad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width