Skip to content

test(ci): the watchdog self-test keeps every VITEST_SHARD_ variable out of its fixture runs - #12578

Merged
cixzhang merged 1 commit into
mainfrom
test/watchdog-self-test-shard-env
Nov 18, 2026
Merged

cixzhang merged 1 commit into
mainfrom
test/watchdog-self-test-shard-env

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

What

The Node shard watchdog's self-test runs Vitest fixtures in child processes. It already kept the leg's own watchdog settings (VITEST_SHARD_WATCHDOG_*) out of those children; it now keeps every VITEST_SHARD_* variable out. A Node leg sets VITEST_SHARD_TIMES_FILE to record its own files' times, so a fixture run that inherited it wrote the fixture's entry into that leg's times file.

  • scripts/vitest-shard-watchdog.test.mjs: withoutShardSettings drops every VITEST_SHARD_ variable from the parent environment; each case still passes the settings it needs.
  • New case: with VITEST_SHARD_TIMES_FILE set in the parent, as a Node leg sets it, a fixture run leaves that file byte for byte as it was.

Test-only. No workflow, script or record changes.

Tests

  • Red-first: with the old VITEST_SHARD_WATCHDOG_ filter, the new case fails (the fixture's entry lands in the leg's file); with this change all 8 cases pass.
  • Local: scripts/vitest-shard-watchdog.test.mjs 8 of 8. Prettier clean (the file is outside lint's scope).

Overlap checked: none (no open pull request changes scripts/vitest-shard-watchdog.test.mjs)

Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the shipper, through merge-guard, on green, CodeBunny approval and Specs' exact-head /approve-spec.

…ut of its fixture runs

A Node leg sets VITEST_SHARD_TIMES_FILE for its own files; a fixture run that inherited it wrote its entry into that leg's times file. A new case proves the leg's file stays as it was.
@vercel

vercel Bot commented Nov 18, 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 18, 2026 3:14am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 3:21 AM UTC

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

Copy link
Copy Markdown
Contributor Author

/approve-spec 81407b2

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 81407b2

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.


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. Marking it ready for review starts the run.

The fix holds up: with the old VITEST_SHARD_WATCHDOG_ filter the new case fails, because the fixture run replaces the leg's times file with its own entry, and with this change all 8 cases pass.

Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • The self-test already kept the leg's own watchdog settings out of fixture runs: verified, the base filter dropped VITEST_SHARD_WATCHDOG_ variables.
  • It now keeps every VITEST_SHARD_* variable out: verified, scripts/vitest-shard-watchdog.test.mjs:25-29.
  • A Node leg sets VITEST_SHARD_TIMES_FILE for its own files' times: verified, .github/workflows/ci.yml:1371 (also :1650 and .github/workflows/cli-minimum-node.yml:82).
  • A fixture run that inherited it wrote the fixture's entry into the leg's times file: verified, the reporter rewrites the whole file (scripts/vitest-shard-watchdog.mjs:83-88), and a simulated leg's file held only fixture entries while the self-test ran.
  • Each case still passes the settings it needs: verified, scripts/vitest-shard-watchdog.test.mjs:60, :76-77, :100-101, :118, :137, :149-150, :167-168 and :187.
  • The new case shows the leg's file stays byte for byte as it was: verified, scripts/vitest-shard-watchdog.test.mjs:178-195.
  • Test-only, with no workflow, script or record change: verified, the pull request changes one test file.
  • The new case fails with the old filter and all 8 cases pass with the change: verified by running both.
  • Prettier is clean and the file is outside lint's scope: verified, prettier --check passes and eslint.config.js:210 ignores scripts/**.
  • No other open pull request changes the same file: verified for the open pull requests that mention the watchdog.
  • The ownership and land-path note describes process, not code: nothing to verify.

Files:

  • scripts/vitest-shard-watchdog.test.mjs: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 18, 2026 03:24
@cixzhang
cixzhang merged commit 82ff7bb into main Nov 18, 2026
137 checks passed
@github-actions
github-actions Bot deleted the test/watchdog-self-test-shard-env branch November 18, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 81407b22 Deployed Nov 18, 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