Skip to content

Codemod split: put driver-sql sql-driver.ts into facade form with a deterministic script, like protocol.ts and engine.ts #30105

Open

Description

@objectstack-fleet

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

Filing gate: maintainer ruling 6632500982 on #29465 (decision card pick 「直接立卡拆」, 2026-11-04T13:55Z). It extends the facade form of ruling 6624258595 to sql-driver.ts. ⛔ Not a claim.

Ruling-ref: 6632500982
Governs: 6624258595 items 1 and 2 (facade form, generated, under the same proofs); 6624345766 (public-surface .d.ts EQUAL, plus named exceptions that cite a card); 6597555122 item 3 (by-path readers widen in the same PR); 6591753301 (the pilot's cut-pattern widening); the landing plan 6582376616.

Reader who acts: the domain:devx seat (the pilot #29520's lane), dispatching one dev.

What to build

  1. Extend scripts/codemod-split-sql-driver.mjs, the pilot's script, with the facade layer the server codemods added: scripts/codemod-split-engine.mjs (Codemod split: generate the objectql engine.ts split with a deterministic script, verified byte-identical #29986 / PR refactor(objectql): generate the engine.ts section split with a deterministic codemod #30012, plus the facet-host compression of refactor: compress the codemod facade stubs in engine.ts and protocol.ts — one shared host per facet instead of a per-call host literal (body-identical; about 1,000 lines off engine.ts) #30051 / PR refactor(objectql): one shared host per facet in the engine.ts codemod stubs (body-identical; engine.ts 14,140 -> 13,548) #30083) and scripts/codemod-split-protocol.mjs (Codemod split: generate the rest of the metadata-protocol protocol.ts split with a deterministic script, verified byte-identical #29985 / PR refactor(metadata-protocol): generate the protocol.ts section split with a deterministic codemod #29998).
    • SqlDriver in packages/drivers/driver-sql/src/sql-driver.ts (12,460 lines on main f68b47ca, class from line 357) becomes a thin facade.
    • Every public member stays as a one-line delegation to stateless facet classes over the host.
    • Shared state stays on the facade.
    • Private docblocks move with their bodies; public docblocks stay on the facade.
  2. Run the pilot's proofs plus the facade proofs:
  3. Register the facade in scripts/facade-delegation-registry.json in the same PR, so the tooling: a structural gate that refuses any method body in a facade file once protocol.ts and engine.ts land in facade form (ruling 6624258595) #30019 gate (PR tooling: a structural gate that keeps a registered facade class delegation-only #30030) guards it on landing. Each member the codemod cannot make a delegation gets a named exception row. That row cites the card that will move it: refactor: move shared state out of the protocol.ts and engine.ts facades into state-owning facets, so the hot bodies left on the class can become delegations (ruling 6624345766) #30020 for state-owning bodies, or a new card the dev names for codemod limits.

How it lands (landing plan 6582376616)

Done when

The draft PR holds the extended script, the generated facade and the registry row, with every proof passing, and it has landed in the maintainer's window. The alternative ending is a fork reported on #29465.

Re-measure: git show origin/main:packages/drivers/driver-sql/src/sql-driver.ts | wc -l; git log --since='7 days ago' --oneline origin/main -- packages/drivers/driver-sql/src/sql-driver.ts | wc -l (3 at filing).

Dedupe (open and closed): sql-driver facade, codemod split, 29465. Hits: #29465, #29520 (the pilot, closed), #29985 and #29986 (the facade cards, closed). None is a facade card for this file. New.

Activity

  1. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop · card thread · 2026-11-04T13:59Z
    Session: session_01WGufzhBZia3VxBbmZ7wCkS (dev: os-dev card thread; seat session_01WGufzgBDcBNVmSmo7VFHpj)
    Account: os-support-ai
    Branch: claude/project-thread-y0okk4 (harness-pinned card-thread branch; platform exception to claude/issue-<n>-<slug>)
    Worktree: the card thread's own container checkout
    Domain: domain:devx
    Seat: domain:devx#1
    Ruling-ref: 6632500982 (extends 6624258595 items 1-2; 6624345766; 6597555122 item 3)
    File surface: scripts/codemod-split-sql-driver.mjs (facade layer), generated packages/drivers/driver-sql/src/sql-driver.ts and new facet/host modules beside it, by-path readers of sql-driver.ts, scripts/facade-delegation-registry.json (one facade row plus its exception rows). ⛔ No hand edit of generated output; no edit to the gate script.
    Container & model: L, mode:thread, model: TIER_DEFAULT, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: sql-driver.ts lands as a delegation-only facade under the #30019 gate, with public .d.ts EQUAL and bodies byte-identical
    Thread-read: none
    Premise: holds (sql-driver.ts 12,460 lines on main f68b47ca; the pilot script and both facade codemods are on main)
    Serial constraints cleared: no open PR touches sql-driver.ts (3 commits in 7 days); Phase 0 is a draft, landing waits for the maintainer's window

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions