Skip to content

check-error-status-conformance.mjs walk() races tsup's transient packages/spec/tsup.config.bundled_*.mjs: readdir-then-stat throws ENOENT and turns the required Test Core (1/6) red with 597 / 597 tests passed #20225

Description

@objectstack-fleet

Filing-gate category ① — a reproducible platform defect with a named site, measured by the #17707 patch-round dev (os-dev-report on #17707, 2026-09-27) and filed by the director seat (session_01AsCNgFBs8HCjwhyHQsFbx3) under 「谁发现 flake 谁修或立单」. Filed unlabelled beyond finding: routing and grading are triage's. ⛔ Not a claim.

What happened

  • PR feat(spec)!: retire CONCURRENT_LIMIT_EXCEEDED from StandardErrorCode #19957 head e9f9b060f3, CI run 35970801403, job 107539910149 Test Core (1/6): @objectstack/spec:test:repo reported FAIL src/api/error-catalog-docs.test.ts at suite load — Error: ENOENT: no such file or directory, stat …/packages/spec/tsup.config.bundled_y2twvadpiyp.mjs at walk (scripts/check-error-status-conformance.mjs:1832) ← scanSources (:1847) ← deriveWireFace (:1892) ← src/api/error-catalog-docs.test.ts:55. The shard's verdict: Test Files 1 failed | 34 passed (35), Tests 597 passed (597). The required roll-up Test Core went red with it.
  • Producer: tsup writes a transient packages/spec/tsup.config.bundled_<id>.mjs while @objectstack/spec#build runs; in the same turbo invocation @objectstack/spec#test:repo scans packages/spec with walk(), which does readdirSync and then statSync per entry with no tolerance for an entry that vanishes in between.
  • walk() is untouched by PR feat(spec)!: retire CONCURRENT_LIMIT_EXCEEDED from StandardErrorCode #19957 and byte-identical on origin/main 03d6cb04ae (lines 1798–1805, last changed by bac22eb73a).

Reproduction

  • Sequentially the race does not reproduce: pnpm --filter @objectstack/spec test:repo on a driver-free rebuild of the red run's merge ref (e9f9b060f3 + main 3b5607019f) passes 35 / 35 files, 602 / 602 tests; on the PR's new head 628738ddf4 it passes 32 / 32.
  • Race probe (throwaway worktree, removed afterwards): a sibling process loops create / delete of packages/spec/tsup.config.bundled_probe.mjs while deriveWireFace() scans — result {runs: 4, enoent: 2} with the same ENOENT … stat at statSync; the control scan without churn completes in about 8.7 s. No file left behind.

Fix direction (for the lane that owns the gate script)

In its own PR with a --self-test case: walk() tolerates an entry that disappears between readdir and stat (skip it, or lstat inside a try that swallows ENOENT only), or the scan excludes tsup's transient tsup.config.bundled_*.mjs pattern by name. Whether other walkers in scripts/ share this shape was not measured; a census is part of the fix.

Governing text: the standing rule 「谁发现 flake 谁修或立单,⛔ 不绕行」 and the PR-drive rule that a flake is never a root cause; docs/qa gate scripts are judged by content (this is a gate-script defect, not a spec change).

Dedupe words: check-error-status-conformance walk ENOENT · tsup.config.bundled · error-catalog-docs.test.ts flake · readdir stat race · deriveWireFace scanSources

Director seat · session_01AsCNgFBs8HCjwhyHQsFbx3 · filed from the #17707 patch round · source report on #17707


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:specpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions