Repository navigation
refactor(driver-sql): the codemod writes applyFilterCondition's return type, so it moves (#30147 phase 2d) - #30441
objectstack-fleet[bot] wants to merge 1 commit into
Conversation
…n type, so it moves (#30147 phase 2d) EXPLICIT_RETURN_TYPES gains applyFilterCondition: 'void', copied from the base dist/index.d.ts. Regenerated from 21510bb: its body moves to sql-driver-filter-helpers.ts; the registry loses its row (68 -> 67). Claude-Session: https://claude.ai/code/session_01WGufzj4B2cbnRLVdgtLcDZ Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 10 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 13 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin cc32746a9a0f2b9605ac789db43a9079f4fd48b6 && git checkout cc32746a9a0f2b9605ac789db43a9079f4fd48b6
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f18adce2f65b9de8ce3b7de1c3ba870bebb53420 322898a687bae7d7fb25e178c7c56383c290a7d4 && git checkout -B drift-repro f18adce2f65b9de8ce3b7de1c3ba870bebb53420 && git merge --no-ff 322898a687bae7d7fb25e178c7c56383c290a7d4
node scripts/docs-audit/affected-docs.mjs --json f18adce2f65b9de8ce3b7de1c3ba870bebb53420
|
|
domain:devx#1 · os-support-ai · session_01WGufzgBDcBNVmSmo7VFHpj Stamp: 2026-11-05T11:35Z 维护者速读
席位核对
|
Requested by Yibo Wang · project thread
Part of #30147 (phase 2d, the last of 2a-2d: the codemod writes
applyFilterCondition's return type, so it moves. The phase 3 measurement is posted on the card.)维护者速读
EXPLICIT_RETURN_TYPES新增applyFilterCondition: 'void'(取自 base 构建出的dist/index.d.ts),重新生成后它的方法体移到sql-driver-filter-helpers.ts,登记表删去这一条(68 → 67)。.d.ts与 base 逐字节相同;回滚即 revert。sql-driver.ts上applyFilterCondition的 stub。node scripts/codemod-split-sql-driver.mjs --verify --base 21510bba(181/181,退出 0)和node scripts/check-facade-delegation-only.mjs(67 条具名例外,退出 0)。Clause-②: no
Metadata-protocol: none
What changes
scripts/codemod-split-sql-driver.mjs).EXPLICIT_RETURN_TYPESgainsapplyFilterCondition: 'void'. The type is copied from the basedist/index.d.ts(protected applyFilterCondition(builder: Knex.QueryBuilder, condition: any, logicalOp?: 'and' | 'or', tableHint?: string | null, rootFilter?: unknown, options?: DriverOptions): void;).21510bba. The body ofapplyFilterConditionmoves tosql-driver-filter-helpers.ts, and the class keeps its signature with: voidwritten as a one-call stub.sql-driver.tsgoes from 9,741 to 9,354 lines. No generated file is edited by hand.The two
sql-driver.tsrows left on #30147 areget supportsandstatic DIALECT_CONNECT_TIMEOUT. The phase 3 report on #30147 recommends that both stay as accepted exceptions.Tests
--self-testalready pins theEXPLICIT_RETURN_TYPESmechanism (battery "codemod-limit retirements (Facade codemods: retire the codemod-limit exception rows in the facade gate registry (protocol.ts, engine.ts, sql-driver.ts) #30147)" from refactor(driver-sql): the sql-driver codemod retires 15 facade-gate exception rows (knex calls, spelled return types, comments in parameters, accessors, computed defaults, the logger default) (#30147 phase 2a) #30249). All 106 cases in 7 batteries pass.d3f23d20and at head; the counts are equal.vitest run)SqlDriver)SqlDriver)check-liveness.testAcceptance notes
skip-changeset): no published behaviour or surface changes (the public.d.tsis byte-identical).Verification
Head
322898a6, baseorigin/maind3f23d20.Proof readings
node scripts/codemod-split-sql-driver.mjs --verify --base 21510bbaexit 0: "181/181 moved bodies identical to base (body, parameters, return type, async); 129/129 moved top-level declarations identical to base (leading comments included); sql-driver.ts 18334 -> 9354 lines; undoing the split does rebuild the base byte-for-byte".--writeruns from the unsplit input give output tree sha256b8a840238252ab67a7a7ae782a0870e03200f1da9d55cc75f4f07f16f9ac0272both times (input sha2562d2ebebd…), and the tree on disk is unchanged by either..d.ts:dts-public.mjsover the base and headdistexit 0,pass: true, both files raw-equal (index.d.tssha25692e2cfb2…on both sides).pnpm --filter @objectstack/driver-sql typecheckexit 0.check-tenant-chokepoint: 24/21/3/4/0 across 39 files at base and head;--self-testexit 0.--list: byte-identical output at base and head (52 seams).--self-testexit 0.node scripts/pm/dispatch-gates.mjs --commands: 65 derived commands, each run, all exit 0;--ranreconciles 65 derived, 65 run, 0 NOT-MEASURED. Also run: the codemod,check-keyed-text-bounds, durability,check-tenant-chokepointand facade gate--self-tests,check:lean-entry-closure, eslint over the changed files, all exit 0.Generated by Claude Code