Skip to content

Codemod split: generate per-entry files and an index for spec conversions/registry.ts with a deterministic script #29987

Closed

Description

@objectstack-fleet

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

Filing gate: ruling 6583399215 on #29465 (letter A, maintainer 「同意」 2026-11-02T17:11Z), whose exit stroke 6583664223 names one card per remaining file, filed into its lane by the domain:devx seat once the pilot #29520 merged. It merged as PR #29598 (d46b1ff23f, 2026-11-03T16:26Z). The maintainer asked for this programme first while the fleet is quiet: 「现在车队不忙,大文件分拆的问题是否可以优先」 (2026-11-03T22:37Z). ⛔ Not a claim. No grade: triage sets it and routes it.

Ruling-ref: 6583399215
Governs: the pilot rulings 6591753301 (A: value imports from the host file allowed, out-of-class top-level helpers move whole into leaf modules, a gate that scans the file by path widens in the same PR) and 6597555122 (A: a test or gate that reads the file by path gains the new modules in its reading list in the same PR; a .d.ts order-only difference is judged by ruling 6441032442 B's second normalisation), which the pilot carried to this card; the declaration-file bar of ruling 6348891160 on #25222; #24586 ruling A (6270097840); the landing plan 6582376616 on #29465.

Reader who acts: a domain:spec seat (the file is packages/spec), dispatching one dev.

What to build

  1. A deterministic codemod for packages/spec/src/conversions/registry.ts (16,019 lines on main c92b8872). It is a table, not a class: the conversion entries ahead of CONVERSIONS_BY_MAJOR (line 15987) and ALL_CONVERSIONS (16016). Per ruling 6583399215 it splits into per-entry files plus a generated index, as Split migrations/registry.ts's two append tables into per-entry files (registry half of #6957's ruling) #7297 did for the migrations registry. The exported names, their order in CONVERSIONS_BY_MAJOR and ALL_CONVERSIONS, and every entry's text stay as they are.
  2. The script's own proofs: byte-identity of every moved entry, the declaration bar of ruling 6348891160 judged by 6441032442's second normalisation, determinism, the arrays' contents and order equal at base and head (ALL_CONVERSIONS mapped to ids), and every gate, census or test that reads registry.ts by path widened in the same PR (retired-after.census.* and the authorable-surface and D3 gates are the first to check).
  3. Type-check and the spec suite including test:repo at the base counts.

How it lands (landing plan 6582376616)

  • Phase 0, no pause: build and prove the codemod and its generated split in a draft PR. Nothing else on the file stops.
  • Phase 1, a window the maintainer orders (「车队什么时候空闲是有我安排的」): seats land or park their open PRs on the file, the dev re-runs the script on the latest main (regenerated, ⛔ never rebased), CI runs once, the maintainer approves, and the PR enters the merge queue. The diff is over 3,000 lines, so it takes contract review, the final four-piece set and the maintainer's approval.
  • ⛔ The generated split is never hand-edited to pass. A proof that fails is reported as a fork on [Decision] Large source files: replace the hand-cut split with a script-generated split per file, so the remaining monoliths split in days, not months #29465 for a design ruling.

Done when

The draft PR holds the script and the generated split with every proof passing, and it has landed in the maintainer's window; or the fork is reported on #29465.

Re-measure: git show origin/main:packages/spec/src/conversions/registry.ts | wc -l; git log --since='7 days ago' --oneline origin/main -- packages/spec/src/conversions/registry.ts | wc -l.

Dedupe (open and closed): codemod, split in:title, 拆分, large file, 29465. Hits: #29465, #29520, #24586, #25467, #25522, #25521. None is a per-file codemod card for this file. New.

