Repository navigation
feat(canary): compare each calendar's years with native Temporal in the swap check (CORE-110, #468) - #469
Conversation
…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.
…k changeset (CORE-110, #468)
baldurpan
left a comment
There was a problem hiding this comment.
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.
…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.
|
The |
baldurpan
left a comment
There was a problem hiding this comment.
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.astrocovers 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.
…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
left a comment
There was a problem hiding this comment.
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.
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 onmain, the weekly run watches every new release.What changed
Calendar sweep.
scripts/lib/calendar-sweep.mjsis a new pure module with no imports and no I/O. It covers every calendar that bothtemporal-polyfilland 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.mjsruns 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'scalendarSweepfield. 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-polyfill1.0.8 against Node 26.12.1: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.mdholds 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 underpackages/gmtchanges, so@northguild/gmthas no release.Validation
oxfmt --checkoxlintscripts/affected.mjs)node scripts/upstream.mjs checkpnpm deps -- checkchangeset status --since=origin/mainNot run yet: a dispatch of the Temporal oracle workflow on this branch. It is the last line of #468's verification.
Commits
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.docs(canary): the workflow comment and/upstream/describe the calendar sweep; the empty changeset.docs(domination): CORE-110 Done in the tracker.