Skip to content

ci: each swizzle-proof leg runs under the Node legs' shard watchdog and checks its recorded time, and record books the slices from those legs - #11743

Merged
cixzhang merged 4 commits into
mainfrom
ci/swizzle-proof-watchdog
Nov 15, 2026

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Who this helps

Maintainers waiting on a pull request's swizzle proof. Since #11697 moved the proof's eight slices into their own swizzle-proof (n/8) legs (thanks to that change for the split), a slow or stuck slice runs into the leg's 15-minute limit and the leg ends cancelled: no failure, and no line saying which file was still running. The record of each slice's time also stopped refreshing, because record books only the Node legs' lines.

What changes

  • ci.yml swizzle-proof: the slice step runs under the shard watchdog exactly as test-node does: the same limit (a minute before the job's 15 minutes, counted from the job's start), the same reporters, and VITEST_SHARD_TIMES_FILE. A slow slice now fails before the limit and names its file.
  • A new step, "Check the recorded time of this slice": the same check test-node runs (node-time-drift.mjs --changed HEAD^1), so a pull request that changes a slice file and slows it far past its record fails there, naming both times.
  • scripts/vitest-shard-sequencer.mjs recordDurations: besides the Node legs' lines, it books lines from the swizzle-proof (n/8) legs, for the slice files only. mergeRecord already keeps the largest time seen for a slice, so the slices' entries refresh from the legs that run them.
  • Unchanged: the step does not set VITEST_SWIZZLE_PROOF_OWN_JOB, which would leave out the very file it runs.

Evidence

  • ci-swizzle-proof.test.mjs: the slice step carries every watchdog line of test-node's step (start age, limit, reporters), the same times file and job limit, the drift step and its guard, and never the setting that excludes slices.
  • vitest-shard-sequencer.test.mjs: record books slice files from swizzle-proof (n/8) lines (plain and with colour codes spelled out), and ignores any other file in that job.
  • 77 tests pass across these and ci-node-leg-bounds, ci-test-join and ci-tooling-routing. The three new cases fail on main's workflow and sequencer.
  • Room under the limit: on ci: the swizzle proof and the Node browser contracts run in their own required jobs; the Node legs split evenly #11697's own run (43583909305, affected scope) the legs took 2 min 26 s to 3 min 57 s; slice 1 ran 122 s of test after about 95 s of setup. A slice at its largest recorded time (348 s) comes to about 8 minutes, so the watchdog's 14 minutes leaves room on a slow runner.

CI impact: swizzle-proof stays on standard GitHub-hosted runners (ubuntu-latest); no job is added or removed. When the proof runs, each of its eight legs gains one short step (the drift check, a few seconds), about +0.5 job-minutes per pull-request update, and nothing when the scope is none. Runner-pool usage and concurrent jobs: no measurable change. Time to green: unchanged for a passing run; a stuck slice fails about a minute before the limit instead of being cancelled at it.

Specs

spec:AST-030 FR22 (each leg inside the fifteen-minute job budget; legs balanced by recorded test time) and FR19 (the CI impact: line above); spec:AST-110 FR7 (the swizzle proof), whose scope and width this does not change.

Overlap check

Searched open pull requests touching .github/workflows/ci.yml, scripts/vitest-shard-sequencer.mjs, scripts/vitest-shard-watchdog.mjs, .github/scripts/node-time-drift.mjs, .github/scripts/ci-swizzle-proof.test.mjs and packages/cli/test/swizzle-proof/. None touches the swizzle-proof job.

Overlap checked: #11712 (a separate change: it makes the sequencer read the record a workflow names, for the minimum-Node legs; this one adds the swizzle-proof legs' lines to recordDurations, a different function, and its own test cases)
Overlap checked: #11645 (another ci.yml job: the release check's WebKit run)
Overlap checked: #11667 (another ci.yml job: the touched-components skip step)
Overlap checked: #11639 (touches node-time-drift.mjs only, which this change calls but does not edit)
Overlap checked: #9832 (a swizzle-proof sample component, not the job)

Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the shipper, through merge-guard.

…nd checks its recorded time, and record books the slices from those legs
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 15, 2026 5:18am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 14, 2026
@astracat-bot

astracat-bot Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 15, 2026, 5:23 AM UTC

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · c0b938a

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

CI impact: 0 job-min per update · pool 0% · time to green +7.3 min · standard runners · 1 CI action or script file changed (not measured) ⚠️
Before After Change
Job-minutes per PR update 173.3 173.3 0
Runner pool, runner-minutes a day 69,333 69,333 0 (0%)
Average concurrent jobs 48.1 48.1 0
Time to green (median → this run) 22.3 min 29.6 min +7.3 min
Runs a day 400 400 0

Changed jobs: swizzle-proof changed: standard

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/ci-swizzle-proof.test.mjs.

Flags: time to green +7.3 min.

Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot 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.

Approved pending CI: CI has not run on this head yet because the pull request is a draft, so mark it ready for review to run it.

Each swizzle-proof leg now carries the Node legs' watchdog lines exactly, the drift step mirrors test-node's, and record books only slice files from those legs; the changed tests fail against main and pass here. One thing to weigh later: a swizzle-proof leg measures a single file, so its drift check has no baseline and judges an edited slice against its record without factoring out a slow runner.

Claims and files checked
  • Claim: since the proof moved into its own legs, a stuck slice reaches the 15-minute limit and the leg is cancelled with no file named. Verified: the base slice step ran with no watchdog under the 15-minute limit.
  • Claim: the slices' recorded times stopped refreshing because record booked only Node-leg lines. Verified for pull-request run logs, since recordDurations skipped every other job and pull-request Node legs leave the slices out; Main's Node legs still run them.
  • Claim: the slice step uses the Node legs' limit, start-age count, reporters and times file. Verified: ci.yml:1421-1428 matches :1204 and :1208-1211, and the new test asserts it.
  • Claim: a slow slice now fails before the limit and names its file. Verified: the watchdog reporter's stop path and its tests.
  • Claim: the new drift step is the same check test-node runs. Verified: ci.yml:1432-1434 against :1237-1239.
  • Claim: record books swizzle-proof leg lines for slice files only. Verified: vitest-shard-sequencer.mjs:92-96 and the new test.
  • Claim: mergeRecord already keeps a slice's largest time. Verified: vitest-shard-sequencer.mjs:155-158.
  • Claim: the step does not set the setting that leaves the slices out. Verified: the step has no such variable, and vitest.config.ts:272-273 shows it would exclude them.
  • Claim: the named test files pass and the new cases fail on main. Verified: all pass at this head; the two new cases and the rewritten one fail against main's workflow and sequencer.
  • Claim: on #11697's run the legs took 2 min 26 s to 3 min 57 s, so a slice at its 348 s record ends near 8 minutes. Verified from that run's job timings.
  • Claim: the CI impact is one short step per leg on standard runners, with no job added or removed. Verified against the diff.
  • Claim: #11712 changes a different part of the sequencer. Verified: its hunks choose the record file and leave recordDurations alone.
  • File: .github/workflows/ci.yml: clear.
  • File: scripts/vitest-shard-sequencer.mjs: clear.
  • File: .github/scripts/ci-swizzle-proof.test.mjs: clear.
  • File: scripts/vitest-shard-sequencer.test.mjs: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot 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.

Approved pending CI: CI has not run on this head yet because the pull request is a draft, so mark it ready for review to run it.

The merge of main leaves this change's own lines as they were: each swizzle-proof leg still carries the Node legs' watchdog lines exactly, the drift step mirrors test-node's, and record books only slice files from those legs; the changed tests fail against main and pass on this head. One thing to weigh later: a swizzle-proof leg measures a single file, so its drift check has no baseline and judges an edited slice against its record without factoring out a slow runner.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: since the proof moved into its own legs, a stuck slice reaches the 15-minute limit and the leg is cancelled with no file named. Verified: on main the slice step runs with no watchdog under the 15-minute limit.
  • Claim: the slices' recorded times stopped refreshing because record booked only Node-leg lines. Verified for pull-request run logs, the record's documented source, since recordDurations skipped every other job and pull-request Node legs leave the slices out.
  • Claim: the slice step uses the Node legs' limit, start-age count, reporters and times file. Verified: ci.yml:1518-1523 matches :1300 and :1304-1307, and the new test asserts it.
  • Claim: a slow slice now fails before the limit and names its file. Verified: the watchdog reporter's stop path and its tests.
  • Claim: the new drift step is the same check test-node runs. Verified: ci.yml:1528-1530 against :1333-1335.
  • Claim: record books swizzle-proof leg lines for slice files only. Verified: vitest-shard-sequencer.mjs:92-96 and the new test.
  • Claim: mergeRecord already keeps a slice's largest time. Verified: vitest-shard-sequencer.mjs:155-158.
  • Claim: the step does not set the setting that leaves the slices out. Verified: the step has no such variable, and vitest.config.ts:272-274 shows it would exclude them.
  • Claim: the shape test checks the watchdog lines, times file, job limit, drift step and its guard, and never the excluding setting. Verified: ci-swizzle-proof.test.mjs:32-75.
  • Claim: the sequencer test books slice files from swizzle-proof lines, plain and with spelled-out colour codes, and ignores other files there. Verified: vitest-shard-sequencer.test.mjs:364-377.
  • Claim: the named test files pass and the new cases fail on main. Verified: all pass on this head; the two new cases and the rewritten one fail against main's workflow and sequencer.
  • Claim: on #11697's run the legs took 2 min 26 s to 3 min 57 s, so a slice at its 348 s record ends near 8 minutes. Verified from that run's job timings.
  • Claim: the CI impact is one short step per leg on standard runners, with no job added or removed. Verified against the diff.
  • Claim: the listed overlapping pull requests change other parts. Verified: #11712 chooses the record file and leaves recordDurations alone; the later change to the swizzle-proof job's width has merged cleanly.
  • File: .github/workflows/ci.yml: clear.
  • File: scripts/vitest-shard-sequencer.mjs: clear.
  • File: .github/scripts/ci-swizzle-proof.test.mjs: clear.
  • File: scripts/vitest-shard-sequencer.test.mjs: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot 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.

Approved pending CI: CI has not run on this head yet because the pull request is a draft, so mark it ready for review to run it.

Each swizzle-proof leg now carries the Node legs' watchdog lines exactly, the drift step mirrors test-node's, and record books only slice files from those legs; the changed tests fail against main and pass on this head. One thing to weigh later: the four watchdog lines now live in two jobs, pinned together by ci-swizzle-proof.test.mjs, so a shared script would remove the copy.

Claims and files checked

Review mode: full; reason: merge-touches-pr-files

  • Claim: since the proof moved into its own legs, a slow or stuck slice reaches the 15-minute limit and the leg ends cancelled with no file named. Verified: on main the slice step runs a bare pnpm test:node with no watchdog under timeout-minutes: 15.
  • Claim: the slices' recorded times stopped refreshing because record booked only Node-leg lines. Verified for pull-request run logs, the record's documented source: recordDurations skipped every other job and pull-request Node legs leave the slices out; Main's Node legs still run them.
  • Claim: the slice step uses test-node's limit, start-age count, reporters and times file. Verified: ci.yml:1571-1576 matches :1343 and :1347-1350, and the new test asserts it.
  • Claim: a slow slice now fails before the limit and names its file. Verified: the watchdog reporter's stop path (vitest-shard-watchdog.mjs:87-106) and its tests.
  • Claim: the new drift step is the same check test-node runs. Verified: ci.yml:1581-1583 against :1376-1378.
  • Claim: record books swizzle-proof leg lines for slice files only. Verified: vitest-shard-sequencer.mjs:80-84 and the new test.
  • Claim: mergeRecord already keeps a slice's largest time. Verified: vitest-shard-sequencer.mjs:136-147.
  • Claim: the step does not set the setting that leaves the slices out. Verified: the step sets no such variable, and vitest.config.ts:259-261 shows it would exclude them.
  • Claim: the shape test checks the watchdog lines, times file, job limit, drift step and its guard, and never the excluding setting. Verified: ci-swizzle-proof.test.mjs:32-75.
  • Claim: the sequencer test books slice files from swizzle-proof lines, plain and with spelled-out colour codes, and ignores other files there. Verified: vitest-shard-sequencer.test.mjs:357-370.
  • Claim: 77 tests pass across the five named test files, and the three new cases fail on main. Verified: all 77 pass on this head; the two new cases and the rewritten one fail against main's workflow and sequencer.
  • Claim: on the run that split the proof out, the legs took 2 min 26 s to 3 min 57 s, so a slice at its 348 s record ends near 8 minutes. Verified from that run's job timings, with each slice step starting 60 to 89 s into its job.
  • Claim: the CI impact is one short step per leg on standard runners, with no job added or removed. Verified against the diff.
  • Claim: the governing claims are the CI routing record's job budget and CI-impact requirements and the swizzle proof's before-merge requirement, whose scope and width this does not change. Verified: the scope script and the eight-leg matrix are unchanged.
  • Claim: the listed overlapping pull requests change other parts. Verified: the open sequencer change edits the record choice and a different function, and moves the slice pattern into a shared module it imports back, so this change's reference keeps resolving.
  • File: .github/workflows/ci.yml: clear.
  • File: scripts/vitest-shard-sequencer.mjs: clear.
  • File: .github/scripts/ci-swizzle-proof.test.mjs: clear.
  • File: scripts/vitest-shard-sequencer.test.mjs: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot 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.

Approved pending CI: CI has not run on this head yet because the pull request is a draft, so mark it ready for review to run it.

The merge of main leaves this change's own lines as they were: each swizzle-proof leg carries the Node legs' watchdog lines exactly, the drift step mirrors test-node's, and record books only slice files from those legs, now through the slice pattern main moved into scripts/lib/duration-split.mjs. The changed tests fail against main and pass on this head. One thing to weigh later: the four watchdog lines live in two jobs, pinned together by ci-swizzle-proof.test.mjs, so a shared script would remove the copy.

Claims and files checked

Review mode: full; reason: merge-touches-pr-files

  • Claim: since the proof moved into its own legs, a slow or stuck slice reaches the 15-minute limit and the leg ends cancelled with no file named. Verified: on main the slice step runs a bare pnpm test:node with no watchdog under timeout-minutes: 15.
  • Claim: the slices' recorded times stopped refreshing because record booked only Node-leg lines. Verified for pull-request run logs, the record's documented source: recordDurations skipped every other job and pull-request Node legs leave the slices out; Main's Node legs still run them.
  • Claim: the slice step uses test-node's limit, start-age count, reporters and times file. Verified: ci.yml:1571-1576 matches :1343 and :1347-1350, and the new test asserts it.
  • Claim: a slow slice now fails before the limit and names its file. Verified: the watchdog reporter's stop path (vitest-shard-watchdog.mjs:86-106) and its tests.
  • Claim: the new drift step is the same check test-node runs. Verified: ci.yml:1581-1583 against :1376-1378.
  • Claim: record books swizzle-proof leg lines for slice files only. Verified: vitest-shard-sequencer.mjs:106-110 and the new test.
  • Claim: mergeRecord already keeps a slice's largest time. Verified: scripts/lib/duration-split.mjs:162-169, which the sequencer's mergeRecord calls.
  • Claim: the step does not set the setting that leaves the slices out. Verified: the step sets no such variable, and vitest.config.ts:259-261 shows it would exclude them.
  • Claim: the shape test checks the watchdog lines, times file, job limit, drift step and its guard, and never the excluding setting. Verified: ci-swizzle-proof.test.mjs:32-75.
  • Claim: the sequencer test books slice files from swizzle-proof lines, plain and with spelled-out colour codes, and ignores other files there. Verified: vitest-shard-sequencer.test.mjs:374-387.
  • Claim: 77 tests pass across the five named test files, and the three new cases fail on main. Verified with a newer count: the merge of main added one sequencer case, so all 78 pass on this head; the two new cases and the rewritten one fail against main's workflow and sequencer.
  • Claim: on the run that split the proof out, the legs took 2 min 26 s to 3 min 57 s, so a slice at its 348 s record ends near 8 minutes. Verified from that run's job timings (146 s to 237 s, each slice step starting 60 to 89 s into its job) and the record's largest slice entry.
  • Claim: the CI impact is one short step per leg on standard runners, with no job added or removed. Verified against the diff.
  • Claim: the governing claims are the CI routing record's job budget and CI-impact requirements and the swizzle proof's before-merge requirement, whose scope and width this does not change. Verified: the scope script and the eight-leg matrix are unchanged.
  • Claim: the listed overlapping pull requests change other parts. Verified: the sequencer change, since merged, changed the record choice and moved the slice pattern into a shared module the sequencer imports, so this change's reference resolves; the two other workflow changes, since merged, touch other jobs; the drift-script change touches only that script and its test; the sample-component change touches only a proof sample.
  • File: .github/workflows/ci.yml: clear.
  • File: scripts/vitest-shard-sequencer.mjs: clear.
  • File: .github/scripts/ci-swizzle-proof.test.mjs: clear.
  • File: scripts/vitest-shard-sequencer.test.mjs: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 15, 2026 05:56
@cixzhang
cixzhang merged commit 67ecef1 into main Nov 15, 2026
138 checks passed
@github-actions
github-actions Bot deleted the ci/swizzle-proof-watchdog branch November 16, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — c0b938a3 Deployed Nov 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant