GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — aggregator: roadmap Horizon dates are never validated — month 13 invents a Q5 lane and an 'undefined 2026' month, month 00 a Q0 lane, and ymdLabel throws on them · Issue #1628 · developing-today/code

aggregator: roadmap Horizon dates are never validated — month 13 invents a Q5 lane and an 'undefined 2026' month, month 00 a Q0 lane, and ymdLabel throws on them #1628

New issue
Copy link
New issue
Copy link
Closed
#1683
Closed
aggregator: roadmap Horizon dates are never validated — month 13 invents a Q5 lane and an 'undefined 2026' month, month 00 a Q0 lane, and ymdLabel throws on them#1628
#1683
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

Summary

The aggregator's roadmap date parsing accepts impossible calendar dates. laneFor's date regex (pm-stack/aggregator/src/derive.ts:65, DATE = /^(\d{4})-(\d{2})-\d{2}/) and rowDate's identical regex (derive.ts:459, YMD) check only the shape of a Horizon cell — two digits for the month — never that the month/day exist. A Grist "Program roadmap" Horizon typo such as 2026-13-15 or 2026-00-15 therefore does not fall into the "other / unscheduled" lane the code reserves for unrecognized horizons (laneFor, derive.ts:71-82); it is treated as a real date and produces nonsense lanes and labels, and one label helper throws on it:

  • laneFor("2026-13-15") → { key: "2026-Q5", label: "Q5 2026", order: 8109 } — a fifth quarter, sorting exactly where Q1 2027 sorts.
  • laneFor("2026-00-15") → { key: "2026-Q0", label: "Q0 2026", order: 8104 }.
  • monthTimeline on a 2026-13-15 row → lane { key: "2026-13", label: "undefined 2026" } — the literal text "undefined 2026" is what the month-grain roadmap page renders (render.ts:1514 calls timelineTable(monthTimeline(rows), …); monthLabel, derive.ts:504-507, indexes MONTH_NAMES[m - 1] unchecked).
  • ymdLabel("2026-13-15") throws TypeError: undefined is not an object (evaluating 'MONTH_NAMES[d.getUTCMonth()].slice') (derive.ts:499-502) — an invalid Date yields NaN month/day indexes. Any present or future caller that labels a row-derived date (rather than a generated lane day) crashes on this input.
  • ymdLabel("2026-02-30") silently relabels the impossible date as "Mon Mar 2" (JS Date roll-over), and roadmapDayGrain counts a 2026-02-30 / 2026-13-15 row as "dated, outside this window" (outside = 1, coarse = 0) instead of as an unparseable/coarse row, so the roadmap's own accounting misstates it.

Verified (this run, on main be7cf62)

Probe ON THE LAPTOP (Bun 1.4.2, driving the real derive.ts — sha256 312ac0fb… identical in both clones; probe + log in the goal's hidden_files/probe-2026-10-28-laneB-horizondate/, run twice with identical results):

CTRL laneFor 2026-10-24: {"key":"2026-Q4","label":"Q4 2026","order":8108}
CTRL laneFor Q1 2027:    {"key":"2027-Q1","label":"Q1 2027","order":8109}
CTRL monthLabel 2026-10: October 2026
CTRL ymdLabel 2026-10-24: Sat Oct 24
BUG laneFor 2026-13-15:  {"key":"2026-Q5","label":"Q5 2026","order":8109}
BUG laneFor 2026-00-15:  {"key":"2026-Q0","label":"Q0 2026","order":8104}
BUG monthLabel 2026-13:  undefined 2026
BUG monthLabel 2026-00:  undefined 2026
BUG rowDate 2026-13-15:  2026-13-15        (accepted as a date)
BUG rowDate 2026-02-30:  2026-02-30        (accepted as a date)
BUG ymdLabel 2026-02-30: Mon Mar 2         (silently a different date)
BUG ymdLabel 2026-13-15: TypeError … MONTH_NAMES[d.getUTCMonth()].slice (throws)
BUG monthTimeline lanes for 2026-13-15: [{"key":"2026-13","label":"undefined 2026","order":24325}]
BUG dayGrain 2026-02-30: outside=1 coarse=0 laned=0

Existing tests cover only valid horizons (test/render.test.ts:127-129: Q1 2027, 2026-10-24, Ongoing).

Reachability: Horizon is a free-text Grist cell, edited by humans and fleet jobs; the roadmap views are rendered from whatever it contains. One mistyped month (2026-13-… for a December/January slip, or a 00 from a spreadsheet export) is enough to put a phantom Q5/Q0 lane and an "undefined 2026" heading on the live roadmap, mis-sort the row into a neighbouring quarter, and count it as a real dated row outside the day-grain window.

Why it matters

The roadmap is the Program view's backbone: quarter/month/day grains all derive from these same helpers, so one bad cell corrupts every grain differently (phantom quarter, undefined month heading, miscounted day window) instead of degrading once, visibly, into the existing "other/coarse" bucket. The helpers' own contract already anticipates unrecognized horizons — laneFor sorts "anything else" after every quarter — the date branch simply never validates that its digits form a date, so the fallback never fires for the most likely typo class.

Acceptance criteria

  • A Horizon whose digits do not form a real calendar date (month 00/13, day 00, Feb 30, Apr 31, …) is treated as unrecognized: laneFor returns the "other" lane for it and rowDate returns null, so the row lands in the coarse/other bucket in every grain.
  • No roadmap surface can render the literal undefined as a lane/month label, and ymdLabel/monthLabel cannot throw or silently relabel an impossible date (defensive behaviour for direct callers is pinned by a test).
  • Regression tests cover at least: 2026-13-15, 2026-00-15, 2026-02-30 through laneFor, rowDate, monthTimeline, and roadmapDayGrain (counted coarse, not "outside"), plus the existing valid controls (2026-10-24 → Q4 2026, a real Feb 29 on a leap year).
  • Existing aggregator test suites still pass.

Activity

Next
  1. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-649

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane B, new-issue-creator-code-b)
    • Session / ID: new-issue-creator-code-b run 2026-10-28 03:50 CDT
    • Found via: filed this run
    • Task: Triage the roadmap Horizon date-validation defect: laneFor/rowDate accept impossible dates (Q5/Q0 lanes, 'undefined 2026' month label, ymdLabel throws, day-grain miscounts them as outside-window).
    • Expectation: effort/s — done looks like impossible dates falling back to the other/coarse bucket in every grain, with regression tests for 2026-13-15 / 2026-00-15 / 2026-02-30.
    • Links: probe + log in the goal's hidden_files/probe-2026-10-28-laneB-horizondate/ (laptop, real derive.ts, sha256 312ac0fb identical both clones)
  4. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 28, 2026
  6. 11 remaining items

  7. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 1896 (implementation follow-up of triage task 1755)
    • Found via: queue claim
    • Task: Implement the aggregator: roadmap Horizon dates are never validated — month 13 invents a Q5 lane and an 'undefined 2026' month, month 00 a Q0 lane, and ymdLabel throws on them #1628 fix: calendar-date validation at rowDate/laneFor in pm-stack/aggregator/src/derive.ts + defensive ymdLabel/monthLabel + regression tests. Laptop SSH has just recovered (outage fleet: laptop SSH unreachable since 2026-10-28 ~11:16Z — all laptop-worktree queue work blocked (MaxStartups pattern or laptop offline) #1667), so implementation proceeds on a laptop worktree.
    • Expectation: effort s; done = branch queue/1896-1628-* pushed, PR opened, CI green, merged under the standing criteria.
    • Links: task 1896; triage task 1755
  8. developing-today
    added
    status:in-review
    on Oct 28, 2026
  9. dezren39
    added
    queue/needs-reviewQueue task finished and is awaiting review
    status/needs-reviewReady for review
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Oct 28, 2026
  10. dezren39
    added 2 commits that reference this issue on Oct 28, 2026

    style(aggregator): biome-format the #1628 regression tests (treefmt)

    5fba67f

    Merge pull request #1683 from developing-today/queue/1896-1628-horizo…

    ea7272c
  11. dezren39
    closed this as completedin #1683on Oct 28, 2026
  12. developing-today
    added
    status:done
    and removed
    status:in-review
    on Oct 28, 2026
  13. dezren39
    removed
    status/needs-reviewReady for review
    queue/needs-reviewQueue task finished and is awaiting review
    work/assignedQueue worker lifecycle state
    on Oct 28, 2026
  14. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 1896
    • Found via: queue claim (follow-up of triage task 1755)
    • Task: Implemented the Horizon calendar-date validation fix.
    • Expectation: Done — PR fix(aggregator): validate roadmap Horizon calendar dates at rowDate/laneFor (#1628) #1683 merged (merge commit ea7272c, 2026-10-28T14:07Z); this issue auto-closed by the merge.
    • Links: PR fix(aggregator): validate roadmap Horizon calendar dates at rowDate/laneFor (#1628) #1683 · branch queue/1896-1628-horizon-date-validation · laptop worktree ~/git/fleet/1896-1628-horizon-dates
    • Verification: laptop bun test test/render.test.ts 24 pass (6 new aggregator: roadmap Horizon dates are never validated — month 13 invents a Q5 lane and an 'undefined 2026' month, month 00 a Q0 lane, and ymdLabel throws on them #1628 regression tests); CI green (run, treefmt after a biome-format fixup, Nix flake evaluation). One pre-existing failure in the full aggregator suite (actions.test.ts applied-snooze strip) reproduces identically on clean main and is filed as aggregator: actions.test.ts fails on main — applied snooze never lands in the Snoozed strip ('Snoozed by you (1)' missing) #1682 — untouched by this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.