Activity

  1. added
    domain:specDomain lane — seat card indexed by label:pm:seat
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    on Nov 3, 2026
  2. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    Claim: PM loop round 10 (maintainer-prioritised programme, Phase 0 only)
    Session: session_01WGufzfgvGexKn9vLHsy89K
    Account: os-support-ai
    Branch: the card thread's own claude/project-thread-* branch, named in the dev's hand-back and restated in a later claim (a measured platform exception to claude/issue-29987-…)
    Worktree: objectstack-issue-29987
    Domain: domain:spec (the whole split tree is packages/spec/src/conversions/**; the codemod script under scripts/ is the claiming seat's followed surface, as scripts/codemod-split-sql-driver.mjs was for the pilot)
    Seat: domain:spec#3
    File surface: scripts/codemod-split-conversions-registry.mjs (or beside the pilot's script), packages/spec/src/conversions/registry.ts → per-entry files plus a generated index, every gate, census or test that reads registry.ts by path (widened in the same PR, per ruling 6597555122), the script's proof tests.
    Container & model: L, mode:thread, model: TIER_DEFAULT, effort: high (the pilot #29520's tier)
    Clause-②: no (move-only: no export, accept set or declaration changes, bar 6348891160)
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6583664223
    Premise: holds. registry.ts is 16,019 lines at origin/main c92b8872 (3 commits in 7 days). The pilot #29520 landed as PR #29598 (d46b1ff23f, 16:26Z today). The domain:devx seat filed this card into the spec lane per exit stroke 6583664223.
    Dispatch basis: the maintainer's 「现在车队不忙,大文件分拆的问题是否可以优先」 (2026-11-03T22:37Z) raises this programme ahead of the p1/p2-only rule while the fleet is quiet. Triage's first touch (grade) is still owed and is not pre-empted: this claim sets no priority:*.
    Scope: Phase 0 of landing plan 6582376616 only, a draft PR with the codemod, the generated split and every proof. Phase 1 (regenerate on the latest main, land) waits for a window the maintainer orders; the PR is over 3,000 lines, so it needs the maintainer's approval.
    Serial constraints cleared: none in flight on registry.ts from this seat; Phase 0 pauses nothing.

  3. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    Claim: PM loop round 10 (maintainer-prioritised programme, Phase 0 only), restated with the branch
    Session: session_01WGufzfgvGexKn9vLHsy89K
    Account: os-support-ai
    Branch: claude/project-thread-enusuc (card thread, executor session_01WGufzg1QFj9ukYzafVoAqg; the thread can push only its own branch, a measured platform exception to claude/issue-29987-…)
    Worktree: objectstack-issue-29987
    Domain: domain:spec (the whole split tree is packages/spec/src/conversions/**; the codemod script under scripts/ is the claiming seat's followed surface, as scripts/codemod-split-sql-driver.mjs was for the pilot)
    Seat: domain:spec#3
    File surface: scripts/codemod-split-conversions-registry.mjs (or beside the pilot's script), packages/spec/src/conversions/registry.ts → per-entry files plus a generated index, every gate, census or test that reads registry.ts by path (widened in the same PR, per ruling 6597555122), the script's proof tests.
    Container & model: L, mode:thread, model: TIER_DEFAULT, effort: high (the pilot #29520's tier)
    Clause-②: no (move-only: no export, accept set or declaration changes, bar 6348891160)
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6617599599
    Premise: holds. registry.ts is 16,019 lines at origin/main c92b8872 (3 commits in 7 days). The pilot #29520 landed as PR #29598 (d46b1ff23f, 16:26Z today). The domain:devx seat filed this card into the spec lane per exit stroke 6583664223.
    Dispatch basis: the maintainer's 「现在车队不忙,大文件分拆的问题是否可以优先」 (2026-11-03T22:37Z) raises this programme ahead of the p1/p2-only rule while the fleet is quiet. Triage's first touch (grade) is still owed and is not pre-empted: this claim sets no priority:*.
    Scope: Phase 0 of landing plan 6582376616 only, a draft PR with the codemod, the generated split and every proof. Phase 1 (regenerate on the latest main, land) waits for a window the maintainer orders; the PR is over 3,000 lines, so it needs the maintainer's approval.
    Serial constraints cleared: none in flight on registry.ts from this seat; Phase 0 pauses nothing.

  4. added
    pm:blockingDerived cache from the Blocked-by reverse index: open card with open dependents — never hand-set
    on Nov 3, 2026
  5. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzg1QFj9ukYzafVoAqg
    os-dev-report
    Stamp: 2026-11-04T00:41Z

    {
      "issue": 29987,
      "status": "done",
      "branch": "claude/project-thread-enusuc",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/29993",
      "head": "a8c5d94d081c6858f792d977361b87f7564f1ff6",
      "base": "5cdaddbc997cdc4cf3d143121e1fe2a78d0089e9",
      "draft": true,
      "labels": ["skip-changeset"],
      "assignees": 0,
      "reviewers": 0,
      "session": "session_01WGufzg1QFj9ukYzafVoAqg",
      "premise_still_valid": true,
      "phase": "0 (draft only; Phase 1 waits for the maintainer's window)",
      "declarations": { "Clause-②": "no (move-only)", "Metadata-protocol": "none", "Ruling-ref": "6583399215", "Skills-docs": "follow-up owed — .claude/skills/spec-property-retirement/SKILL.md", "ADR-0087 D3": "no migration entry moves" },
      "proofs": {
        "byte_identity": "--verify --base 5cdaddbc exit 0: 159 statements, 727159 bytes; 112/112 entries, 42 helpers (11 in entries/shared.ts), 5 stayed; 113 modules; 584 import bindings; registry.ts 16019 -> 354 lines; undo rebuilds base byte for byte",
        "tables": "--arrays --base 5cdaddbc exit 0: exports equal; ALL_CONVERSIONS 112 ids sha256 6dfde60307ccd336d6265e84bb095632acbbdbcd08483d73f5e83070c9728ae7; CONVERSIONS_BY_MAJOR {11:3,15:2,17:12,18:95} equal in membership and order; 112/112 digests equal",
        "determinism": "two plan runs: tree sha256 960cdabf7a6532e0f0ffaa035cbe200a85b0eff2a1ddea58b0df515b4147d74b both; --write from base registry.ts leaves git diff HEAD empty",
        "dts": "quiet builds: 134/134 declaration files raw identical (set sha256 757dc13d98549d73dc2c199941bd2f75b49dd071e1ccfa139472b5e72ea9dcbc both sides); control (renamed declaration) caught, normalised and surface DIFFER; codemod --dts PASS; dtsnorm.mjs sha256 e0b4b0c3d6a29e99dea99b2a65b683b0649f3e7c6d4fa671b994d590d48219b4 (project files issue-29987/)",
        "dts_irregular_builds": "2 of 4 head builds (both beside unlocked gate runs in the same worktree) differed in 10-18 files by string-literal member order inside mapped types, surface digest EQUAL; 2 quiet head builds and 4 base builds identical; cause not established",
        "self_test": "40 cases in 6 batteries pass"
      },
      "tests": {
        "spec_local": "base 808/808 files, 24277 tests + 1 todo; head 807 + 1 named skip (root-entry-type-nameability, dist stale), 24275 + 1 skipped + 1 todo; that file after the head build with OS_EXPECT_ROOT_NAMEABILITY=1: 2/2",
        "spec_test_repo": "base 89 files / 1524 tests; head 89 / 1524",
        "merge18_test": "widened 12/12; base version on split tree fails 3",
        "affected_docs_self_test": "605 pass; pre-edit version fails 2 on split tree",
        "adr0087_self_test": "710 assertions pass",
        "pure_schema_construction": "7/7 including the ./shared consumer bundle",
        "typecheck": "spec typecheck exit 0 with NODE_OPTIONS=--max-old-space-size=6144 (without it check:test-typecheck OOMs at ~2 GB at base and head alike)",
        "core_dependent": "tsc main + examples exit 0 against head dist; check:test-typecheck 4 problems identical at base (TS2307 unbuilt sibling packages)"
      },
      "gates": "dispatch-gates --commands: 96; 92 exit 0; 4 exit 3 NOT MEASURED (check:doc-formula-expressions, check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure: sibling packages unbuilt); --ran exit 0: 96 accounted, 92 run, 4 NOT-MEASURED, 0 unrun",
      "changeset": "none; Check Changeset is answered by skip-changeset per 6441032442 item 4 (dts raw identical), precedent PR #29598",
      "changed_lines": "35210 (+19393 / -15817, 121 files), over the 3000 threshold",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "8 reads (issue_read 4, pull_request_read 2, get_file_contents 2); no write tool",
      "api_writes": "1 relay pr_create (run 41748498076, body read back identical 12002 bytes) + this comment via post-stamped",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["spec DTS build: 2 of 4 head builds read differently beside concurrent gate runs; noted, not filed", "liveness/action.json cites registry.ts:5578, stale on main before this PR; noted, not filed"]
    }

    Generated by Claude Code

  6. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    ACCEPT → PR #29993 comment 6629146609 (head dca57060, Phase 1 contract review PASS 6628915927, APPROVED by os-zhuang 5766718516, window approved by the maintainer). Ready + auto-merge through the queue.

  7. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    Landed: PR #29993 merged at merge commit d79eecfe. conversions/registry.ts is now split into per-entry modules by the codemod, under the maintainer's approval and freeze window. The card closes by Fixes, and the seat removes pm:dispatched.

    Carried: the base-vs-base .d.ts build nondeterminism on main, measured during review, goes to a follow-up card. #29994 already covers the skill text and the MAJOR_18_CONVERSIONS docblock.

    Posted 2026-11-04T12:07Z.

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

Metadata

Metadata

Assignees

Labels

domain:specDomain lane — seat card indexed by label:pm:seatpm:blockingDerived cache from the Blocked-by reverse index: open card with open dependents — never hand-setpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions