Repository navigation
fix(cli): keep the git-ignored tmp/ out of the vitest tier walk - #26176
Conversation
…pin failures Every case in hook-timeout-override-refusal.test.ts asserts a child's exit code, so a dead child read only as `expected 1 to be +0`. Each status assertion now carries the exit status and the bounded head of the child's output, where a config-load failure prints its cause. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01REwoooZ6nXESkVCEtsbeRC
…er walk packages/cli/vitest-tiers.ts walked the whole package at config load, including tmp/, where sibling tests render scaffolds (test files included) and delete them mid-run. A delete inside the walk threw ENOENT out of the config load, so the #18788 pin's no-override vitest list child exited 1 in the merge queue. tmp/ is now skipped; the control plants a test file there and asserts the listing does not name it. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01REwoooZ6nXESkVCEtsbeRC
📓 Docs Drift CheckThis PR changes 1 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 31 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 9973670cec23c77457a7e18fb94b4b46098a5008 && git checkout 9973670cec23c77457a7e18fb94b4b46098a5008
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c7aa9cde24ca7d17563caa4e01037f3ab1b9e990 358e11b89c06ff37f56d1cff069aa750f198c05e && git checkout -B drift-repro c7aa9cde24ca7d17563caa4e01037f3ab1b9e990 && git merge --no-ff 358e11b89c06ff37f56d1cff069aa750f198c05e
node scripts/docs-audit/affected-docs.mjs --json c7aa9cde24ca7d17563caa4e01037f3ab1b9e990
|
席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | draft, base main, Fixes #26047, skip-changeset. vitest-tiers.ts is outside @objectstack/cli files[] (dist, README.md, CHANGELOG.md), as the body states. Mergeable clean. |
| Files | 2 files, +52/−7: packages/cli/vitest-tiers.ts adds tmp to SKIP_DIRS with a comment; packages/cli/test/hook-timeout-override-refusal.test.ts changes the pin. |
| Root cause | Not load: 5/5 green under 8 busy loops. The config-load walk read the git-ignored packages/cli/tmp, where sibling tests render scaffolds (with real *.test.ts files) and delete them. A delete mid-walk threw ENOENT out of the config load, so the ⭐ CONTROL child exited 1. Reproduced on main in 3 of 132 runs with the real neighbours. |
| Fix | Ruling A, one entry in SKIP_DIRS. The pin's status assertions now carry the child's exit and output, so the next red says why. The control plants tmp/.../planted.test.ts and asserts it is not listed (red against main's walk). |
| Evidence | 0 of 216 on the fix (main 3 of 132). Population unchanged at 506; check-tier-file-adoption and the cross-package test-input census green. 36 check runs success and 16 expected skips on this head, 0 failed. Build Core (hosting check:dual-build-cjs-loads, the one gate not measured locally) is green. cli unit tier 333 files / 4,854 tests green. |
| Landing | 「按照 pm-dispatch 规则复核过的都授权」 (Leehom, 2026-10-25T11:35Z): ready and auto-merge through the relay. |
Generated by Claude Code
Requested by Leehom · project thread
Fixes #26047
Clause-②: no
Metadata-protocol: none
What was wrong
The merge queue ejected three independent PRs (#25979, #26007, #26026) on the same line:
hook-timeout-override-refusal.test.ts› ⭐ CONTROL,AssertionError: expected 1 to be +0. Thevitest listchild exited 1. Load was not the cause.packages/cli/vitest.config.tsbuilds its tier populations at config load throughpackages/cli/vitest-tiers.ts.testFilesOnDiskwalked the whole package, includingpackages/cli/tmp/, which is git-ignored scratch. Sibling tests in the same slice render whole scaffolds intotmp/and delete them mid-run (init-template-comments-self-contained,scaffold-manifest-schema). Those scaffolds hold real test files such aspackage.test.tsandsrc/index.test.ts. When a delete landed inside the walk, the config load threwENOENT(scandir or open), so the child exited 1. Two other effects of the same walk: a scaffold's test files joined theunitpopulation while they existed, and the outervitest runconfig load could die the same way.Change
packages/cli/vitest-tiers.ts:tmpadded toSKIP_DIRS, with a comment saying why. This is the seat's ruling A, recorded as a claim amendment on Queue-flake anchor: test/hook-timeout-override-refusal.test.ts #26047.packages/cli/test/hook-timeout-override-refusal.test.ts:planted.test.tsunder a freshtmp/directory and asserts the listing does not name it. That is the red-first pin.packages/clithe--hookTimeoutCLI override is SILENTLY INERT undertest.projects— the instrument the repo's own prior art uses to WITNESS a cold load leaving the clocked window returns green having measured nothing #18788 verdicts are unchanged:--hookTimeoutand--teardownTimeoutrefuse,--testTimeoutpasses, and the no-override control passes and says nothing.Evidence
All runs on a shared 4-core container, with the
@objectstack/clidependency closure built.main0a69482vitest list --filesOnly, no override) looped beside the real scaffold-rendering testsfailed to load config … ENOENT … packages/cli/tmp/manifest-init-plugin-…/package.test.tsor…/render-create-plugin-…/src/index.test.tstmp/churnvitest list exited 1; its output began: failed to load config … ENOENT … scandir …)vitest list --filesOnly)main's walk× ⭐ CONTROL …: the listing named[unit] tmp/hook-timeout-control-Btvz04/planted.test.tsThe load-only row rules out the time hypothesis: the control child takes about 7 s against its 27 s budget. A directory watcher across all three CI slices (
OS_TEST_SHARDk/3) recorded that the only directories appearing or vanishing in the package tree were undertmp/. The slice holding this test churned 25 of them. CI job logs are not readable from this container, so the queue's own stderr was not seen. The new message makes the next queue red carry it.Tests and gates (head 358e11b)
pnpm --filter @objectstack/cli exec vitest run --project unit: 333 files / 4854 tests passed. Theintegrationtier is left to CI, because this diff touches no spawn entry.pnpm --filter @objectstack/cli run typecheck: exit 0.eslint packages/cli --no-inline-config: exit 0.dispatch-gates --commands: 55 derived, 54 run with exit 0, 1 NOT MEASURED (check:dual-build-cjs-loads, which needs a full build and exited 3).--ranreconciles: 0 unrun. This includescheck:tier-file-adoptionandcheck:cross-package-test-inputs, both green, and neither reads the cliSKIP_DIRS.check-plugin-teardown-shape --self-testwas rerun green after fetching its positive-control commit. Its first attempt overlapped my synthetictmp/churn and refused on an unreadabletmp/file, which is the same walk class (see Acceptance notes).Changeset
skip-changeset:@objectstack/clipublishesfiles: ["dist", "README.md", "CHANGELOG.md"], and neither touched file is in it or built intodist.Acceptance notes
packages/qa/vitest-filter-preflight/src/index.tstestFilesUnder(filtered runs only),scripts/nightly-tiers.mjstierPackages, andcheck-plugin-teardown-shapeall descend intopackages/cli/tmp/. A churn intmp/during one of them can refuse on a vanished file. Carrier: none.🤖 Generated with Claude Code
https://claude.ai/code/session_01REwoooZ6nXESkVCEtsbeRC