Skip to content

ci: Main's Node legs name the files still running near the limit, without failing the leg - #12263

Merged
cixzhang merged 4 commits into
mainfrom
ci/main-node-watchdog-name-only
Nov 17, 2026
Merged

cixzhang merged 4 commits into
mainfrom
ci/main-node-watchdog-name-only

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Who this helps

Everyone reading a cancelled main unit run. Main's Node legs run with no watchdog, so a leg that reaches the fifteen-minute limit leaves a cut-off log that does not say which test files were still running. Pull-request legs have a watchdog that names them, but it ends the leg with exit 1. On main that would turn an overrun into a failure, which main-heavy-lanes.yml counts as the tip's tested run. The overrun would then skip AST-030 FR21's handling: dispatch the next run at once, and report it in the "did not complete" issue.

What changes

  • scripts/vitest-shard-watchdog.mjs: a name-only mode, VITEST_SHARD_WATCHDOG_NAME_ONLY=1. When the watchdog fires it prints the same list of files still running, with a ::warning title=Node shard near its limit:: annotation, and lets the run go on. The job's time limit still cancels the leg, so the run ends cancelled. Without the variable the watchdog behaves exactly as before: ::error title=Node shard stuck:: and exit 1, as ci.yml and cli-minimum-node.yml use it.
  • .github/workflows/deploy.yml, test-node: the test step runs the watchdog in name-only mode, timed as on a pull request: a minute before the job's fifteen-minute limit, counted from the job's start.

Evidence

  • vitest-shard-watchdog.test.mjs, two new cases:
    • Name-only, with a file that never finishes: the run outlives the watchdog and is ended by the outer limit (ETIMEDOUT, signal exit), never by exit 1. The output names the hanging file under "Test files still running" with the warning, and has no ::error.
    • Name-only, with a file that finishes after the warning: the run passes, so the warning alone never fails a leg.
  • main-validation-workflow.test.mjs, a new case: test-node's step sets VITEST_SHARD_WATCHDOG_SECONDS from the job's start, runs the watchdog reporter with VITEST_SHARD_WATCHDOG_NAME_ONLY: '1', and keeps the fifteen-minute limit; its script is shell only (bash -n passes, and no KEY: value line slipped in from env:); and main-heavy-lanes.yml's INCOMPLETE list includes cancelled, so a limit-cancelled unit run is run again and reported.
  • Results:
    • With main's watchdog and deploy.yml, all three new cases fail.
    • With the change, 123 of 123 pass across vitest-shard-watchdog, main-validation-workflow, ci-test-routing, workflow-paths and main-unit-run.
    • The existing watchdog cases (exit 1 and ::error without the variable) still pass. prettier and actionlint pass.

CI impact: Main's unit run only. Its Node legs gain the watchdog reporter (no time cost) and, near the limit, a warning that names the running files. A leg that overruns still ends cancelled. Pull-request legs are unchanged.

Overlap checked: #12129, #11921 (#12256 is merged, and main is merged here: test-node's step keeps its stand-in drawing and gains this watchdog. #12129, josephfarina's recorded Node test inputs, changes the same step's test command, so whichever lands second keeps both. #11921 adds an early-warning step to test-node, other lines)

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

…hout failing the leg

The shard watchdog gains a name-only mode (VITEST_SHARD_WATCHDOG_NAME_ONLY=1): it prints the running files as a warning and lets the job limit cancel the leg, so a Main overrun stays incomplete for main-heavy-lanes (AST-030 FR21). Main's test-node legs run it, timed as on a pull request.
@vercel

vercel Bot commented Nov 17, 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 17, 2026 1:13pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 17, 2026, 1:24 PM UTC

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

Copy link
Copy Markdown
Contributor Author

/approve-spec 225bf22

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 8f1a551

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 +6.8 min · standard runners · 1 other workflow changed (not measured) · 1 CI action or script file changed (not measured) ⚠️
Before After Change
Job-minutes per PR update 182 182 0
Runner pool, runner-minutes a day 63,754 63,754 0 (0%)
Average concurrent jobs 44.3 44.3 0
Time to green (median → this run) 45.4 min 52.3 min +6.8 min
Runs a day 350 350 0

Other workflows: deploy.yml changed: runs on push, workflow_dispatch; standard runners; its minutes are not measured here

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/main-validation-workflow.test.mjs.

Flags: time to green +6.8 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.

Changes requested: one blocking fix in the Main workflow.

  • In .github/workflows/deploy.yml (lines 345-347), the new run: | block takes in the old comment and THEME_EDIT_REAL_RENDERS: '1', so every Main Node leg loses that variable and then exits 127 (THEME_EDIT_REAL_RENDERS:: command not found) after its tests pass, which fails every full unit run; move those three lines back under env:.

The name-only watchdog itself works as described: its new cases fail on main and pass here, and pull-request legs keep the failing watchdog. An assertion in main-validation-workflow.test.mjs that the step's env still holds THEME_EDIT_REAL_RENDERS would stop this from passing again.

Claims and files checked

Review mode: same-head; reason: none

  • Claims
    • Name-only mode prints the running files with a warning annotation and lets the run go on: verified (scripts/vitest-shard-watchdog.mjs:100-114, two new tests).
    • Without the variable the watchdog still prints the error and exits 1, and the pull-request and minimum-Node workflows do not set it: verified (:109, :114, existing tests, workflow grep).
    • Main's test-node step runs name-only mode, timed a minute before the 15-minute limit from job start, as on pull requests: verified (deploy.yml:339-344 matches ci.yml:1373-1375).
    • The job limit still cancels an overrunning leg, so the run ends cancelled: verified for the overrun path (limit unchanged; the reporter no longer exits).
    • The scheduler's incomplete list includes cancelled, so a limit-cancelled run is run again and reported: verified (main-heavy-lanes.yml:191).
    • All three new cases fail on main: verified (base tree with the new tests: exactly those three fail).
    • 123 of 123 pass across the five named test files, and the existing watchdog cases still pass: verified.
    • Prettier passes: verified; actionlint passes: not verified (Lint did not run on this draft head).
    • Main's Node legs gain only the reporter, and a leg fails only on its tests (title: "without failing the leg"): false at this head, because deploy.yml:345-347 makes every leg exit 127 and drops the theme-editor variable.
    • Pull-request legs are unchanged: verified (ci.yml untouched).
    • The three overlapping pull requests touch the same step as described: verified from their patches.
  • Files
    • .github/workflows/deploy.yml: blocking finding above.
    • scripts/vitest-shard-watchdog.mjs: clear.
    • scripts/vitest-shard-watchdog.test.mjs: clear.
    • .github/scripts/main-validation-workflow.test.mjs: clear; it checks substrings only, so extend it with the fix.

Automated review (maintainer link)

Comment thread .github/workflows/deploy.yml Resolved
…ript

THEME_EDIT_REAL_RENDERS and its comment had moved into the run block, where bash would run them as a command after the tests and exit 127 on every Main leg. They go back under env, and the workflow test now checks that the step's script is shell only (bash -n, no KEY: value lines).
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 15b4d8f

@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 still a draft.

The earlier blocking issue is fixed: THEME_EDIT_REAL_RENDERS and its comment are back under the step's env: in .github/workflows/deploy.yml, and the new shell-only assertions in main-validation-workflow.test.mjs fail against the previous revision, so the same slip cannot pass again. The name-only watchdog works as described, and pull-request legs keep the failing watchdog.

Claims and files checked

Review mode: incremental; reason: none

  • Claims
    • Name-only mode prints the running files with a warning annotation and lets the run go on: verified (scripts/vitest-shard-watchdog.mjs:100-114, two new tests).
    • Without the variable the watchdog still prints the error and exits 1, and the pull-request and minimum-Node workflows do not set it: verified (:109, :114, existing tests, workflow search).
    • Main's test-node step runs name-only mode a minute before its 15-minute limit, counted from the job's start, as on pull requests: verified (deploy.yml:344-347 matches ci.yml:1373-1375).
    • The job limit, not the watchdog, still ends an overrunning leg: verified (the reporter no longer exits; timeout-minutes: 15 unchanged); how the whole run is then concluded is unchanged by this pull request.
    • A failed leg would count as the tip's tested run, while the scheduler's incomplete list includes cancelled: verified (main-heavy-lanes.yml:191).
    • The step's environment entries stay out of its script, which is shell only: verified (YAML parse; the script under bash -e with a passing pnpm exits 0; main-validation-workflow.test.mjs:355-365).
    • All three new cases fail against the base's watchdog and workflow: verified (exactly those three fail).
    • 123 of 123 pass across the five named test files, and the existing watchdog cases still pass: verified.
    • Prettier passes: verified; actionlint passes: not checked here, the Lint workflow runs it once CI runs.
    • Only Main's unit run changes; pull-request legs are unchanged: verified (ci.yml untouched).
    • The three overlapping pull requests touch this step as described: verified from their current patches.
  • Files
    • .github/workflows/deploy.yml: clear.
    • scripts/vitest-shard-watchdog.mjs: clear.
    • scripts/vitest-shard-watchdog.test.mjs: clear.
    • .github/scripts/main-validation-workflow.test.mjs: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 5bd2e9a

@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 still a draft.

The merge of main leaves this pull request's own changes as they were, and nothing it brings in touches the four changed files or the scheduler. The name-only watchdog works as described, and pull-request legs keep the failing watchdog.

Claims and files checked

