Skip to content

fix(repo): ignore the conversions-registry codemod's in-tree scratch dir - #30100

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-tue4c8
Nov 4, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-tue4c8

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Refs #30078

维护者速读

  • 改了什么: 根 .gitignore 加一条跟踪规则 packages/spec/.codemod-arrays-*/(含三行注释),放在 packages/spec/src/migrations/registry.ts.*.tmp 旁边。只有这 5 行。
  • 为什么改: refactor(spec): codemod split of conversions/registry.ts into per-entry modules (#29987) #29993(d79eecfe)给 scripts/codemod-split-conversions-registry.mjs 加了 arraysProof(),它在 packages/spec/ 里 mkdtempSync('.codemod-arrays-')。PM dispatch-gates self-test 的 exposedScratchDirs 用例要求树内每个临时目录都被跟踪的 ignore 规则覆盖,于是 main 的 Lint · PM dispatch-gates 红了(1 of 2234)。
  • 风险与回滚: 只加一条 ignore 规则,不碰门禁、self-test、用例列表和 codemod。没有选「搬到 os.tmpdir()」:探针把 spec 的 src 复制进临时目录再用 tsx 加载,复制出来的源码有 391 处 from 'zod',靠从 packages/spec/ 往上找 node_modules 解析,搬出树外就解析不到。回滚 = revert。
  • 先看: .gitignore 第 71–74 行。
  • 两分钟验证: node -e "import('./scripts/pm/dispatch-gates.mjs').then(m=>console.log(m.exposedScratchDirs({}).exposed))":main 上列出两个 .codemod-arrays-0osprobe 目录,本分支为 []。
  • 需要你做的: 无,席位审阅落地(仅根配置,skip-changeset)。

Clause-②: no
Metadata-protocol: none

What changes

  • .gitignore. Adds packages/spec/.codemod-arrays-*/ with a three-line comment, next to the existing registry.ts.*.tmp staging rule. git check-ignore -v --no-index now answers .gitignore:74:packages/spec/.codemod-arrays-*/ for both probe paths the gate asks about (packages/spec/.codemod-arrays-0osprobe/leftover-probe and …/unpack/leftover-probe).

Why this fix and not moving the scratch dir

The order offered two remedies: (a) a tracked ignore rule, or (b) moving arraysProof()'s mkdtempSync to os.tmpdir(). (b) does not work. The probe copies packages/spec/src into the scratch dir and loads it with tsx (cwd packages/spec). The copied sources import zod at 391 sites, plus typescript and @objectstack/spec/* self-references, and Node resolves those bare specifiers by walking up from the importing file to packages/spec/node_modules. Under os.tmpdir() that walk finds nothing. So the scratch dir has to stay inside packages/spec/, and (a) is the smaller sufficient fix. The codemod already removes the dir in a finally; the rule covers a leftover from a killed run.

The gate (exposedScratchDirs in scripts/pm/dispatch-gates.mjs), its self-test and its case list are untouched.

Readings

Reading origin/main d79eecfe this branch
exposedScratchDirs({}).exposed packages/spec/.codemod-arrays-0osprobe (scripts/codemod-split-conversions-registry.mjs:843), packages/spec/.codemod-arrays-0osprobe/unpack (…:858) []; both now covered by .gitignore:74
node scripts/pm/dispatch-gates.mjs --self-test (both tiers, as the push run) exit 1, ✗ dispatch-gates self-test: 1 of 2234 case(s) failed., the one ✗ being the EXPOSED line above (33 min) exit 0, ✓ dispatch-gates self-test: 2234 cases pass. (fast 1945 in 509 s, slow 289 in 1465 s), the case reads ✓

Gates

node scripts/pm/dispatch-gates.mjs --commands derives 8 commands for this change set; each ran on the branch:

node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:watch-hint-literal :: exit 0

dispatch-gates --ran: 8 derived, 8 run, 0 NOT-MEASURED, 0 UNRUN.

Changeset

Root config only, no published package moves: skip-changeset.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufziUhP2qtBGrqtbPFTj

arraysProof() makes its mkdtemp under packages/spec so the copied src
resolves the package's own node_modules (zod and friends), so the dir
stays in the tree and gets a tracked ignore rule instead of moving to
os.tmpdir(). Clears the exposedScratchDirs self-test case that went red
on main at d79eecf.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziUhP2qtBGrqtbPFTj
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 4, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:devx#1 · os-support-ai · session_01WGufzgBDcBNVmSmo7VFHpj

Stamp: 2026-11-04T13:46Z
Head-sha: 546d547

维护者速读

  • 改了什么: 根 .gitignore 加一条跟踪规则 packages/spec/.codemod-arrays-*/(共 +5 行,含注释)。
  • 为什么改: refactor(spec): codemod split of conversions/registry.ts into per-entry modules (#29987) #29993 的 registry.ts 拆分 codemod 会在 packages/spec 里建临时目录,PM dispatch-gates 的自测因此报 EXPOSED,main 的 4 小时全量检查变红(p0 4-hourly full run: red on main (Lint & Type Check) #30078)。
  • 风险与回滚: 只多忽略一类临时目录,不动代码、门禁或自测。回滚就是 revert。
  • 先看: .gitignore 第 71-74 行。
  • 两分钟验证: git check-ignore packages/spec/.codemod-arrays-x/ 应命中第 74 行。
  • 需要你做的: 无,席位落地。
  • 席位意见: ACCEPT。临时目录不能挪到 tmpdir:探针拷贝的 src 要沿目录向上解析 packages/spec/node_modules 里的 zod(391 处),所以加忽略规则是最小且足够的修法。

席位核对

  • 形态: 1 个文件 +5/−0,非受管面(check-governed-merges.mjs --pr 30100 NOT governed),check-owed-reviews 不欠复核。
  • 前提实测: 席位读 run 41827731296(d79eecfe),唯一红的是 EXPOSED .codemod-arrays-0osprobe(:843)和 /unpack(:858)这一条。dev 在 base 上复现了 exit 1、1/2234 红,在 head 上 exit 0、2234 例全过;exposedScratchDirs 在 base 列出 2 个目录,在 head 为 []。
  • 门禁 check-runs: 钉 546d5472,以席位读数为准,未结论的由 auto-merge 等全绿。dev 跑了推导出的 8 条命令,全部 exit 0,--ran 0 NOT-MEASURED。
  • 接受的偏差: dev 把被 check:commit-card-trailers 拒的 co-author trailer 改成了 Claude <noreply@anthropic.com>(推送前改的)。
  • 范围外去向: 无。门禁、自测和用例清单都没动。Skills-docs: none。
  • 落地条款: p0 main-red fix-forward,机械修复,根因已核。席位 pr_ready + automerge_enable。4-hourly full run: red on main (Lint & Type Check) #30078 等下一次 4 小时全量检查转绿后由它自己关闭。

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 4, 2026 13:47
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 4, 2026 13:47
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 1f13eb3 Nov 4, 2026
46 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-tue4c8 branch November 4, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant