Repository navigation
refactor(driver-sql): the durability gate and the compile-refusal enumeration read the sql-driver facade, so the codemod moves four more members (#30147 phase 2b) - #30306
Conversation
…meration read the sql-driver facade, so the codemod moves four more members (#30147 phase 2b) check-durability-degradation-log-level.mjs follows a catch's log helper across the facade (FACADE_LOG_HOP): `this.x()` in a sql-driver-*.ts facet module resolves to SqlDriver#x through the module's host interface, and a `<X>Facet.x.call(<y>Host.of(this), ...)` stub is read as the facet body. sql-driver-compile-refusal-seam.test.ts reads every sql-driver-*.ts module and names a facet static as the SqlDriver method it is. The codemod drops the logDurabilityFailure pin, the runWideningAlters needle and the CLASS_PATH_READER_NEEDLES rows; regenerated from 21510bb, logDurabilityFailure, migrateMysqlDatetimeColumns, migrateMysqlTimeColumns and resolveWithheldFilterRefusal move (175/175 bodies identical, public .d.ts byte-identical). Registry 73 -> 69 rows. Claude-Session: https://claude.ai/code/session_01WGufzj4B2cbnRLVdgtLcDZ Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check20 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. 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 fa8a9305c1a07bf31e5c74e518bbf5ac4a0445bc && git checkout fa8a9305c1a07bf31e5c74e518bbf5ac4a0445bc
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8b117c0e54a685b9fe580ae595f71ac3685f80b3 d3ca391c9eca6f31cfbded4d38466ff71db28b1f && git checkout -B drift-repro 8b117c0e54a685b9fe580ae595f71ac3685f80b3 && git merge --no-ff d3ca391c9eca6f31cfbded4d38466ff71db28b1f
node scripts/docs-audit/affected-docs.mjs --json 8b117c0e54a685b9fe580ae595f71ac3685f80b3 |
|
domain:devx#1 · os-support-ai · session_01WGufzgBDcBNVmSmo7VFHpj Stamp: 2026-11-05T05:40Z 维护者速读
席位核对
|
Requested by Yibo Wang · project thread
Part of #30147 (phase 2b of 2a-2d: two by-path readers learn the facade form, so the codemod moves four more members. 2c, 2d and the phase 3 measurement stay open on the card.)
维护者速读
check-durability-degradation-log-level.mjs学会跨文件跟随 sql-driver 的 facade(facet 模块里的this.x()调到SqlDriver#x,再穿过 stub 到 facet 方法体);sql-driver-compile-refusal-seam.test.ts改为读取全部sql-driver-*.ts模块。codemod 因此去掉 1 个 pin 和 4 个 needle,重新生成后又有 4 个成员变成委托,登记表 73 → 69。sql-driver.ts本文件,codemod 只好把这些方法留在类上;读者学会新形态后,codemod 才能把它们移走(Facade codemods: retire the codemod-limit exception rows in the facade gate registry (protocol.ts, engine.ts, sql-driver.ts) #30147,裁决 6597555122 第 3 条)。.d.ts与 base 相同;durability 门禁在 base 和 head 上读到同样的 52 个 seam、同样的判定,只有两个 seam 的位置从sql-driver.ts换到sql-driver-rotation.ts。回滚即 revert。FACADE_LOG_HOP/createFacadeLogHop和collectLoggedLevels里的 6 行接入;测试里sources的改法。node scripts/check-durability-degradation-log-level.mjs --self-test(新增 10 行通过)和node scripts/codemod-split-sql-driver.mjs --verify --base 21510bba(175/175,退出 0)。Clause-②: no
Metadata-protocol: none
What changes
Two readers took
sql-driver.tstext by path, so the codemod pinned four members on the class. Each reader now reads the facade form, and the pins go.scripts/check-durability-degradation-log-level.mjs. Its catch side follows a log helper to its body by name, in the same file. A catch the codemod moves into a facet module callsthis.logDurabilityFailure(…), which that module does not declare. OncelogDurabilityFailureitself moves, the method the call reaches is a one-call stub. Either way the catch read "swallowed, no log": with the pins removed and no reader change, the gate reds the tworunWideningAlters()catches insql-driver-rotation.ts.FACADE_LOG_HOPfollows exactly the two shapes the codemod writes:this.x(…)in asql-driver-*.tsmodule, inside a function whosethisis the module's own host interface (bare or through aPicknamingx), whose memberxis typedT['x']withTtheSqlDriverclass imported from./sql-driver.js(directly or asSqlDriverClass), resolves toSqlDriver#xinsql-driver.ts. That is one hop, the same hop the call made before the move.SqlDrivermethod whose last statement returns<X>Facet.x.call(<y>Host.of(this), …)is read as the facet's staticx. This costs no depth.Every other shape stays unresolved, as before. A log found across the hop is reported at the line of the call in the file being judged. The hop is handed in by
run()to the log-level rule only. The read-seam rule's scan roots do not includedriver-sql, so the two rules still agree on every file they both read.packages/drivers/driver-sql/src/sql-driver-compile-refusal-seam.test.ts. The enumeration read five named files. It now reads everysql-driver-*.tsmodule in the directory. A facet's staticxis namedSqlDriver.x, because it is that method's body. The positive control also asserts that the five files it used to read, plus one facet module, are still among those it reads. The pinned sets are unchanged.Codemod (
scripts/codemod-split-sql-driver.mjs). These entries are gone:logDurabilityFailurepin;this.runWideningAlters(needle;CLASS_PATH_READER_NEEDLESrows (the table stays, empty, with its comment rewritten).The tree is regenerated from
21510bba, sologDurabilityFailure,migrateMysqlDatetimeColumns,migrateMysqlTimeColumnsandresolveWithheldFilterRefusalmove.sql-driver.tsgoes from 10,717 to 10,624 lines.Registry. The four rows are deleted, so 73 rows become 69.
Tests
analyzeSourceFilethe wayrun()drives it, over multi-file fixtures:warnbody is judged at that level;Pickomits and a class type imported from elsewhere each resolve nowhere;SqlDriverClassalias resolves;sql-driver.tscatch follows the stub;<y>Host.of(this)is not followed.The
selfTestpartition floor goes 70 → 80 and the roster total 137 → 147.9b8a5867and at head; the counts are equal.vitest run)SqlDriver)SqlDriver)check-liveness.testAcceptance notes
check-durability-degradation-log-level.mjsis a by-path reader, not the facade gate. The facade gate script and its self-test are untouched.skip-changeset): no published behaviour or surface changes.Verification
Head
d3ca391c, baseorigin/main9b8a5867.Proof readings
node scripts/codemod-split-sql-driver.mjs --verify --base 21510bbaexit 0, "175/175 moved bodies identical to base (body, parameters, return type, async); 127/127 moved top-level declarations identical to base; sql-driver.ts 18334 -> 10624 lines; undoing the split does rebuild the base byte-for-byte".--writeruns from the unsplit input give tree sha2565044055d6e0d47825283c7fe8d3c539a823909573a382434b0cda80e1b76326cboth times.--listat base and head: 52 seams, the same verdicts. The only change is the location of the tworunWideningAlters()seams, fromsql-driver.ts:5187/:5281tosql-driver-rotation.ts:327/:373, both "recovers on one branch, loud (error … via logDurabilityFailure())". Without the hop, head reds those two..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.--self-test36 exit 0.node scripts/pm/dispatch-gates.mjs --commands: 74 derived commands, each run, all exit 0;--ranreconciles 74 derived, 74 run, 0 NOT-MEASURED. Also run: the codemod, durability,check-tenant-chokepointand facade gate--self-tests,check:lean-entry-closure, eslint over the changed files, all exit 0.Generated by Claude Code