Review mode: incremental; reason: none

  • Claims
    • Main's Node legs run with no watchdog today, so a leg cut off at the limit does not name the running files: verified (the base's test-node step runs no watchdog reporter).
    • The pull-request watchdog names the files but exits 1: verified (scripts/vitest-shard-watchdog.mjs:109, :114; ci.yml:1373-1376).
    • On Main that exit would make an overrun a failure, which the scheduler counts as tested and does not re-run or report: verified (main-heavy-lanes.yml:129, :191, :198; the test join at deploy.yml:461).
    • Name-only mode prints the same list with a warning annotation and lets the run go on: verified (:100-114, two new tests, a direct run).
    • The job limit still cancels the leg, so the run ends cancelled: verified (the reporter no longer exits; timeout-minutes: 15 unchanged; the scheduler's own reports of Main runs whose Node leg hit the limit say they ended cancelled).
    • Without the variable the watchdog behaves as before, as the pull-request and minimum-Node workflows use it: verified (unchanged error line and exit; neither workflow sets the variable; existing tests pass).
    • Main's test-node step runs name-only mode a minute before its 15-minute limit, counted from the job's start, as on pull requests: verified (deploy.yml:344-347 matches ci.yml:1373-1375).
    • The two new watchdog cases and the new workflow case test what the description says: verified (vitest-shard-watchdog.test.mjs:61-95, main-validation-workflow.test.mjs:342-375).
    • All three new cases fail against the base: verified (exactly those three fail).
    • 123 of 123 pass across the five named test files, and the existing watchdog cases still pass: verified.
    • Prettier passes: verified; actionlint passes: partly verified (an older actionlint build finds nothing new in the workflow; the repository's own actionlint runs in the Lint workflow once CI runs).
    • Only Main's unit run changes, at no time cost, and pull-request legs are unchanged: verified (ci.yml untouched by this pull request; the reporter only arms a timer).
    • The three overlapping pull requests touch this step as described: verified from their current patches.
  • Files
    • .github/workflows/deploy.yml: clear.
    • scripts/vitest-shard-watchdog.mjs: clear.
    • scripts/vitest-shard-watchdog.test.mjs: clear.
    • .github/scripts/main-validation-workflow.test.mjs: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 17, 2026 12:11
@cixzhang
cixzhang marked this pull request as draft November 17, 2026 12:55
…-name-only

# Conflicts:
#	.github/workflows/deploy.yml
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8f1a551

@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 still a draft.

The merge of main brings in #12256 and keeps its change to the shared test-node step, and the step's environment stays out of its script. The name-only watchdog works as described, and pull-request legs keep the failing watchdog.

Claims and files checked

Review mode: incremental; reason: none

  • Claims
    • Main's Node legs run with no watchdog today, so a leg cut off at the limit does not name the running files: verified (the base's test-node step runs plain pnpm test:node).
    • The pull-request watchdog names the files but exits 1: verified (scripts/vitest-shard-watchdog.mjs:109, :114; ci.yml:1373-1376).
    • On Main that exit would make an overrun a failure, which the scheduler counts as tested and does not re-run or report: verified (main-heavy-lanes.yml:129, :191, :198; the test join at deploy.yml:461).
    • Name-only mode prints the same list with a warning annotation and lets the run go on: verified (scripts/vitest-shard-watchdog.mjs:100-114, two new tests, a direct run).
    • The job limit still cancels the leg, so the run ends cancelled: verified (the reporter no longer exits; timeout-minutes: 15 unchanged; the scheduler's own reports of Main runs whose legs hit the limit say they ended cancelled).
    • Without the variable the watchdog behaves as before, as the pull-request and minimum-Node workflows use it: verified (unchanged error line and exit; neither workflow sets the variable; existing tests pass).
    • Main's test-node step runs name-only mode a minute before its 15-minute limit, counted from the job's start, as on pull requests: verified (deploy.yml:344-347 matches ci.yml:1373-1376).
    • The two new watchdog cases and the new workflow case test what the description says: verified (vitest-shard-watchdog.test.mjs:61-95, main-validation-workflow.test.mjs:354-388).
    • All three new cases fail against the base: verified (exactly those three fail).
    • 123 of 123 pass across the five named test files, and the existing watchdog cases still pass: verified; after the merge of main those files hold 124 cases, and all pass.
    • Prettier passes: verified; actionlint passes: partly verified (an older actionlint build finds nothing new in the workflow; the repository's own actionlint runs in the Lint workflow once CI runs).
    • Only Main's unit run changes, at no time cost, and pull-request legs are unchanged: verified (ci.yml is untouched; the reporter only arms a timer).
    • The merged #12256 leaves the step drawing as a pull request does, and the two open overlapping pull requests touch this step as described: verified (no real-drawing flag in the step, and #12256's own case passes; their current patches read).
    • The owner and landing notes are process notes, with nothing in the code to check.
  • Files
    • .github/workflows/deploy.yml: clear.
    • scripts/vitest-shard-watchdog.mjs: clear.
    • scripts/vitest-shard-watchdog.test.mjs: clear.
    • .github/scripts/main-validation-workflow.test.mjs: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 17, 2026 13:25
@cixzhang
cixzhang merged commit 815282d into main Nov 17, 2026
136 checks passed
@github-actions
github-actions Bot deleted the ci/main-node-watchdog-name-only branch November 18, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 8f1a551c Deployed Nov 17, 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