Skip to content

feat(canary): compare each calendar's years with native Temporal in the swap check (CORE-110, #468) - #469

Merged
craig-o-curtis merged 7 commits into
mainfrom
468-core-110-calendar-sweep
Nov 6, 2026
Merged

craig-o-curtis merged 7 commits into
mainfrom
468-core-110-calendar-sweep

Conversation

@craig-o-curtis

Copy link
Copy Markdown
Contributor

Closes #468

The move to temporal-polyfill (CORE-108, #460) is parked until releases fix two calendar bugs. This PR adds the check that says when they are fixed. Once it is on main, the weekly run watches every new release.

What changed

  • Calendar sweep. scripts/lib/calendar-sweep.mjs is a new pure module with no imports and no I/O. It covers every calendar that both temporal-polyfill and Node's built-in Temporal accept, and every calendar year that overlaps ISO years -3000 to 5000. For each year it compares three facts: the ISO date of the year's first day, the months in the year and the days in the year. The span is fixed, so runs on different days read the same years.

  • Node leg. scripts/polyfill-swap.mjs runs the sweep on the Node leg, after the offset sweep and before the suite passes, so a suite timeout cannot lose it. Its result goes in the verdict's calendarSweep field. A host with no built-in Temporal records that the sweep could not run.

  • The swap waits on every calendar. The swap is ready only when the sweep ran and no calendar differs. A sweep that did not run, or a verdict with no calendar count, also blocks. A calendar only one side accepts counts as a difference.

  • Report. The job summary lists each calendar that differs, with how many years differ, the first such year and one example. The issue that says the swap is due now says every calendar matched, and its title says the release passes the GMT suite and both sweeps.

  • Today's result. temporal-polyfill 1.0.8 against Node 26.12.1:

    Calendar Years that differ First year
    Persian 156 1502 AP
    Chinese 3,889 —
    Dangi 3,858 —

    The other 13 calendars match. Persian uses the plain 33-year leap rule, where ICU4X corrects 78 years (Persian calendar: 78 years from 1502 to 2987 AP get the wrong leap year fullcalendar/temporal-polyfill#127). Chinese and Dangi are read from Intl, and Node 26's ICU 78.3 disagrees with its built-in Temporal: Chinese New Year 2027 comes out as 7 February instead of 6 February (Chinese and Dangi: dates read from Intl differ from native Temporal (Chinese New Year 2027) fullcalendar/temporal-polyfill#128).

  • /upstream/. feat(roadmap) add interval length and partitioning helpers J9 (104) #127 and feat(roadmap) add getZonedOffset, getZonedOffsetAs, getTimeZoneOffset, formatTimeZoneName, isInDaylightSaving J10 (105) #128 are listed, each with a summary and a note on GMT. The "Why this polyfill" section says the weekly check also compares every calendar's years.

  • Context. context/domination/issues/CORE-110.md holds the scope and decisions, and CORE-110 is Done in the tracker. CORE-92's spec says its Node leg now runs both sweeps.

Changeset

An empty changeset (.changeset/temporal-polyfill-calendar-sweep.md). Nothing under packages/gmt changes, so @northguild/gmt has no release.

Validation

Check Result
oxfmt --check Pass
oxlint Pass (one existing warning in scripts/affected.mjs)
Dox typecheck 0 errors
node scripts/upstream.mjs check 23 filings and 1 listing OK
pnpm deps -- check 58 domination and 20 Dox rows OK
changeset status --since=origin/main Pass
Canary, filings and upstream-page tests 24 files, 854 tests pass
Sweep on 1.0.8 against Node 26.12.1 16 calendars, 128,762 years, about 11 s; Persian, Chinese and Dangi block

Not run yet: a dispatch of the Temporal oracle workflow on this branch. It is the last line of #468's verification.

Commits

  1. feat(canary): the calendar sweep, its wiring into the verdict, summary and issue, the tests, and the feat(roadmap) add interval length and partitioning helpers J9 (104) #127 and feat(roadmap) add getZonedOffset, getZonedOffsetAs, getTimeZoneOffset, formatTimeZoneName, isInDaylightSaving J10 (105) #128 filings.
  2. docs(canary): the workflow comment and /upstream/ describe the calendar sweep; the empty changeset.
  3. docs(domination): CORE-110 Done in the tracker.

…he swap check (CORE-110, #468)

The Node leg of the weekly temporal-polyfill swap check now runs a calendar sweep beside the
offset sweep. For every calendar both implementations accept, and every calendar year that
overlaps ISO years -3000 to 5000, it compares the first day of the year, the months in the year
and the days in the year with Node's built-in Temporal. Any calendar that differs blocks the
swap, and a sweep that did not run blocks too.

On temporal-polyfill 1.0.8 against Node 26.12.1 it compares 16 calendars and 128,762 years in
about 11 seconds. It reports Persian (fullcalendar/temporal-polyfill#127) and Chinese and Dangi
(fullcalendar/temporal-polyfill#128). The other 13 calendars match.

The upstream filings now list #127 and #128.
@craig-o-curtis craig-o-curtis added documentation Improvements or additions to documentation enhancement New feature or request pipes labels Nov 6, 2026

@baldurpan baldurpan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the whole diff at 8be009d: the sweep, how it feeds the verdict, summary and issue, the tests, the filings and the context files. Locally, the canary tests and the /upstream/ and filings tests pass (31 files, 4,253 tests), and so does node scripts/upstream.mjs check. My Node is 24, with no built-in Temporal, so I couldn't rerun the sweep itself. I did check one Persian date on GMT's installed @js-temporal/polyfill 0.5.1: 1503 AP M01-01 gives 2124-03-20, the native value, as the #127 note says.

Two inline comments: a gap in the fail-closed gate, and a question about the oracle dispatch.

One more point, which I'm not opening as a thread. The Dox gates job fails on /upstream/: axe target-size flags the two stacked links polyfill #369 and polyfill #370 in the D1 row of the defects table. This pull request doesn't change that row, because its data and styles are the same on main. #464 passed the same gate an hour earlier only because its data leaves one link in that row. My guess is that the style changes in #461 caused it, because they landed after the last gate run on /upstream/ (#457). It isn't a required check. But it will fail on every pull request that touches /upstream/ until it is fixed, so it probably wants its own issue.

Comment thread scripts/lib/calendar-sweep.mjs Resolved
Comment thread context/domination/tracker.md Resolved
…468)

The calendar sweep throws when neither side accepts any listed calendar, so the Node leg records could-not-run. Readiness also needs a positive count of zones, calendars and years, so a verdict that lost one never reports ready. Raised in review.
…eam/ (CORE-110, #468)

axe target-size flagged the two references in the D1 row of the defects table. Each link is now 24 px tall, per WCAG 2.2 success criterion 2.5.8.
@craig-o-curtis

Copy link
Copy Markdown
Contributor Author

The /upstream/ target-size failure is fixed in 65544c2, here rather than in a separate issue, since this pull request already changes /upstream/. Each stacked reference in the defects table is now a 24 px target (display: inline-block, min-block-size and line-height of 1.5rem), the same pattern as .gmt-licence > summary. That meets WCAG 2.2 success criterion 2.5.8. Locally, pnpm --filter dox gates --pages /upstream/ --browsers chromium --tier pr passes axe, the Tab walk and the media checks in both themes, and table-fit reports 0 scroll and 0 spill across 1,275 tables.

baldurpan
baldurpan previously approved these changes Nov 6, 2026

@baldurpan baldurpan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving 65544c2.

  • Both threads are settled. The gate no longer opens on a sweep that compared nothing, and the oracle run shows the calendar sweep working on CI.
  • The target-size fix in UpstreamDefects.astro covers the Dox gates failure from my first review.
  • Locally, the canary, upstream and defects-table tests all pass at this head.

CI was still running when I approved.

… check (CORE-110, #468)

The dry-run issue opened with passed every check on this run even when the
run was not ready. It now says was checked on this run, and the real-result
line says the run is not ready to swap before naming the first check that
blocks it.

@baldurpan baldurpan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-read c94ddd4. Passing ready into swapParagraphs fixes the body's opening line, and the "Real result" line now says the run is not ready. One gap is left, inline.

Comment thread scripts/lib/canary-issues.mjs Resolved
…in its title or comment (CORE-110, #468)

The dry-run twin reused the ready issue title, and a second forced run
commented with the ready comment, which opens also passes and has no real
result line. A run that is not ready now titles its dry run not ready,
forced to preview the ready issue, and every comment on an open dry run
opens with the same real-result line as the body.

@baldurpan baldurpan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving 95be9c6.

  • All three threads are settled. A forced dry run that is not ready no longer claims a pass in its body, title or comment.
  • Locally, the 17 canary test files pass at this head.
  • On the two earlier heads, Build & Lint and Dox gates (changed pages, Chromium) finished green.

CI on this head was still running when I approved.

@craig-o-curtis
craig-o-curtis enabled auto-merge (squash) November 6, 2026 18:42
@craig-o-curtis
craig-o-curtis merged commit 11d28c7 into main Nov 6, 2026
41 checks passed
@craig-o-curtis
craig-o-curtis deleted the 468-core-110-calendar-sweep branch November 6, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request pipes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CORE-110 — The weekly upgrade check compares each calendar's years with native Temporal

2 participants