Repository navigation
test(ui): three ui/ script tests spell their temp bases so the whole-tree scratch-dir sweep reads them (PM dispatch-gates red on main) - #25865
Conversation
…three ui/ script tests The slow tier of `pnpm check:pm-dispatch-gates` runs only on push and schedule, and since the ui/ import it reads ui/ sources too. Two of its live-tree cases went red on three ui/ test files: - check-node-esm-load.test.ts binds `dir` to a temp directory in most tests and to `path.join(REPO_ROOT, 'packages/fields' | 'packages/auth')` in two. The sweep does not track scope and an in-tree reading wins, so every `mkdirSync(path.join(dir, ...))` read as a directory created in ui/packages/fields. The two package-reading tests now say `pkgDir`. - markdown-test-inputs.test.ts and select-affected-tests-wiring.test.ts declared `let scratch = ''` and assigned the real temp base in beforeAll. The empty literal read as a cwd-relative mkdtempSync base. They now declare `let scratch: string;`, so the one assignment is the only reading. No gate changes. Tests unchanged in behaviour (86/86). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HssnEmZ59WGARsErPSbRpf
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 40255280821 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Tesla · project thread
Fixes #25851
Part of #25677 (cutover aftercare, bill item 50).
Clause-②: no
Metadata-protocol: none
Why main is red
Lint · PM dispatch-gatesrunspnpm check:pm-dispatch-gates. Onpushandschedulethat runs both tiers of the battery; onpull_requestand the merge queue it runs the fast tier only. That is why every PR run of the cutover sitting was green while every push and schedule run sincefd40831416(#25825) has been red.Job log of check-run 121332957566 (push run 40247793996,
90a34e2039), the only two red lines:Both are slow-tier live-tree cases of the scratch-directory sweep (
exposedScratchDirsinscripts/pm/dispatch-gates.mjs). Since the import it readsui/sources too, and it misreads two spellings in threeui/script tests:check-node-esm-load.test.tsbindsdirto a temp directory in most tests (const dir = tmpdir(), a local helper overos.tmpdir()), and topath.join(REPO_ROOT, 'packages/fields')and'packages/auth'in two tests that only read package files. The sweep does not track scope and lets an in-tree reading win (its stated bias), so everymkdirSync(path.join(dir, …))in the file read as a directory created underui/packages/fields.markdown-test-inputs.test.tsandselect-affected-tests-wiring.test.tsdeclarelet scratch = ''and assign the real base (mkdtempSync(path.join(tmpdir(), …))) inbeforeAll. The empty literal reads as a cwd-relativemkdtempSyncbase, and the two readings disagree, so the site stays unresolved.What this changes
The three test sources only. No gate, fixture, workflow or ignore rule changes, and no test changes behaviour.
check-node-esm-load.test.ts: the two package-reading tests name their bindingpkgDir.markdown-test-inputs.test.ts,select-affected-tests-wiring.test.ts:let scratch: string;, so thebeforeAllassignment is the only reading.The nine
mkdirSync(path.join(dir, …))sites incheck-node-esm-load.test.tsnow read as unresolvedmkdirSync(onedircomes fromwithTaskLog(…), an arrow function the resolver does not follow), the same class line 706 of that file already had. The live case counts only unresolvedmkdtempSyncsites, so they do not red it, and none of them reads as in-tree any more.Evidence
All on this branch's base, main
e167956e, withGITHUB_ACTIONS=true GITHUB_EVENT_NAME=push node scripts/pm/check-dispatch-gates.mjs(the step's second command, both tiers):e167956e)a5958c7b)✗ dispatch-gates self-test: 2 of 2182 case(s) failed.(exit 1, the same two lines as CI)✓ dispatch-gates self-test: 2182 cases pass.(exit 0)mkdtempSyncmkdtempSync(2388 sites across 18098 tracked sources, 82 in-tree roots)node scripts/pm/check-dispatch-gates.mjs --self-testwith the push environment: exit 0.npx vitest runon the three files (fromui/): 3 files, 86 tests pass.npx tsc -p tsconfig.scripts.json --noEmit(fromui/): 21 errors before and after, all pre-existing unbuilt@objectstack/specsubpath errors, none in these files.dispatch-gates --commandsfor the three paths derives 18; all 18 ran, exit 0.dispatch-gates --ran:✓ 18 derived famil(ies) accounted for — 18 run, 0 NOT-MEASURED (a DERIVED zero).mkdtempSync/mkdirSynccall.This PR's own CI runs the fast tier only, so it cannot show the fixed cases. The proof is the first green push run of
Lint & Type Checkon main after this lands; its run id goes on #25851.Tier S: three
ui/scripts/__tests__/files, no governed surface.skip-changeset: publishes nothing. The known Test UI 8/16 and 9/16 reds belong to the next 4b PR and are not touched.🤖 Generated with Claude Code
https://claude.ai/code/session_01HssnEmZ59WGARsErPSbRpf