Repository navigation
test(ui): repository walkers tolerate tsup's transient bundled config vanishing mid-walk - #30357
Conversation
… vanishing mid-walk (#30256) strict-authoring-face-8345's importer walk listed a tsup.config.bundled_*.mjs that a concurrent tsup build deleted before the read (ENOENT, Test UI 4/16). The walk now skips that transient name and treats ENOENT on read as not-present; every other read fault still throws. Same guard in the two sibling walkers that reach a tsup package root and read .mjs: block-config-i18n and select-placeholder-literal-11252. A race pin drives the extracted walker with a doctored listing (vanished bundle, vanished module, on-disk bundle with a specifier, directory listed as a file). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziNut2sBjutK3Sers8
|
domain:ui#1 · os-support-ai · session_01WGufzfE4V9fzZgJLrLDmMC 维护者速读(席位终稿)
席位核对 · ACCEPT · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 41989312226 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:ui#1 · os-support-ai · session_01WGufzfE4V9fzZgJLrLDmMC Queue ejection read · held until main is green · 2026-11-05T08:22Z
|
Requested by Yibo Wang · project thread
Fixes #30256
Clause-②: no
Metadata-protocol: none
维护者速读
tsup.config.bundled_*.mjs而报 ENOENT;只改测试文件,不改产品代码。strict-authoring-face-8345在合并队列里与并行分片的 tsup 构建竞态(队列构建 41962914067,Test UI (4/16)),把无关 PR 踢出队列。scanned > 1000和唯一导入者断言一字未改。回滚即还原本 PR。strict-authoring-face-8345.test.ts中提取出的scanForImporters/readIfPresent和新增的竞态钉子测试。cd ui && pnpm exec vitest run packages/types/src/__tests__/strict-authoring-face-8345.test.ts,预期 33 例全绿。What changes
ui/packages/types/src/__tests__/strict-authoring-face-8345.test.ts— the importer walk is extracted toscanForImporters(repoRoot, roots, list?)inside the samedescribe. Two guards, placed ascheck-error-status-conformance.mjswalk()races tsup's transientpackages/spec/tsup.config.bundled_*.mjs: readdir-then-stat throws ENOENT and turns the requiredTest Core (1/6)red with 597 / 597 tests passed #20225 / [finding] lint-startup-registry-verdict corpus test walks packages/ with a bare readdir-then-stat inside @objectstack/lint#test, so tsup's transient bundled config fails it with ENOENT (measured 4 of 8) #20269 placed them:*.bundled_<hash>.mjs(tsup's transient bundle oftsup.config.ts) is skipped by name;readIfPresentreturnsundefinedon ENOENT only and the file is not counted; every other read fault re-throws.scannednow counts files actually read (it used to count before the read). Thescanned > 1000floor and the['packages/types/src/zod/index.zod.ts']importer assertion are unchanged.tsup.config.bundled_x.mjsand a vanishedvanished.ts→ no throw,scanned: 1, onlypkg/real.tsfound; an on-disktsup.config.bundled_y.mjscarrying a specifier → skipped by name; a directory listed as a file → still throwsEISDIR. The fixture's import line is split so this file never reads as an importer itself.ui/packages/cli, a tsup package root, and reads.mjs):ui/packages/app-shell/src/views/metadata-admin/previews/__tests__/block-config-i18n.test.ts(shippedLiteralKeys, walkspackages+apps, ext(ts|tsx|js|jsx|mjs)).ui/packages/app-shell/src/__tests__/select-placeholder-literal-11252.test.ts(walkspackages+apps,SOURCE_FILEincludesmjs;filesReadnow counts files actually read).Why
tsup bundles each package's
tsup.config.tstotsup.config.bundled_<hash>.mjsbeside it and deletes it when the build ends. A walk that lists the directory during a concurrent build can name that file and then fail to read it.readdirSyncwas already guarded; the per-filereadFileSyncwas not.Verification
cd ui && pnpm exec vitest runon the three touched files: 3 files, 58 tests passed (underos-verify-lock, exit 0).packages/types/src/zod/index.zod.ts.throw errunconditionally) → pin red.EISDIRno longer thrown)..mjsread):machineLocaleCensus-9909reads[cm]?[jt]sx?at package roots, but its population (packages depending on@object-ui/i18n) excludescli,create-plugin,data-objectstack;page-node-headings-drawn-11436walksexamplesonly (no tsup there);sidebarGroupLabel.callSites-12795(tsx?|jsx?|mts, no.mjs);product-neutral-renderer.ratchetlists paths but does not read them; the rest walksrc/only or filter to.ts/.tsx/.json.dispatch-gates --commands(26 commands) run on the final diff: see--ranrecord below.dispatch-gates --ran record (26 derived, 26 run, 0 NOT-MEASURED, 0 UNRUN)
os-verify-lock:packages/types/387 files / 10,464 tests passed;packages/app-shell/2,176 files passed, 1 skipped (pre-existing) / 19,426 tests passed.eslinton the three files: exit 0.tsc -p ui/packages/types/tsconfig.test.json --noEmit: exit 0.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintnot run locally).main, one pull request.skip-changeset); both declaration lines are filled in above.packages/spectouched: n/a.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufziNut2sBjutK3Sers8