Skip to content

Commit b0da5a5

Browse files
chore(scripts): delete the four one-off codemod-split-*.mjs scripts; comments cite the PRs that made each split (#34353)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbKnsd8ZLsq9hBbRRm5JvJb2)_ Fixes #34345 Clause-②: no Metadata-protocol: none Skills-docs: none (no published surface moves; nothing under `skills/` names the scripts) ## 维护者速读 - 改了什么:删除四个一次性拆分脚本(`scripts/codemod-split-{engine,protocol,sql-driver,conversions-registry}.mjs`,共 15,933 行);199 个文件里点名它们的注释改为点名完成该次拆分的 PR(「split by #NNNNN」),只改注释行、原地改写,每个文件行数不变;另把 `scripts/regen-artifacts.mjs` 一处同样点名已删脚本的说明字符串改为「split by #29993」(席位已批准扩面,纯文字)。 - 为什么改:维护者裁定清理;这四个脚本各自只跑过一次,现在没有任何代码、门禁、workflow 或 package script 运行、导入或读取它们。 - 风险与回滚:零行为改动(diff 中修改的行除一处说明字符串外全部是注释行,已机械核对;该字符串没有任何测试或门禁读取其原文);发布产物里不含被改注释(构建后 `dist/` 中 `split by #` 与 `codemod-split-` 均 0 命中)。回滚即撤销本 PR。 - 先看:`scripts/regen-artifacts.mjs` 第 437 行(原先仍点名已删脚本的唯一一处字符串字面量,本轮已改写);`scripts/check-adr-0087-registration.mjs`、`scripts/cross-package-test-inputs.mjs`(被改注释的门禁横幅)。 - 两分钟验证:`git grep -n codemod-split-`,预期零输出(退出码 1)。 - 需要你做的:本 PR 超过 3,000 行,按 Tier H 由你批准合并;席位 L1 后交棒。 ## What changes - Deletes `scripts/codemod-split-engine.mjs` (7,452 lines), `scripts/codemod-split-protocol.mjs` (4,164), `scripts/codemod-split-sql-driver.mjs` (2,950) and `scripts/codemod-split-conversions-registry.mjs` (1,367). - Rewords every comment that named one of them (201 comment edits in 199 files: facet-module headers, the 112 conversion-entry headers, gate banners) so it cites the PR that made that split. Each edit is in place: every modified file keeps its line count, and every changed line is a comment line. - Per-script PR mapping, read from `git log` of each script and `git blame` of each comment line: - engine: added by #30012; comments now cite #30012, #30083, #30264, #30341, #30415, #30463, #30571, #30716, #30987, #31116, #31151, #31665, #31764, #31922, #32046. - protocol: added by #29998; comments cite #29998, #30687, #30954, #32068, #32463. - sql-driver: added by #29598; comments cite #29598, #30139, #30249, #30306, #30363, #30441. - conversions-registry: added by #29993; comments cite #29993. - Rewords the one string literal that still named a deleted script: the `why` of the `packages/spec/src/conversions/registry.ts` entry in `NOT_DRIVER_MANAGED` (`scripts/regen-artifacts.mjs:437`) now reads "(split by #29993)". Text only; widened by the seat answer on this PR (comment 6912161808). - Size: 204 paths (4 deleted, 200 modified: 199 reworded comment files plus `scripts/regen-artifacts.mjs`), +342 / -16,275. ## Tests No test or test expectation changes. Premise (nothing runs, imports or reads the scripts), measured with `git grep` on this branch at its base `35c9a305f06`: - `codemod-split` in every `package.json`: 0 files; in `.github/**`: 0; in `turbo.json`: 0; in vitest configs, tsconfigs, `eslint.config.mjs`, `.husky/**`, `.claude/**`: 0; in `*.md`, `*.mdx`, `docs/**`, `content/**`, `skills/**`: 0. - `codemod-split-`: 204 files (the four scripts plus 200 that name them); `codemod-split` without the trailing hyphen: 0. - Spellings that reach a script by import, require, spawn, exec or fork: 0 (three hits are comments of the form "Written by ..."). - The 202 naming lines: 201 are comment lines; one is the string literal in `scripts/regen-artifacts.mjs:437` (prose in a `NOT_DRIVER_MANAGED` entry's `why`; it does not run or read the script). - The four scripts' `--self-test` modes are run by no workflow, so `check:self-test-wired` does not count them. ## Acceptance notes - **`scripts/regen-artifacts.mjs:437`: closed in this PR.** The seat widened the surface to that one literal; it now cites #29993 (re-measured: `git log --diff-filter=A` of `packages/spec/src/conversions/entries/*` gives `d79eecfe5 … (#29987) (#29993)`). `git grep -n codemod-split-` on the branch is now empty (exit 1). No test or gate reads that `why` text: the sentence has no other hit in the tree. - `.gitignore` keeps `packages/spec/.codemod-arrays-*/`, an ignore entry for the deleted conversions codemod's scratch dir. It is now dead, and removing it is not a comment edit, so it stays. Carrier: none, noted here. - No changeset: the reworded comments do not reach any package's published files (after a build of the four touched packages, `split by #` and `codemod-split-` both have 0 hits in their `dist/`; positive control: other facet-header text such as "A MOVE, not a redesign" does appear in the objectql and metadata-protocol `dist/`). Labelled `skip-changeset`. - `git merge-tree` against the four open PRs that touch the same files (#34347, #34324, #34285, #34238) gives a clean merge for each. ## Verification (hand-off, at 79f3d3b) <details><summary>Hand-off gates run locally at 79f3d3b (6 of 111 derived commands), all exit 0</summary> - `node scripts/check-adr-0087-registration.mjs --base origin/main`: exit 0 - `node scripts/check-adr-0087-registration.mjs --self-test`: exit 0 - `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-adoption.mjs`: exit 0 - `node scripts/check-comment-mask-adoption.mjs --self-test`: exit 0 - Build of the affected closure (`@objectstack/spec`, `objectql`, `driver-sql`, `metadata-protocol`, and their dependencies), under the shared verify lock: VERDICT command-exit 0. </details> ## Fix round 1 (takeover by repo:objectstack#1) Head `28b3b32ff`: one commit on top of `79f3d3b2e`, the `regen-artifacts.mjs:437` reword above. Nothing else changed. **Measured on `28b3b32ff`** - `git grep -n codemod-split-`: no output, exit 1. The card's done condition holds. - `node --check scripts/regen-artifacts.mjs`: exit 0. - Local gates (narrowed as declared below): 39 commands, 35 exit 0, 4 NOT MEASURED (exit 3, prerequisite `dist/` not built), 0 red. - CI on `28b3b32ff` when this body was written: 66 check-runs, 53 success, 12 skipped, 1 in progress (`Test Core (7/8)`), 0 failure. The PM reads convergence. - `dispatch-gates.mjs --ran` with exit codes recorded: `36 derived famil(ies) accounted for — 32 run, 4 NOT-MEASURED (4 DERIVED from a recorded exit 3)`. **Declared narrowing.** Locally I ran only the 36 commands that `dispatch-gates.mjs --commands` derives for `scripts/regen-artifacts.mjs`, plus `check:merge-driver` (its `git-merge-regen.mjs --self-test` reads `NOT_DRIVER_MANAGED`) and the full `check:durability-log-level` and `check:stack-collection-maps` (each runs its `--self-test`; these are the two edited gate scripts whose self-tests the hand-off left unrun). The other commands of the 111-command whole-PR derivation, `pnpm typecheck` and `pnpm test` for the four touched packages, are CI's: `TypeScript Type Check` and `Test Core` run them on this PR. ## Verification (round 1, at 28b3b32) <details><summary>Round 1 gates at 28b3b32: exit code captured before any pipe</summary> - `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 - `node scripts/check-declaration-mirrors.mjs`: exit 0 - `node scripts/check-declaration-mirrors.mjs --self-test`: exit 0 - `node scripts/check-dts-emitted.mjs --self-test`: exit 0 - `node scripts/check-self-test-wired.mjs`: exit 0 - `node scripts/check-self-test-wired.mjs --self-test`: exit 0 - `node scripts/check-self-test-workflow-commands.mjs`: exit 0 - `node scripts/check-self-test-workflow-commands.mjs --self-test`: exit 0 - `node scripts/check-whole-set-label-write.mjs`: exit 0 - `node scripts/check-whole-set-label-write.mjs --self-test`: exit 0 - `node scripts/ci/assert-turbo-remote-cache.mjs --self-test`: exit 0 - `node scripts/ci/plan-test-core-shards.mjs --self-test`: exit 0 - `node scripts/ci/prune-turbo-cache.mjs --self-test`: exit 0 - `pnpm check:adr-anchors`: exit 0 - `pnpm check:agent-test-spelling`: exit 0 - `pnpm check:bash32-floor`: exit 0 - `pnpm check:ci-filter-parity`: exit 0 - `pnpm check:cli-command-ids`: exit 0 - `pnpm check:cross-package-test-inputs`: exit 0 - `pnpm check:driver-memory-census`: exit 0 - `pnpm check:dts-closure`: exit 3, NOT MEASURED (PREREQUISITE NOT MET: no `dist/`) - `pnpm check:dual-build-cjs-loads`: exit 3, NOT MEASURED (PREREQUISITE NOT MET: no `dist/`) - `pnpm check:entry-guard`: exit 0 - `pnpm check:gitlink-declared`: exit 0 - `pnpm check:lean-entry-closure`: exit 3, NOT MEASURED (PREREQUISITE NOT MET: no `dist/`) - `pnpm check:nul-bytes`: exit 0 - `pnpm check:parse-guard`: exit 0 - `pnpm check:pnpm-filter-targets`: exit 0 - `pnpm check:pnpm-flag-spellings`: exit 0 - `pnpm check:ratchet-remedy-authority`: exit 0 - `pnpm check:refd-timer-probe`: exit 0 - `pnpm check:scripts-symbol-anchors`: exit 0 - `pnpm check:sourcemap-no-sources-content`: exit 3, NOT MEASURED (PREREQUISITE NOT MET: no `dist/`) - `pnpm check:watch-hint-literal`: exit 0 - `pnpm check:merge-driver`: exit 0 - `pnpm check:durability-log-level`: exit 0 - `pnpm check:stack-collection-maps`: exit 0 Verdict lines: `check:merge-driver` prints `check-regen-pending self-test passed`; `check:durability-log-level` prints `durability-degradation log levels: 59 durability-critical catch seam(s), all loud, rethrowing or propagating`; `check:stack-collection-maps` prints `18 assertions over synthetic sources` and `8 enumerations reconciled against 35 declared collections`. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jUg7BKfRBcTPyMxbLh)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#1 · os-project-manager · session_01FEkQ5pHNFS9mn8hS13iGyL --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 162fe54 commit b0da5a5

204 files changed

Lines changed: 342 additions & 16275 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ packages/spec/json-schema/
6868
packages/spec/src/migrations/registry.ts
6969
packages/spec/src/migrations/registry.ts.*.tmp
7070

71-
# Scratch dir of `codemod-split-conversions-registry.mjs --arrays`: its mkdtemp
71+
# Scratch dir of the registry codemod's `--arrays` run (split by #29993): its mkdtemp
7272
# sits inside packages/spec so the copied src resolves the package's own
7373
# node_modules; removed in a finally, ignored here in case a run is killed.
7474
packages/spec/.codemod-arrays-*/

‎packages/drivers/driver-sql/src/sql-driver-aggregation.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* [#29520 codemod] The "Aggregation" section of `SqlDriver`: the bodies of
55
* `aggregate`, `aggregandColumnClassOf`, `foldEmptyAggregateAnswers` moved out
6-
* of `sql-driver.ts` whole by `scripts/codemod-split-sql-driver.mjs`.
6+
* of `sql-driver.ts` whole (split by #29598 and #30139).
77
*
88
* A MOVE, not a redesign. {@link AggregationFacet} is a stateless facet of `SqlDriver`
99
* (ruling 6624345766): each static method of it is the body of the `SqlDriver`

‎packages/drivers/driver-sql/src/sql-driver-bulk-operations.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* [#29520 codemod] The "Bulk & Batch Operations" section of `SqlDriver`: the
55
* bodies of `bulkCreate`, `bulkUpdate`, `bulkDelete`, `updateMany`,
66
* `deleteMany`, `rotatedUpdateById`, `count` moved out of `sql-driver.ts` whole
7-
* by `scripts/codemod-split-sql-driver.mjs`.
7+
* (split by #29598 and #30139).
88
*
99
* A MOVE, not a redesign. {@link BulkOperationsFacet} is a stateless facet of `SqlDriver`
1010
* (ruling 6624345766): each static method of it is the body of the `SqlDriver`

‎packages/drivers/driver-sql/src/sql-driver-class-head.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* `knexConfigFor`, `withConnectBound`, `withUtcSession`,
99
* `withMysqlCalendarDayAsText`, `withPostgresCalendarDayAsText`,
1010
* `installQueryTiming`, `assertSchemaMutable`, `assertDialectEmits` moved out
11-
* of `sql-driver.ts` whole by `scripts/codemod-split-sql-driver.mjs`.
11+
* of `sql-driver.ts` whole (split by #30139 and #30306).
1212
*
1313
* A MOVE, not a redesign. {@link ClassHeadFacet} is a stateless facet of `SqlDriver`
1414
* (ruling 6624345766): each static method of it is the body of the `SqlDriver`

‎packages/drivers/driver-sql/src/sql-driver-column-creation.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* `varcharPackLength`, `varcharColumnChars`, `rowWidthProfile`,
1111
* `schemaBytesPerChar`, `explainRowSizeOverflow`,
1212
* `rethrowWithRowSizeExplanation`, `jsonColumn`, `createColumn` moved out of
13-
* `sql-driver.ts` whole by `scripts/codemod-split-sql-driver.mjs`.
13+
* `sql-driver.ts` whole (split by #29598 and #30363).
1414
*
1515
* A MOVE, not a redesign. {@link ColumnCreationFacet} is a stateless facet of `SqlDriver`
1616
* (ruling 6624345766): each static method of it is the body of the `SqlDriver`

‎packages/drivers/driver-sql/src/sql-driver-crud.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* [#29520 codemod] The "CRUD — IDataDriver core" section of `SqlDriver`: the
55
* bodies of `find`, `findRows`, `findOne`, `create`, `readBackInsertedRows`,
66
* `ensureSequencesTable`, `sequenceKeyHash` moved out of `sql-driver.ts` whole
7-
* by `scripts/codemod-split-sql-driver.mjs`.
7+
* (split by #29598 and #30139).
88
*
99
* A MOVE, not a redesign. {@link CrudFacet} is a stateless facet of `SqlDriver`
1010
* (ruling 6624345766): each static method of it is the body of the `SqlDriver`

‎packages/drivers/driver-sql/src/sql-driver-database-helpers.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* `sqliteFilename`, `ensureDatabaseExists`, `createDatabase`,
66
* `setFileColumnsMovedResolver`, `setTenantKeyCertifiedResolver`,
77
* `isTenantKeyCertified`, `resolveFileColumnsMoved`, `mediaColumnIsJson`,
8-
* `isJsonField` moved out of `sql-driver.ts` whole by
9-
* `scripts/codemod-split-sql-driver.mjs`.
8+
* `isJsonField` moved out of `sql-driver.ts` whole (split
9+
* by #29598 and #30249).
1010
*
1111
* A MOVE, not a redesign. {@link DatabaseHelpersFacet} is a stateless facet of `SqlDriver`
1212
* (ruling 6624345766): each static method of it is the body of the `SqlDriver`

‎packages/drivers/driver-sql/src/sql-driver-deferred-ddl.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/**
44
* [#29520 codemod] The "Deferred schema DDL (#3917)" section of `SqlDriver`:
55
* the bodies of `setDeferredDdl`, `getSchemaSyncStats`,
6-
* `flushDeferredSchemaDdl` moved out of `sql-driver.ts` whole by
7-
* `scripts/codemod-split-sql-driver.mjs`.
6+
* `flushDeferredSchemaDdl` moved out of `sql-driver.ts` whole (split
7+
* by #30139).
88
*
99
* A MOVE, not a redesign. {@link DeferredDdlFacet} is a stateless facet of `SqlDriver`
1010
* (ruling 6624345766): each static method of it is the body of the `SqlDriver`

‎packages/drivers/driver-sql/src/sql-driver-distinct.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
/**
44
* [#29520 codemod] The "Distinct" section of `SqlDriver`: the bodies of
5-
* `distinct` moved out of `sql-driver.ts` whole by
6-
* `scripts/codemod-split-sql-driver.mjs`.
5+
* `distinct` moved out of `sql-driver.ts` whole (split
6+
* by #29598).
77
*
88
* A MOVE, not a redesign. {@link DistinctFacet} is a stateless facet of `SqlDriver`
99
* (ruling 6624345766): each static method of it is the body of the `SqlDriver`

‎packages/drivers/driver-sql/src/sql-driver-facet-hosts.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* when a body assigns it), so a body reads and writes the driver exactly as
1212
* the per-call literal let it.
1313
*
14-
* Written by `scripts/codemod-split-sql-driver.mjs`; it imports types only, so it forms no
14+
* Written by the sql-driver codemod (split by #30139); it imports types only, so it forms no
1515
* evaluation cycle and is evaluated before the class whichever module loads
1616
* first. `index.ts` re-exports nothing from this module.
1717
*/

0 commit comments

Comments
 (0)