An open source design system that's fully customizable and agent ready
TypeScript
ci: main's release-check every three hours, plus one before each weekday cut (AST-030 FR24) (#9216)
Cindy Zhangc3cbf38b4215
diff --git a/.github/scripts/ci-heavy-lanes.test.mjs b/.github/scripts/ci-heavy-lanes.test.mjsindex c882dde53a..e0b4a7a100 100644--- a/.github/scripts/ci-heavy-lanes.test.mjs+++ b/.github/scripts/ci-heavy-lanes.test.mjs@@ -182,8 +182,10 @@ describe("main's release-check and full unit run, about once an hour (DEC-11, FR});const sha = 'a'.repeat(40);+ // A Saturday, so no pre-cut check is due.const NOW = Date.parse('2026-10-31T12:00:00Z');- const minutesAgo = minutes => new Date(NOW - minutes * 60000).toISOString();+ const minutesAgo = (minutes, now = NOW) =>+ new Date(now - minutes * 60000).toISOString();// A unit run that names main's tip, as the scheduler dispatches it (FR21).const unitAt = (minutes, overrides = {}) =>check(minutes, {@@ -215,6 +217,7 @@ describe("main's release-check and full unit run, about once an hour (DEC-11, FRissue,eventName = 'push',into = {},+ now = NOW,} = {}) {const calls = Object.assign(into, {dispatch: [],@@ -270,7 +273,11 @@ describe("main's release-check and full unit run, about once an hour (DEC-11, FR'Date',`return (async () => {${script}})();`,);- const FakeDate = {now: () => NOW, parse: Date.parse};+ class FakeDate extends Date {+ static now() {+ return now;+ }+ }await body(github,{repo: {owner: 'meta', repo: 'astryx'}, eventName},@@ -305,9 +312,9 @@ describe("main's release-check and full unit run, about once an hour (DEC-11, FR});const unitRun = unitRunOf(sha);- it("dispatches a release-check and a full unit run for main's tip when neither started in the last 55 minutes", async () => {+ it("dispatches a release-check and a full unit run for main's tip when their windows have passed", async () => {const calls = await run({- runs: [check(56), check(200)],+ runs: [check(176), check(400)],units: [check(56)],});expect(calls.dispatch).toEqual([releaseCheck(sha), unitRun]);@@ -329,22 +336,86 @@ describe("main's release-check and full unit run, about once an hour (DEC-11, FRexpect((await run()).dispatch).toEqual([releaseCheck(sha), unitRun]);});- it('leaves a push within 55 minutes of the last checks to the next one', async () => {- const calls = await run({runs: [check(20)], units: [check(20)]});+ it('leaves a push inside a window to the next check', async () => {+ const calls = await run({runs: [check(170)], units: [check(20)]});expect(calls.dispatch).toEqual([]);expect(calls.notices).toEqual([- 'A release-check started 20 minutes ago; the next one, at most 50 minutes from now, covers aaaaaaa.',+ 'A release-check started 170 minutes ago; the next one, at most 20 minutes from now, covers aaaaaaa.','A full unit run started 20 minutes ago; the next one, at most 50 minutes from now, covers aaaaaaa.',]);});+ it('runs the unit lane hourly on its own while the release-check waits out its three hours', async () => {+ const calls = await run({runs: [check(120)], units: [check(60)]});+ expect(calls.dispatch).toEqual([unitRun]);+ });++ describe('the pre-cut release-check (FR24)', () => {+ // Monday 2026-11-02 06:37 PST (UTC-8) and Friday 2026-10-30 06:37 PDT.+ const MONDAY_0637 = Date.parse('2026-11-02T14:37:00Z');+ const FRIDAY_0637 = Date.parse('2026-10-30T13:37:00Z');+ const at = (now, minutes, overrides = {}) =>+ check(minutes, {created_at: minutesAgo(minutes, now), ...overrides});++ it.each([+ ['standard time', MONDAY_0637],+ ['daylight time', FRIDAY_0637],+ ])(+ 'starts at about 06:30 Pacific on a weekday, inside the window (%s)',+ async (_, now) => {+ const calls = await run({+ now,+ runs: [at(now, 90)],+ units: [at(now, 20)],+ });+ expect(calls.dispatch).toEqual([releaseCheck(sha), unitRun]);+ expect(calls.notices).toContain(+ 'The pre-cut release-check runs now for aaaaaaa.',+ );+ },+ );++ it('starts once a day', async () => {+ // One started at 06:32 today.+ const calls = await run({+ now: MONDAY_0637,+ runs: [at(MONDAY_0637, 5)],+ units: [at(MONDAY_0637, 5)],+ });+ expect(calls.dispatch).toEqual([]);+ });++ it('is not needed when the tip already has a check', async () => {+ const calls = await run({+ now: MONDAY_0637,+ runs: [at(MONDAY_0637, 90, {head_sha: sha})],+ units: [+ at(MONDAY_0637, 20, {+ head_sha: sha,+ display_title: `Main validation of ${sha}`,+ }),+ ],+ });+ expect(calls.dispatch).toEqual([]);+ });++ it.each([+ ['on a weekend morning', Date.parse('2026-11-01T14:37:00Z')],+ ['before 06:30', Date.parse('2026-11-02T14:15:00Z')],+ ['after 07:30', Date.parse('2026-11-02T15:45:00Z')],+ ])('does not start %s', async (_, now) => {+ const calls = await run({now, runs: [at(now, 90)], units: [at(now, 20)]});+ expect(calls.dispatch).toEqual([]);+ });+ });+it('always brings a unit run of the commit a release-check checks', async () => {// The unit lane is inside its window, but the tip has no unit run.- const calls = await run({runs: [check(60)], units: [check(30)]});+ const calls = await run({runs: [check(180)], units: [check(30)]});expect(calls.dispatch).toEqual([releaseCheck(sha), unitRun]);// A unit run already at the tip is enough.const covered = await run({- runs: [check(60)],+ runs: [check(180)],units: [unitAt(30)],});expect(covered.dispatch).toEqual([releaseCheck(sha)]);@@ -465,7 +536,7 @@ describe("main's release-check and full unit run, about once an hour (DEC-11, FRjobs: [{name: 'release-authority', conclusion: 'failure'}],});expect(- (await run({runs: [mismatched(70)], units: [unitAt(70)]})).dispatch,+ (await run({runs: [mismatched(180)], units: [unitAt(70)]})).dispatch,).toEqual([releaseCheck(sha)]);// ...but it still holds the window.expect(@@ -491,7 +562,7 @@ describe("main's release-check and full unit run, about once an hour (DEC-11, FRconst calls = await run({tip,eventName: 'schedule',- runs: [check(60)],+ runs: [check(180)],units: [check(60)],});expect(calls.dispatch).toEqual([releaseCheck(tip), unitRunOf(tip)]);diff --git a/.github/scripts/rtl-scorecard-summary.mjs b/.github/scripts/rtl-scorecard-summary.mjsindex f1cb9c80ae..117b42cf44 100644--- a/.github/scripts/rtl-scorecard-summary.mjs+++ b/.github/scripts/rtl-scorecard-summary.mjs@@ -29,7 +29,7 @@ const markdownCell = value =>const lines = ['## RTL semantic audit','',- `Audit scope: **${scope}**. The unfiltered sweep runs for release-check on main about hourly and before a release cut.`,+ `Audit scope: **${scope}**. The unfiltered sweep runs for release-check on main every three hours and before each release cut.`,'','Relationship-based (LTR vs RTL in the same run) — no golden screenshots. **Soft-gated** pending a stability window.','',diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 932ca55b29..78a04e22f5 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -61,7 +61,8 @@ permissions: {}# Visual, accessibility and RTL owners (pr-a11y*, visual-scout, pr-visual,# pr-rtl*) do not run on pull request updates: they run for release-check,# which the Main heavy lanes workflow (main-heavy-lanes.yml) dispatches for-# main's tip about once an hour and the release gate dispatches before a cut. A pull request+# main's tip every three hours and before each weekday cut, and the release+# gate dispatches before a cut. A pull request# opts into one suite with its label, `ci:run-visual`, `ci:run-a11y` or# `ci:run-rtl`, applied by someone with write access (add the label, then push# or close and reopen); run-labels decides. A main failure is fixed forward@@ -2850,7 +2851,7 @@ jobs:# eight browser pages on its four cores (the audit waits on page loads), and# the stable pr-rtl join requires all five scope manifests plus a report from# every applicable package.- # The full-roster sweep is the release-check run on main about hourly.+ # The full-roster sweep is the release-check run on main every three hours.## Three auto dimensions: D1 icon-mirror, D5 positional-mirror, and D6# contextual directional decorations. Curated D2/D3/D4/D7/D8/D9 adddiff --git a/.github/workflows/main-heavy-lanes.yml b/.github/workflows/main-heavy-lanes.ymlindex b86b8667a0..db8336937e 100644--- a/.github/workflows/main-heavy-lanes.yml+++ b/.github/workflows/main-heavy-lanes.yml@@ -1,16 +1,17 @@# Copyright (c) Meta Platforms, Inc. and affiliates.-# Main's scheduled checks (spec:AST-030 FR12, FR21, DEC-11, DEC-15). This-# workflow dispatches, for main's tip and about once an hour each:+# Main's scheduled checks (spec:AST-030 FR12, FR21, FR24, DEC-11, DEC-15,+# DEC-19). This workflow dispatches, for main's tip:#-# - ci.yml's canonical release-check: main's visual/a11y/RTL result, fixed-# forward on failure (DEC-7, DEC-11);-# - deploy.yml's full unit run: every unit suite of every package, on that-# exact commit, never cancelled by a push (FR21).+# - ci.yml's canonical release-check, about every three hours and once each+# weekday at about 06:30 Pacific, before the 08:00 release cut: main's+# visual/a11y/RTL result, fixed forward on failure (DEC-7, FR24);+# - deploy.yml's full unit run, about hourly: every unit suite of every+# package, on that exact commit, never cancelled by a push (FR21).## A check covers every merge up to its commit. A push dispatches at once when-# none started in the last 55 minutes, and a quarter-hourly schedule picks up-# the tip a burst of merges left unchecked. A release-check always brings a+# its lane's window has passed, and a quarter-hourly schedule picks up the tip+# a burst of merges left unchecked. A release-check always brings a# unit run of the same commit, so a release cut has both. A unit run that did# not complete is run again at once, and the guardian's issue says so. Main's# fast checks (deploy.yml typecheck, build and export sync) still run for@@ -69,9 +70,10 @@ jobs:);helperModule.exports.installRateLimitBackoff({github, core});}- // A check starts at most once in this window; the schedule's- // quarter-hour cadence adds up to 15 minutes to it.- const WINDOW_MINUTES = 55;+ // Each lane starts at most once in its window; the schedule's+ // quarter-hour cadence adds up to 15 minutes to it (FR24, FR21).+ const HEAVY_WINDOW_MINUTES = 175;+ const UNIT_WINDOW_MINUTES = 55;const BOT = 'github-actions[bot]';const {data: branch} = await github.rest.repos.getBranch({...context.repo, branch: 'main'});const tip = branch.commit.sha;@@ -122,7 +124,7 @@ jobs:}return false;};- const due = async (runs, label, checkAuthority, coverRuns = runs) => {+ const due = async (runs, label, WINDOW_MINUTES, checkAuthority, coverRuns = runs) => {const counted = runs.filter(run => run.conclusion !== 'cancelled');if (await covered(coverRuns, checkAuthority)) {core.notice(`main's tip ${short} already has a ${label}.`);@@ -140,9 +142,35 @@ jobs:const allUnits = await dispatchedRuns('deploy.yml');const checks = byBot(allChecks);const units = byBot(allUnits);- const heavy = await due(checks, 'release-check', true);+ let heavy = await due(checks, 'release-check', HEAVY_WINDOW_MINUTES, true);// A person's run of main's tip covers it too.- let unit = await due(units, 'full unit run', false, allUnits);+ let unit = await due(units, 'full unit run', UNIT_WINDOW_MINUTES, false, allUnits);++ // The weekday release cut is at 08:00 Pacific: one release-check+ // starts at about 06:30, whatever the window, so it finishes about+ // an hour before the cut (FR24). It is dispatched once a day, for+ // the tip unless the tip already has a check.+ const pacificParts = when => Object.fromEntries(+ new Intl.DateTimeFormat('en-US', {+ timeZone: 'America/Los_Angeles', weekday: 'short', hour: 'numeric', minute: 'numeric', hourCycle: 'h23',+ year: 'numeric', month: '2-digit', day: '2-digit',+ }).formatToParts(new Date(when)).map(part => [part.type, part.value]),+ );+ const pacific = pacificParts(Date.now());+ const dayOf = parts => `${parts.year}-${parts.month}-${parts.day}`;+ const minuteOf = parts => Number(parts.hour) * 60 + Number(parts.minute);+ const PRE_CUT = 6 * 60 + 30;+ if (!heavy && !['Sat', 'Sun'].includes(pacific.weekday) && minuteOf(pacific) >= PRE_CUT && minuteOf(pacific) < PRE_CUT + 60) {+ const startedToday = checks.some(run => {+ if (run.conclusion === 'cancelled') return false;+ const parts = pacificParts(Date.parse(run.created_at));+ return dayOf(parts) === dayOf(pacific) && minuteOf(parts) >= PRE_CUT;+ });+ if (!startedToday && !(await covered(checks, true))) {+ core.notice(`The pre-cut release-check runs now for ${short}.`);+ heavy = true;+ }+ }// A full unit run that did not complete (FR21): run the next one at// once and tell the guardian, after the dispatches below. A newerdiff --git a/docs/architecture/rtl-audit-evidence.md b/docs/architecture/rtl-audit-evidence.mdindex 3c3aef00b9..ffd8c6a9e0 100644--- a/docs/architecture/rtl-audit-evidence.md+++ b/docs/architecture/rtl-audit-evidence.md@@ -288,7 +288,8 @@ component/composition contract; absent or invalid dimensions produce an error.report completeness and exclusion visibility remain requirements, not authorityto suppress findings.- `.github/workflows/ci.yml` release-check — the full-roster audit on main's tip- about hourly and before a release cut (`spec:AST-030` DEC-11).+ every three hours and before each weekday release cut (`spec:AST-030`+ DEC-19).- `internal/eslint-plugin-astryx/no-physical-properties.js` — source-provablephysical/logical declaration constraints.- `design:bidirectionality` — human product intent, owned separately.diff --git a/docs/specs/AST-030/spec.md b/docs/specs/AST-030/spec.mdindex 1c4af52bc8..8fa3abb221 100644--- a/docs/specs/AST-030/spec.md+++ b/docs/specs/AST-030/spec.md@@ -237,7 +237,8 @@ they are separately named.existing finding policies. Main's heavy-lane workflow MUST dispatch thatrelease-check for `main`'s tip, bound to that commit, on a push to `main` andon a quarter-hourly schedule, unless the tip already has one or one was- dispatched in the last 55 minutes (DEC-11). A check replaced while waiting,+ dispatched in the last 175 minutes, so the quarter-hourly tick after+ three hours dispatches (DEC-11, FR24). A check replaced while waiting,which never ran, does not count. A check covers every merge up to its commit,so every merge is covered by the next one. The dispatched checks share oneconcurrency group that cancels a running check only for a release re-check@@ -454,6 +455,15 @@ they are separately named.latest re-check runs. A run whose re-run passes is a full passing check ofthat commit. A fix is a new commit and gets a full re-check.+- **FR24 — Main's release-check runs every three hours, and once before each+ weekday cut.** FR12's release-check of `main`'s tip is dispatched when none+ started in the last 175 minutes, so about every three hours on the+ quarter-hourly schedule, and once each weekday at about 06:30 Pacific time+ whatever the window, unless the tip already has one, so a check finishes+ about an hour before the 08:00 release cut. The full unit run keeps its own+ hourly schedule (FR21), and the release cut's own exact-commit checks are+ unchanged (DEC-19).+### Platform support- Supported feature/engine floor: GitHub pull-request and merge-group workflows@@ -511,6 +521,7 @@ The nightly perf lane is the one scheduled measurement outside them (FR18).| FR21 | `ci-heavy-lanes.test.mjs` dispatch cases, `main-unit-run.test.mjs` over deploy.yml, `release-check-receipt.test.mjs` | push run; dispatched unit run; tip with the scheduler's or a person's release-check, or a person's maintenance capture; unit run cancelled, skipped or timed out; newer recheck or person's run of the tip; a person's validation of an older commit; cut commit with and without a passing unit run | a push runs the unit suites, a push cancels a unit run, a release-check comes without a unit run of its commit, an incomplete run goes unreported or waits a window, or a cut publishes without a passing unit run || FR22 | `main-validation-workflow.test.mjs` over the Main workflow and its commit resolver; `vitest-shard-sequencer.test.mjs` over the recorded Node times | six UI and six Node legs; dispatch without a commit, with a commit in main's history, with a commit outside it and with a malformed one; a re-check from the workflow token and from a person, and one that names `sha`; a `sha` before the size records, and one of only spaces; four and six Node legs over the recorded suite, a file with no recorded time, a project other than `node` | a hold, a leg past the fifteen-minute budget, a commit outside main's history that validates, a person's dispatch or a person's `sha` run that cancels or replaces a validation of main, a `sha` lane that checks out another commit, or a `sha` run named for main's tip, or two of the slowest Node files in one leg, a file run by no leg or by two, or a split that depends on collection order fails || FR23 | `release-check-shape.test.mjs`, `a11y-contract-shard.test.mjs` and the release-check workflow contract | release-check and pull-request legs; a contract file longer than a leg's share, one it cannot name exactly, and a serial one; the recorded suite; a re-check from an admin, a maintainer and a writer, from another branch, with a short SHA and with an older commit; failed-only beside a passed, a running and a missing run | a narrower release-check, a held or over-budget leg, a test selected by no leg or by two, a re-check that a writer can start, that waits for main's running check, or that re-runs jobs of another commit fails |+| FR24 | `ci-heavy-lanes.test.mjs` cadence cases | release-check 170 and 176 minutes old; the unit lane hourly beside it; weekday 06:37 Pacific inside the window in standard and daylight time; the pre-cut check already started; the tip already checked; a weekend morning; before 06:30 and after 07:30 | a release-check starts inside the 175-minute window, the pre-cut check is skipped or starts twice, or it runs on a weekend |## Decision log@@ -724,6 +735,8 @@ Rejected: measuring on every pull request (noise and runner time for a signal th**Reference:** `spec:AST-030/DEC-11`**Decider:** `cixzhang`+**Superseded in part by:** `spec:AST-030/DEC-19` (every three hours, with a+pre-cut check)Dispatched on every push, main's release-check ran back to back through busyhours, about 65 full runs a day of roughly 165 runner-minutes each. A check@@ -856,6 +869,23 @@ Rejected: a separate lane for re-checks (`main` would run two full checks atonce and need room for both); re-running only failed legs after a fix (a fix canbreak a leg that passed before).+### DEC-19 — Main's release-check every three hours, with a pre-cut run++**Reference:** `spec:AST-030/DEC-19`+**Decider:** `cixzhang`++Main's visual, accessibility and RTL check is its longest run. Checked about+hourly, it still ran about twenty times a day, though a check covers every+merge before it and the guardian repairs `main` forward. Every three hours+keeps every merge covered with about a third of the runs. The weekday cut+needs a fresh check, so one starts at about 06:30 Pacific and finishes about+an hour before the 08:00 cut. A visual, accessibility or RTL break is then+reported within about three and a half hours of landing. The full unit run+keeps its own hourly schedule (FR21).++Rejected: a check only at the cut (main's result would lag a whole day);+keeping it hourly (the run is the largest share of main's runner use).+## Open questionsNone.