Skip to content

Commit fd5a1cd

Browse files
docs(driver-turso): re-anchor the dead tracker citations to the commits that decided them (stage 10 of #20595) (#21546)
Part of #20595 Clause-②: no ## What changed Stage 10 of the `domain:engine` lane of the dead-citation sweep: `packages/drivers/driver-turso/**`, comment and docblock prose only, per the claim (`5965451347`). Stages 1 to 9 landed as `a7d9768ec`, `d150c3039`, `4bf4e7e70`, `13a24ece2`, `db0cf2231`, `85986144c`, `48fa7a381`, `c205b6c35` and `c98a72d69`. #20595 stays open: the other half of this lane is the packages this stage does not touch (`drivers/driver-mongodb` 9, `formula` 4, `metadata-fs` 2 on the census after this stage, 15 in all), plus the test-string sites the card carries for a widened stage. Every comment or docblock site in the package that cited a tracker number answering 404 is rewritten in ruling C+D's form C (record `5749154545` on #19123): the ADR when one records the decision, otherwise the commit in this repository's history that made it. That is **50 sites on 49 lines in 12 files, covering 13 numbers**: - **14 census sites** (13 lines, 2 files under `src/`): the whole `allocated-but-absent` population of the gate's own census in this package at the base. `turso-driver.ts:2131` carries two of them (#6076 and #6075); - **36 test-comment sites** (36 lines, 10 test files), which the census defers. They carry 12 numbers: 7 the census itself reads as dead in this package's `src` (#6075, #12380, #14428, #14438, #16570, #16711, #17690), and 5 that stand only in test files here (#14434, #17590, #17876, #17879, #17970), which the board and a single read each settle; - **no site outside the census glob**: `vitest.config.ts`, `tsconfig.json`, `package.json`, `README.md` and `LICENSE` cite no dead number. No comment-id citation is dead here: the package's two comment ids, ruling records `5865693155` and `5861435168` (`remote-transport.ts:38`, `:4152` to `:4153`, `turso-20444-empty-operator.test.ts:8`), both answer 200 (see Census). **Anchors: 13 numbers by commit, 0 by ADR, 0 by repository qualifier; 12 distinct shas** (#17690 and #17876 share `be5c60291`: the squash of PR #17876, whose message opens 「Part of」 #17690). 12 numbers reuse the anchor stage 4 (`driver-sql`) measured for them; `ca3fd4b1a` (#14428) is measured here. Only comments changed. Every file keeps its line count (49 lines out, 49 in, plus the changeset), so no line citation into any of them moves. No code token moves (the guard below). All 98 changed lines open with a comment marker. **No citation number is added**: on every changed line the numbers on the new text are a subset of those on the old (the only numbers on `+` lines are #5181, #6210 twice, #6212, #13878 and #20987, each already on its line and each answering 200). **A `patch` changeset**: all 13 rewritten non-test lines are in the published `dist` (the `.d.ts` keeps JSDoc on exported members, and esbuild keeps these comments in the JavaScript), and `dist` is not byte-identical with the base text (see Changeset). ## H0: the package and its size The gate's own `node scripts/check-issue-citations.mjs --census --json` at base `31d2255f5` (the before run below), `allocated-but-absent` per remaining `domain:engine` package: | package | before | after this stage | |---|---|---| | `drivers/driver-turso` | **14** | **0** | | `drivers/driver-mongodb` | 9 | 9 | | `formula` | 4 | 4 | | `metadata-fs` | 2 | 2 | | `metadata-core`, `core`, `metadata-protocol`, `objectql`, `metadata`, `drivers/driver-sql`, `drivers/driver-memory`, `drivers/driver-sqlite-wasm`, `plugins/plugin-pinyin-search`, `platform-objects` | 0 each | 0 each | The lane total goes 29 to 15. `driver-turso` is the largest remaining package and reads 14, as at stage 9's head census (`99f2cfdf0`), so the stage went ahead. ## Census: `driver-turso`, before and after **Instrument (A1).** The gate's own `node scripts/check-issue-citations.mjs --census --json`, read-only and unchanged. The count is its `allocated-but-absent` findings under `packages/drivers/driver-turso/`. | reading | tree | board | whole-repo `allocated-but-absent` | sites | lines | files | numbers | |---|---|---|---|---|---|---|---| | before | base `31d2255f5`, run 04:20:17Z to 04:23:32Z | enumerated, 194 pages, frontier #21537, 19,358 records | 144 | **14** | 13 | 2 | 8 | | after | `841405134`, run 04:32:36Z to 04:35:47Z | enumerated, 194 pages, frontier #21539, 19,360 records (newest number read before and after the run: #21539) | 130 | **0** | 0 | 0 | 0 | The whole-repo drop is 14, and the two finding sets differ by exactly the 14 rows of this package, removed; none was added. `resolves` (35,495), `resolves-as-pull-request` (2,388) and `cross-repo-unjudged` (1,247) did not move. The head's later commits are the changeset and one merge of `main`. The census was run a third time at the head `e89bd10cd` (04:53:10Z to 04:56:16Z, 194 pages, frontier #21544, 19,365 records, newest #21543 before and #21544 after): whole-repo 130, `driver-turso` 0. Against the after run, 5 rows moved line (all in `packages/spec`, shifted by the merged `main` commit `48eb9c193`), and the finding multiset with line numbers set aside is identical. Its `resolves` reads 35,509, 14 more than above, from the merged `main` commits outside this package. **Supplementary instrument, the whole package.** The census reads neither test files nor strings nor files outside `src`. A second reading runs the gate's own exported `extractCitations` (whole-file and comment-prose projections) over every tracked file in the package (102) and classifies each citation with the gate's `classifyCitation` against one board enumerated by the gate's `enumerateBoard` (194 pages, frontier #21537, 19,358 records, read 04:24:21Z to 04:27:29Z), the same board for both readings. Every one of the 13 numbers was then read on its own over the issues endpoint (04:29:27Z): **all 13 answer 404**; the numbers that stay on changed lines (#5181, #6210, #6212, #13878, #20987) and the lit controls #15280, #12585 and #6402 answer 200. | reading | citations | dead | src comment | test comment | other files | test string | changelog | |---|---|---|---|---|---|---|---| | before, `31d2255f5` | 1,921 | **83** | 14 | 36 | 0 | 6 | 27 | | after, `841405134` | 1,871 | **33** | 0 | 0 | 0 | 6 | 27 | The citation count drops by 50, the 50 rewritten sites; no respelling stays a citation. The live counts did not move (src comment: 522 resolve, 80 as pull requests, 8 cross-repo; test comment: 609, 75 and 6). A third, raw reading (every `#` followed by 2 to 6 digits, whatever surrounds it, `CHANGELOG.md` aside) counts 1,558 before and 1,509 after, and the URL-spelled issue links go 7 to 6: also a drop of 50. **Comment ids.** Every ten-digit run under `packages/drivers/driver-turso` (its `CHANGELOG.md` aside) was read: five lines. `5861435168` (the record of ruling B on #20311) and `5865693155` (the record of ruling A on #20399) answer 200 (the control `5965451347`, the claim, answers 200 too). `remote-canonical-backfill.ts:357` is an epoch-seconds example, not a citation. ## Per-number table `src` counts census sites, `test` the test-comment sites. Every sha matches exactly one commit (`git rev-parse --disambiguate`, count 1), is an ancestor of the base `31d2255f5` and of `origin/main` (`git merge-base --is-ancestor`, exit 0 for all 12 on both; the clone is not shallow), and resolves over the commits endpoint. The `+` lines carry exactly these 12 nine-hex spans as new ones. Each commit names the number it replaces, in its message, its diff or both: 7 in the message and the diff (#6075, #12380, #16570, #17590, #17690, #17879, #17970), 3 in the diff alone (#14428 for `ca3fd4b1a`, #14438 for `2200f8ec8`, #16711 for `7862fb711`), and 3 only in the subject's squash suffix (#6076 for `6513c1749`, #14434 for `93940d492`, #17876 for `be5c60291`), where the dead number was that pull request's own and the commit is its squash. `git blame` at the base puts 24 of the 49 changed lines on their anchor; the other 25 were written by a commit that cites the number as an earlier decision (`242eb0ac1`, `9f4a6d55f`, `9bfbacbf8` and `6bd3231f6` citing #12380; `3cbcedb62` and `e35c40a52` citing #14438; `fa2d3b737` citing #6075 and #6076; `5ba2ec3ca` citing #17690; `862f12c0b` citing #17590; `2200f8ec8` citing #14428; `ca3fd4b1a` citing #14434; `7862fb711` citing #16570; `eb9334915` citing #17876), and in each case the anchor is the commit that made the change the sentence credits to the number. `source` says whether stage 4 already used this anchor for this number (`reused`) or it was measured here (`measured`). | number | src | test | anchor | kind | source | what it decided | |---|---|---|---|---|---|---| | `#6075` | 1 | 1 | `d367f03d6` | commit | reused (stage 4, stage 5) | five drivers' `query` parameters follow `DriverQuery`; its turso diff narrows `count`'s `query` and leaves `options?: any`, the half-narrowed state both sites describe. It is the squash of PR #6210, the live number kept beside it | | `#6076` | 1 | 0 | `6513c1749` | commit | reused (stage 4) | `IDataDriver`'s `query` parameter becomes `DriverQuery` (that pull request's squash) | | `#12380` | 2 | 6 | `4045b954d` | commit | reused (stage 4) | make the SQLite `Field.json` codec injective, one encoding across all three dialects: the local half's codec every site credits | | `#14428` | 2 | 3 | `ca3fd4b1a` | commit | measured | `update()` on a missing id answers `null` on Turso's remote face; it wrote the `RemoteTransport.update()` docblock and the `turso-update-missing-id.test.ts` header the sites carry, and declared that door's record-or-null return | | `#14434` | 0 | 1 | `93940d492` | commit | reused (stage 4, stage 5) | declare the not-found arm on `IDataDriver.update()` (that pull request's squash) | | `#14438` | 2 | 5 | `2200f8ec8` | commit | reused (stage 4) | `update()` publishes the contract's record-or-null, not `any`, on `SqlDriver` and on `TursoDriver`'s override (the squash of PR #15280) | | `#16570` | 1 | 1 | `b72226f48` | commit | reused (stage 4) | declare the `indexes` key `initObjects` / `registerObjectMetadata` already read | | `#16711` | 1 | 3 | `7862fb711` | commit | reused (stage 4, stage 3) | object-definition parameters declare the keys they are read for, plus the gate that sees subclass overrides; it wrote `TursoDriver.initObjects`'s docblock and `turso-driver-16711-init-objects-param.test.ts` | | `#17590` | 0 | 1 | `e04a0aff2` | commit | reused (stage 4, stage 5, stage 8) | compile `$contains` on a JSON column as a per-dialect MEMBERSHIP test | | `#17690` | 4 | 4 | `be5c60291` | commit | reused (stage 4) | eight more `IDataDriver` doors publish their declared return type, `TursoDriver`'s overrides among them; its message records the transaction door left un-narrowed because each of the two repairs is 「neither of which is an annotation swap」, with the 「+14 further consumer sites」 measurement, the sentence `turso-driver.ts:3549` cites | | `#17876` | 0 | 3 | `be5c60291` | commit | reused (stage 4) | that pull request's squash, which installed the `ContainsAny` detector | | `#17879` | 0 | 6 | `eb9334915` | commit | reused (stage 4) | measure the `ContainsAny` phantom-leg sweep across eight door pins; its message records that both repair candidates were measured | | `#17970` | 0 | 2 | `47e6601c5` | commit | reused (stage 4) | collapse `ContainsAny`'s distributivity so union-shaped doors assert | No ADR or ruling record names any of the 13 numbers as the place their decision is recorded; ADR-0104 names #12380 in passing, and `4045b954d` is the change these sites describe. ## Wordings to check Most rewrites swap a tag in place (`[#N]` to `[commit SHA]`, `(#N)` to `(commit SHA)`, `with #N` to `with commit SHA`, stage 1's form). These say more than the tag: - **Squash rewrites, stage 4's spellings**: 「#5181 (PR #6076), #6075 (PR #6210)」 became 「#5181 (commit 6513c17), commit d367f03 (PR #6210)」 (`turso-driver.ts:2131`): the dead pull-request number gives way to its squash, and the dead card number to the commit that landed its fix with the live pull-request number kept beside it as a convenience link, stage 4's 「Commit 2200f8e (PR #15280)」 form. 「#6075 (PR #6210) narrowed」 became 「commit d367f03 (PR #6210) narrowed」 (`turso-driver-options-door.test.ts:21`). 「Since #13878 (PR #14434)」 became 「Since #13878 (commit 93940d4)」 (`turso-update-missing-id.test.ts:20`). 「`ContainsAny` (#17876)」 became 「`ContainsAny` (commit be5c602)」 on three test lines. - **Reports**: 「the two measured repairs are in the #17879 report」 became 「the two measured repairs are in commit eb93349's message」 (three test files), stage 4's spelling; that message records that both candidates were measured. - **`pre-` spellings**: 「restoring the pre-#12380 SQLite `json` branch」 became 「restoring the SQLite `json` branch from before commit 4045b95」 (`remote-transport.ts:2612`), and 「The pre-#12380 form of the string 'bare'」 became 「The form of the string 'bare' from before commit 4045b95」 (`turso-local-json-backfill-depth-limit.test.ts:72`), stage 4's 「from before commit」 form. - **A URL-spelled citation**: 「@see #12380 (the injective local codec)」 became 「@see commit 4045b95 (the injective local codec)」 (`turso-json-column-type-asymmetry.test.ts:84`), stage 4's 「@see commit e04a0af (the membership construct)」 form. The three `@see` links beside it (#12738, #12586, #11535) resolve and stay. - **The acceptance-criteria reference**: 「(#16711 验收口径 item 4)」 became 「(验收口径 item 4 of the card commit 7862fb7 closed)」 (`turso-driver-16711-init-objects-param.test.ts:105`), stage 4's wording for the same sentence in `driver-sql`'s twin test, verbatim. Neither the card nor PR #16816 resolves any more, so 「closed」 rests on stage 4's reading and on `7862fb711` itself: its diff names #16711 32 times and creates this test file, and its message records the TS2353 negative control this paragraph introduces. - **Sentence and bullet starts**: where the number opened a sentence, a bullet or a header, the new text opens with 「Commit」: 「Commit 4045b95's codec still runs」 (`turso-json-column-type-asymmetry.test.ts:259`), 「- Commit b72226f's `indexes` fix」 (`turso-driver-16711-init-objects-param.test.ts:17`), 「// Commit 2200f8e — 」 (`turso-driver-update-declared-null.test.ts:3`) and 「⛔ Commit 7862fb7 — this parameter type must declare every key」 (`turso-driver.ts:3689`). 「* commit 4045b95 had to defeat」 (`turso-json-column-type-asymmetry.test.ts:46`) stays lower-case: it continues 「the measured … exposure that」 from the line above. - **A tag over a paragraph that says 「this card」**: `turso-driver-doors-declared-types.test.ts:117` now opens 「[commit be5c602]」, and its line 119 still says 「every door on this card had regressed to」. That line carries no number, so it was not touched; it now reads as the card behind the commit in the tag (`be5c60291`'s message opens 「Part of」 that card). - **The commit that wrote the file**: `turso-driver-update-declared-null.test.ts:3` and `:11` cite `2200f8ec8`, the commit that created that test file. Its subject is 「feat(driver-sql,driver-turso): `update()` publishes the contract's … not `any`」, so it is both the override fix the header names and the `SqlDriver.update()` narrowing line 11 credits. - No line was reflowed, so some are longer than their block's wrap (`eslint.config.mjs` declares no line-length rule, and a reflow would move neighbouring lines and every line citation into the file). ## Sites left - **In comments (src, test, outside the glob): none.** - **String literals: 6 test-string sites, 4 numbers, 4 files**: the `describe` titles at `turso-driver-16711-init-objects-param.test.ts:67` (#16711), `turso-driver-update-declared-null.test.ts:85` (#14438) and `turso-update-missing-id.test.ts:141` and `:223` (#14428), and two assertion-message strings at `turso-json-column-type-asymmetry.test.ts:266` and `:291` (#12380). All four numbers are in this stage's table. Strings are outside this stage's surface; non-test strings cite none. - **Outside `src`:** the release-owned `CHANGELOG.md` names dead numbers on 27 sites (11 numbers); left. ## Mechanical guard: no code token moves The guard (stages 2 to 9's, copied verbatim from stage 9) compares base `31d2255f5` against the tree over all 12 touched files, with TypeScript 6.0.3: - **Reading 1**: the parser's leaf nodes, from a `forEachChild` walk. Comments are trivia there, and JSDoc is never visited. A leaf that is not itself a token is re-scanned with trivia skipped. - **Reading 2**: the full token stream in parser context, from a `getChildren` walk, JSDoc nodes skipped. String, template and numeric literals are compared in full on both readings. Results, at `841405134` (the later commits touch none of the 12 files): - Real run: 38,590 base tokens, **0 files with a token change** (exit 0). - Comment control (「Keep it that way」 to 「KEEP it that way」, `turso-driver.ts`): 0 files changed (exit 0). - Positive control, an identifier (`export class RemoteTransport` to `XRemoteTransport`, `remote-transport.ts`): DIFFER on both readings (exit 1). - Positive control, a string literal (the assertion message 「… for an existing id」 to 「… for an existing iD」, `turso-update-missing-id.test.ts`): DIFFER on both readings (exit 1). - Positive control, a template literal (the index name 「uniq_ … _v」 to 「uniq_ … _w」, `turso-driver-16711-init-objects-param.test.ts`): DIFFER on both readings (exit 1). - Positive control, a numeric literal (`deepArray(1001)` to `1002`, `turso-local-json-backfill-depth-limit.test.ts`): DIFFER on both readings (exit 1). Each mutation went through `scripts/ablation-replace.mjs` (wrap mode, anchor hit 1 to 0, blob changed) under a shell trap that restores by absolute path from `HEAD`. Each restore was proven equal to its `HEAD` blob (`cc15138aba39`, `8deefdb0598b`, `e36d370cb3ed`, `f9142478172e`, `7343e92b5c7d`), with `git diff HEAD` empty and a clean tree afterwards. ## Changeset: `patch` (`dist` measured) `files[]` is `dist`, `README.md` and `CHANGELOG.md`, and the package is not private. In one script under the shared verify lock (VERDICT command-exit 0, held 104s), at `841405134`: the dependency closure was built first (`pnpm --filter '@objectstack/driver-turso^...' build`), then the package's own `build` (tsup and `check-dts-emitted`) ran three times: - **Leg 1**, the head text: 6 `dist` files hashed (`index.js`, `index.mjs`, their sourcemaps, `index.d.ts`, `index.d.mts`). All 13 rewritten non-test lines appear verbatim in `dist`. The 5 docblock lines on exported members (`remote-transport.ts:1645`, `:2601`, `:2612`; `turso-driver.ts:3689`, `:3694`) are in all four of `index.js`, `index.mjs`, `index.d.ts` and `index.d.mts`; the 8 `//` lines in `turso-driver.ts` are in `index.js` and `index.mjs`. - **Leg 2**, the base text put back in the 2 non-test touched files (2 of 2 proven equal to their base blob): 4 of the 6 files differ from leg 1 (`index.d.ts`, `index.d.mts`, `index.js`, `index.mjs`); the two sourcemaps do not. `scripts/ablation-dist-preflight.mjs` finds the base marker 「[#14428] A miss answers」 in those 4 built files (exit 0). - **Leg 3**, after the proven restore (2 of 2 equal to their `HEAD` blob, `git diff HEAD` empty, porcelain empty): all 6 files are byte-identical to leg 1, and the preflight's `--absent` reading exits 0 with a clean tree, so the build is deterministic and the difference is the rewrite. So the rewrite ships, and `.changeset/20595-driver-turso-provenance-anchors.md` declares a `patch` for `@objectstack/driver-turso`, comment text only, with the claim's `Clause-②: no` line. Every anchor is a commit, so it names no ADR, repository qualifier or bracketed substitution; it says which published files carry the reworded text, as measured above. The changeset commit touches no file under `packages/drivers/driver-turso`. ## Gates (head `e89bd10cd`) - **Derived gates:** `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands` at `e89bd10cd` (13 paths against merge base `49161683f`, 113 changed lines) derived 65 commands. All 65 ran (04:52:21Z to 05:03:07Z, after the workspace build), each exit code captured before any pipe: 65 exit 0. `--ran` reports 「65 derived, 65 run, 0 NOT-MEASURED, 0 UNRUN」 (a derived zero) and exits 0. The PM's lead derivation (55 commands, tree `550f4cc2f`) is a subset: the extra 10 are the eight families the `.changeset/` path adds (the ADR-0087 registration and empty-changeset pairs, `check:objectui-changeset`, `check:pm-changeset-deadline-census` and two release self-tests) and two gates whose source names `packages/drivers/driver-turso/src/turso-driver.ts` itself (`check:object-def-param-keys`, `check:tenant-chokepoint`). - **Named readings:** `node scripts/check-issue-citations.mjs` exits 0 (「every citation this change adds resolves (or is a declared cross-repo reference)」: 3 judged across 2 files, the three numbers kept on `turso-driver.ts:2131`, two of them issues and one a pull request); `pnpm check:issue-citations` exits 0 (self-test, 173 cases, 9 batteries); `pnpm check:doc-authoring` exits 0 (the sibling-package prose-id baseline holds, no growth); `pnpm check:nul-bytes` exits 0 (9,888 files, no raw control bytes), and a control-byte grep over the 13 changed files finds none (exit 1). The changeset gates (`check-changeset-no-major`, `check-adr-0087-registration`, `check-empty-changeset` with `--base origin/main`, and `check:changeset-gate-self-tests`) exit 0; `check:object-def-param-keys` exits 0 (5 override parameter positions compared). - **Build, tests and typecheck, under the verify lock:** at `e89bd10cd`, the dependency closure and the package were rebuilt, then `pnpm --filter @objectstack/driver-turso test`: 88 test files pass (88), 2,365 tests pass and 33 are skipped (2,398); `pnpm --filter @objectstack/driver-turso typecheck` (`tsc --noEmit`) exits 0 (VERDICT command-exit 0, held 151s). `tsc --listFilesOnly` puts all 88 tracked test files and all 12 changed files in `tsconfig.json`'s program. The workspace build after the merge (`turbo run build --filter='./packages/*' --filter='./packages/*/*' --concurrency=2`, 71 of 71 tasks, 1 cached; VERDICT command-exit 0, held 319s) ran before the gates. No importing package owes a run: the declaration files change only in comment text. - **Lint, as a proven narrowing, at `e89bd10cd`:** eslint with inline config disabled, over the 12 touched `.ts` files plus `dist/index.js` as the control: 13 results, 0 errors and 1 warning, the control's ignore notice; none of the 12 is reported ignored. `eslint.config.mjs` never enables type-aware linting (its lines 327 and 328 say so), so a comment edit cannot move the verdict on an untouched file. The repo-wide `pnpm lint` is CI's run. ## Acceptance notes - **Base and merge.** The dispatch read `origin/main` at `550f4cc2f`; by the time the worktree was cut, `main` had moved one commit (`31d2255f5`, `packages/mcp/server.json` only), and the branch was cut there. It merges `main` once, pinned to `49161683f` (merge `e89bd10cd`, no conflict). The two commits it brought (`48eb9c193`, `spec`; `49161683f`, `plugin-sharing` and `plugin-audit`) touch neither `packages/drivers/driver-turso`, `check-issue-citations.mjs` nor `dispatch-gates.mjs`; the closure and the workspace were rebuilt after the merge, before the tests and gates. The net diff against `main` is the 12 rewritten files (+49/−49) and the changeset (+15). - **The same dead numbers outside this package**, each left to its own carrier: `driver-mongodb` (this lane's next stage) names #14428 in `src/mongodb-driver.ts` and its tests and #14434 in `mongodb-update-missing-id.test.ts`, where `ca3fd4b1a` and `93940d492` are the anchors; `driver-sqlite-wasm`, which the census reads 0, still carries #12380, #14438, #16711, #17690, #17876 and #17879 in five test files (comments and two `describe` titles; the census defers test files, every anchor is in this table, and the comment sites are the same sentences this stage rewrote here); `scripts/check-object-def-param-keys.mjs` and `.github/workflows/lint.yml` name #16570 and #16711 (outside the census surface); `service-analytics`'s `contains-membership.test.ts` carries #17590 in a comment, and `driver-sql`'s test strings carry #12380 and #17590; ADR-0104 names #12380 (governed); the release pages name #6075 and #12380 (release-owned). - **Wording only:** no line without a number was changed. --- _Generated by [Claude Code](https://claude.ai/code/session_01DDZNkDVwPQnevTFcYE47H3)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 24dc7c1 commit fd5a1cd

13 files changed

Lines changed: 64 additions & 49 deletions
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/driver-turso': patch
3+
---
4+
5+
Provenance comments in `@objectstack/driver-turso` cite the commits that decided them, not tracker numbers that no longer resolve
6+
7+
Clause-②: no
8+
9+
Docblocks and comments across the package cited issue-tracker numbers that now answer 404 on GitHub.
10+
Each one now cites the commit in this repository's history that made the decision it describes. Some
11+
of these docblocks sit on exported members, so the reworded text appears in the published `index.d.ts`
12+
/ `index.d.mts`, and the comments esbuild keeps appear in the JavaScript output (`index.js` /
13+
`index.mjs`); the sourcemaps do not change.
14+
15+
Comment only: no export, type, error code, status, message text or runtime behaviour changes.

‎packages/drivers/driver-turso/src/remote-transport.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ export class RemoteTransport {
16421642
}
16431643

16441644
/**
1645-
* [#14428] A miss answers `null` — the arm `IDataDriver.update()` declares
1645+
* [commit ca3fd4b1a] A miss answers `null` — the arm `IDataDriver.update()` declares
16461646
* (#13878), and the answer this driver's LOCAL face (`SqlDriver.update`,
16471647
* through `TursoDriver.update`'s `super` branch) has always given.
16481648
*
@@ -2598,7 +2598,7 @@ export class RemoteTransport {
25982598
*
25992599
* Both transports round-trip every `VALUE_ROUNDTRIP_CASES` value faithfully
26002600
* (`turso-value-roundtrip-conformance.test.ts`, both halves). They arrive
2601-
* there by different routes: #12380 made the local `Field.json` codec
2601+
* there by different routes: commit 4045b954d made the local `Field.json` codec
26022602
* injective, so the NUMERIC-affinity column is only ever handed an encoded
26032603
* form it has nothing to convert; this transport's own `serializeValue` /
26042604
* `mapRows` reach the same answer over a column where no conversion was
@@ -2609,7 +2609,7 @@ export class RemoteTransport {
26092609
* and a TEXT cell here, and `find()` answers `123` on both. That is the
26102610
* #11535 class in its quiet phase — two paths agreeing on every visible
26112611
* answer while standing on different ground. PR #12585's ablation is the
2612-
* loud phase: restoring the pre-#12380 SQLite `json` branch broke the two
2612+
* loud phase: restoring the SQLite `json` branch from before commit 4045b954d broke the two
26132613
* transports by DIFFERENT counts, diverging on `s_0123`, because only the
26142614
* local column had NUMERIC affinity to destroy a bare `'0123'` with.
26152615
*

‎packages/drivers/driver-turso/src/turso-driver-16711-init-objects-param.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
22

33
/**
4-
* [#16711] `TursoDriver.initObjects` — the override that shadowed a base-class
4+
* [commit 7862fb711] `TursoDriver.initObjects` — the override that shadowed a base-class
55
* fix in a separately published package for five weeks.
66
*
77
* ## The defect this pins, which no gate scoped to `sql-driver.ts` could see
@@ -14,7 +14,7 @@
1414
* - #4311 declared `tenancy` on `SqlDriver.initObjects` in August. From
1515
* outside this package that fix did not exist: a fresh literal carrying
1616
* `tenancy` was still TS2353 here, for five weeks, and nothing was red.
17-
* - #16570's `indexes` fix would have escaped by the identical route.
17+
* - Commit b72226f48's `indexes` fix would have escaped by the identical route.
1818
*
1919
* ⭐ And the type face was the ONLY thing refusing them. The remote arm below
2020
* forwards the whole object through as `schema`
@@ -69,7 +69,7 @@ describe('TursoDriver.initObjects declares every key SqlDriver.initObjects does
6969
const driver = await remoteDriver();
7070
const T = 'os16711_turso_all';
7171

72-
// Fresh literal in argument position. Before #16711 this did not compile:
72+
// Fresh literal in argument position. Before commit 7862fb711 this did not compile:
7373
// `tenancy`, `indexes` and `lifecycle` were all TS2353 against this
7474
// override's own narrower literal, while the base declared the first two.
7575
await driver.initObjects([
@@ -102,7 +102,7 @@ describe('TursoDriver.initObjects declares every key SqlDriver.initObjects does
102102
});
103103

104104
/**
105-
* ⭐ THE NEGATIVE CONTROL (#16711 验收口径 item 4). Each `@ts-expect-error` IS
105+
* ⭐ THE NEGATIVE CONTROL (验收口径 item 4 of the card commit 7862fb711 closed). Each `@ts-expect-error` IS
106106
* the assertion: `tsc` fails the file with TS2578 the moment the key starts
107107
* being accepted, which is precisely what a relaxation to `any` or an index
108108
* signature would do. Compile-time only, deliberately never called.

‎packages/drivers/driver-turso/src/turso-driver-doors-declared-types.test.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// #15267 — the `IDataDriver` doors `TursoDriver` OVERRIDES publish their
44
// declared return type, not `any`.
55
//
6-
// The same shape #14438 fixed on this class's `update()` override, and for the
6+
// The same shape commit 2200f8ec8 fixed on this class's `update()` override, and for the
77
// same reason it had to be fixed here rather than inherited: `TursoDriver`
88
// overrides `findOne`, `create`, `bulkCreate` and `execute` with its own
99
// explicit `Promise<any>` on each, so this package's published `.d.ts`
@@ -58,7 +58,7 @@
5858
// `@objectstack/driver-sql` narrowing does not reach a consumer holding a
5959
// `TursoDriver`.
6060
//
61-
// [#17690] Three more overridden doors join the driver half — `find`,
61+
// [commit be5c60291] Three more overridden doors join the driver half — `find`,
6262
// `upsert` and `bulkUpdate` — plus (at the time) `RemoteTransport.beginTransaction`,
6363
// which lived in this package and in this same tsc program. All four nested their
6464
// `any` inside a wider type (`Promise<any[]>`, `Promise<Record<string, any>>`,
@@ -114,7 +114,7 @@ type Equals<A, B> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B
114114
type Resolved<F> = F extends (...args: never[]) => PromiseLike<infer R> ? R : never;
115115

116116
/**
117-
* [#17690] `IsAny<T>` answers about T ITSELF, which is honestly `false` for
117+
* [commit be5c60291] `IsAny<T>` answers about T ITSELF, which is honestly `false` for
118118
* `any[]` and for `Record<string, any>` — and those are exactly the two shapes
119119
* every door on this card had regressed to. Used as the "is not `any`" half of
120120
* a nested-`any` door it is a PHANTOM CHECK: it evaluates, it is green, and it
@@ -139,7 +139,7 @@ type Resolved<F> = F extends (...args: never[]) => PromiseLike<infer R> ? R : ne
139139
* `Record<string, unknown>[]` / `Record<string, unknown>` / `unknown` answer
140140
* `false`.
141141
*
142-
* [#17970] Answering `boolean` is the ONE failure mode this detector has to
142+
* [commit 47e6601c5] Answering `boolean` is the ONE failure mode this detector has to
143143
* stay out of, and staying out of it takes TWO guards, because `T` can reach a
144144
* distributive conditional for two unrelated reasons. Every leg below is
145145
* spelled `const x: ContainsAny<Door> = false`, and `false` is ASSIGNABLE to
@@ -184,7 +184,7 @@ type ContainsAnyPerMember<T> = IsAny<T> extends true
184184
: false;
185185

186186
/**
187-
* [#17970] The collapse. `ContainsAnyPerMember<T>` is distributive, so on a
187+
* [commit 47e6601c5] The collapse. `ContainsAnyPerMember<T>` is distributive, so on a
188188
* union door it answers a UNION of per-member verdicts; this reports `false`
189189
* only when that union is exactly `false`, turning any `boolean` into `true`.
190190
*/
@@ -198,7 +198,7 @@ type ContractExecute = Resolved<IDataDriver['execute']>;
198198
// `aggregate` is OPTIONAL on the contract (`aggregate?`), so its function type
199199
// is read through `NonNullable` — the door is the member, not its presence.
200200
type ContractAggregate = Resolved<NonNullable<IDataDriver['aggregate']>>;
201-
// [#17690]
201+
// [commit be5c60291]
202202
type ContractFind = Resolved<IDataDriver['find']>;
203203
type ContractUpsert = Resolved<IDataDriver['upsert']>;
204204
type ContractBulkUpdate = Resolved<IDataDriver['bulkUpdate']>;
@@ -346,7 +346,7 @@ describe('TursoDriver declared return types on the doors it overrides (#15267)',
346346
expect(result === null ? 'absent' : result.name).toBe('before');
347347
});
348348

349-
// [#17690] The three further overridden doors, plus the transaction door.
349+
// [commit be5c60291] The three further overridden doors, plus the transaction door.
350350
// [#18063] That fourth slot moved from `RemoteTransport.beginTransaction` —
351351
// deleted with the rest of that transport's decorative transaction members —
352352
// to `TursoDriver.beginTransaction`, which this card made assertable. Both

‎packages/drivers/driver-turso/src/turso-driver-options-door.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* The shape was character-identical across every override, so narrowing a subset
2020
* would read to the next person as a *verdict* on the rest. That is not
21-
* hypothetical: #6075 (PR #6210) narrowed `count`'s `query` and deliberately left
21+
* hypothetical: commit d367f03d6 (PR #6210) narrowed `count`'s `query` and deliberately left
2222
* its `options`, and #6212 batch B did the same on `aggregate` — each leaving a
2323
* comment saying so. This file is the pin for the sweep that closed all of them
2424
* together, so no half-narrowed state exists to be misread.
@@ -63,8 +63,8 @@ import type { DriverOptions } from '@objectstack/spec/data';
6363
type IsAny<T> = 0 extends 1 & T ? true : false;
6464

6565
/**
66-
* [#17879] MEASURED — `Door<T>` below asks `IsAny`, which is a PHANTOM half
67-
* against a NESTED regression, and swapping in `ContainsAny` (#17876) does
66+
* [commit eb9334915] MEASURED — `Door<T>` below asks `IsAny`, which is a PHANTOM half
67+
* against a NESTED regression, and swapping in `ContainsAny` (commit be5c60291) does
6868
* NOT close it. Measured on the `find` row, on disk:
6969
*
7070
* every one of the 17 doors resolves to `DriverOptions | undefined`
@@ -76,7 +76,7 @@ type IsAny<T> = 0 extends 1 & T ? true : false;
7676
* `ContainsAny` distributes over the `| undefined` every optional parameter
7777
* carries, so the regressed door answers `boolean`, and `boolean extends true`
7878
* is `false` — the detector reads it as "no `any` here". No swap was made;
79-
* the two measured repairs are in the #17879 report.
79+
* the two measured repairs are in commit eb9334915's message.
8080
*/
8181

8282
/**

‎packages/drivers/driver-turso/src/turso-driver-update-declared-null.test.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
22
//
3-
// #14438 — `TursoDriver.update()`'s declared return type is the contract's, not
3+
// Commit 2200f8ec8 — `TursoDriver.update()`'s declared return type is the contract's, not
44
// `any`, and it carries the not-found arm.
55
//
66
// `TursoDriver` does not merely inherit `SqlDriver.update()` — it OVERRIDES it
77
// (a local branch that forwards to `super.update`, a remote branch that passes
88
// `RemoteTransport.update()`'s result through the generic `formatRemoteRow`),
99
// and the override was written out with its own explicit `Promise<any>`. Both
1010
// branches already carried the honest type: `SqlDriver.update()` is narrowed
11-
// by #14438 and `RemoteTransport.update()` declared
12-
// `Promise<Record<string, unknown> | null>` with #14428. The override's
11+
// by commit 2200f8ec8 and `RemoteTransport.update()` declared
12+
// `Promise<Record<string, unknown> | null>` with commit ca3fd4b1a. The override's
1313
// annotation was the one place the family's honest type was re-erased, so
1414
// this package's published `.d.ts` re-declared the door as `any` on its own —
1515
// which is why "TursoDriver inherits the fix" would have been wrong, and why
@@ -34,7 +34,7 @@
3434
// errors are the consumer sites the narrowing was written to surface.
3535
//
3636
// The runtime case below drives the LOCAL face (`:memory:`); the remote face's
37-
// `null` on a miss is pinned by the `RemoteTransport` suites (#14428).
37+
// `null` on a miss is pinned by the `RemoteTransport` suites (commit ca3fd4b1a).
3838

3939
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
4040
import type { IDataDriver } from '@objectstack/spec/contracts';
@@ -44,8 +44,8 @@ import { TursoDriver } from './turso-driver.js';
4444
type IsAny<T> = 0 extends 1 & T ? true : false;
4545

4646
/**
47-
* [#17879] MEASURED — `tursoUpdateIsAny` below is a PHANTOM half against a
48-
* NESTED regression, and `ContainsAny` (#17876) does NOT close it. On disk,
47+
* [commit eb9334915] MEASURED — `tursoUpdateIsAny` below is a PHANTOM half against a
48+
* NESTED regression, and `ContainsAny` (commit be5c60291) does NOT close it. On disk,
4949
* reverting only this override:
5050
*
5151
* door resolves to `Record<string, unknown> | null`
@@ -56,7 +56,7 @@ type IsAny<T> = 0 extends 1 & T ? true : false;
5656
*
5757
* `ContainsAny` distributes over the not-found arm, so the regressed door
5858
* answers `boolean`, which `= false` accepts. No swap was made; the two
59-
* measured repairs are in the #17879 report.
59+
* measured repairs are in commit eb9334915's message.
6060
*/
6161
/** Exact (mutual, non-`any`) type equality. */
6262
type Equals<A, B> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? true : false;

‎packages/drivers/driver-turso/src/turso-driver.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,14 +2128,14 @@ export class TursoDriver extends SqlDriver {
21282128
// [#6402] Every `options` parameter in this file is a {@link DriverOptions},
21292129
// matching `SqlDriver` / `IDataDriver` — the two faces of one driver may not
21302130
// declare one argument two ways. This was the last `any` axis left in the
2131-
// overrides: #5181 (PR #6076), #6075 (PR #6210) and #6212 each narrowed
2131+
// overrides: #5181 (commit 6513c1749), commit d367f03d6 (PR #6210) and #6212 each narrowed
21322132
// `query`, and each deliberately left `options` alone because it is a
21332133
// SEPARATE axis whose shape was verbatim-identical across all 17 overrides —
21342134
// narrowing one would have read as a verdict on the other sixteen. #6402
21352135
// closed all 17 in one sweep, so there is no half-narrowed state to
21362136
// interpret. Keep it that way: a new override here declares `DriverOptions`.
21372137

2138-
// [#17690] The return is the contract's own type, and this override needs it
2138+
// [commit be5c60291] The return is the contract's own type, and this override needs it
21392139
// declared HERE: an override re-declares the door in this package's own
21402140
// `.d.ts`, so the `@objectstack/driver-sql` narrowing does not reach a
21412141
// consumer holding a `TursoDriver` — measured twice already (#15280 for
@@ -2729,7 +2729,7 @@ export class TursoDriver extends SqlDriver {
27292729
// already do: `RemoteTransport.create()` answers `Record<string, unknown>`
27302730
// through the generic `formatRemoteRow`, and the local branch forwards to
27312731
// `super.create` (narrowed alongside). Same shape the `update()` override
2732-
// above took with #14438.
2732+
// above took with commit 2200f8ec8.
27332733
override async create(object: string, data: Record<string, any>, options?: DriverOptions): Promise<Record<string, unknown>> {
27342734
this.assertRemoteTransactionUnsupported(options, 'create');
27352735
if (this.isRemote) {
@@ -2752,9 +2752,9 @@ export class TursoDriver extends SqlDriver {
27522752
return super.create(object, data, options);
27532753
}
27542754

2755-
// [#14438] The override declares the contract's type, as both of its branches
2755+
// [commit 2200f8ec8] The override declares the contract's type, as both of its branches
27562756
// already do: `super.update` (driver-sql) and `RemoteTransport.update()`
2757-
// (#14428) both answer `Record<string, unknown> | null`, and `formatRemoteRow`
2757+
// (commit ca3fd4b1a) both answer `Record<string, unknown> | null`, and `formatRemoteRow`
27582758
// is a generic pass-through. The explicit `Promise<any>` here was the one
27592759
// place this package's own `.d.ts` re-erased the door.
27602760
override async update(object: string, id: string | number, data: Record<string, any>, options?: DriverOptions): Promise<Record<string, unknown> | null> {
@@ -2773,7 +2773,7 @@ export class TursoDriver extends SqlDriver {
27732773
return super.update(object, id, data, options);
27742774
}
27752775

2776-
// [#17690] The return is the contract's own type, and this override needs it
2776+
// [commit be5c60291] The return is the contract's own type, and this override needs it
27772777
// declared HERE: an override re-declares the door in this package's own
27782778
// `.d.ts`, so the `@objectstack/driver-sql` narrowing does not reach a
27792779
// consumer holding a `TursoDriver` — measured twice already (#15280 for
@@ -3441,7 +3441,7 @@ export class TursoDriver extends SqlDriver {
34413441
return super.bulkCreate(object, data, options);
34423442
}
34433443

3444-
// [#17690] The return is the contract's own type, and this override needs it
3444+
// [commit be5c60291] The return is the contract's own type, and this override needs it
34453445
// declared HERE: an override re-declares the door in this package's own
34463446
// `.d.ts`, so the `@objectstack/driver-sql` narrowing does not reach a
34473447
// consumer holding a `TursoDriver` — measured twice already (#15280 for
@@ -3546,7 +3546,7 @@ export class TursoDriver extends SqlDriver {
35463546
// have been a lie on the remote arm. The `any` masked that real LSP
35473547
// violation, and closing it meant widening `SqlDriver`'s narrowing (measured
35483548
// at the time: +14 further consumer sites across the driver packages) or
3549-
// restructuring the remote handle — both above an annotation swap (#17690).
3549+
// restructuring the remote handle — both above an annotation swap (commit be5c60291).
35503550
//
35513551
// What dissolved it is that the remote arm no longer returns anything.
35523552
// [#18616] made it REFUSE, and `refuseRemoteTransaction` returns `never`, so
@@ -3686,12 +3686,12 @@ export class TursoDriver extends SqlDriver {
36863686
*
36873687
* In local / replica modes the existing Knex-based path remains in effect.
36883688
*
3689-
* ⛔ #16711 — this parameter type must declare every key `SqlDriver.initObjects`
3689+
* ⛔ Commit 7862fb711 — this parameter type must declare every key `SqlDriver.initObjects`
36903690
* declares, and `scripts/check-object-def-param-keys.mjs` fails the build if it
36913691
* stops doing so. An `override` does NOT inherit the base's parameter type, so
36923692
* this literal is what every caller of `@objectstack/driver-turso` sees: while
36933693
* it read `{ name; fields? }`, #4311's `tenancy` fix sat on the base for five
3694-
* weeks and was invisible from outside `@objectstack/driver-sql`, and #16570's
3694+
* weeks and was invisible from outside `@objectstack/driver-sql`, and commit b72226f48's
36953695
* `indexes` fix would have escaped the same way. The escape is silent because
36963696
* TypeScript's excess-property check fires on a FRESH object literal only — and
36973697
* the remote arm below forwards the WHOLE object as `schema`, so the runtime

‎packages/drivers/driver-turso/src/turso-json-column-type-asymmetry.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* given the remote transport NUMERIC affinity — `json` contains none of
4444
* SQLite's affinity markers (`INT`, `CHAR`/`CLOB`/`TEXT`, `BLOB`,
4545
* `REAL`/`FLOA`/`DOUB`) — i.e. the measured `'0123'` → `123` exposure that
46-
* #12380 had to defeat on the local half, imported into the half that never had
46+
* commit 4045b954d had to defeat on the local half, imported into the half that never had
4747
* it.
4848
*
4949
* ## The instrument is AFFINITY-LEVEL, and that is a requirement, not a taste
@@ -66,7 +66,7 @@
6666
*
6767
* Only what NEW columns are declared as. A column created before this change
6868
* keeps its `json` declaration, keeps NUMERIC affinity, and keeps being
69-
* defended by #12380's injective codec — `SqlDriver.buildRebuiltColumn` still
69+
* defended by commit 4045b954d's injective codec — `SqlDriver.buildRebuiltColumn` still
7070
* re-declares an introspected `json` column as `json`, so not even a drift
7171
* rebuild converts one. Nothing on the read path consults the physical type
7272
* (`isJsonField` answers from metadata), so decoding is identical either way.
@@ -81,7 +81,7 @@
8181
*
8282
* @see https://github.com/objectstack-ai/objectstack/issues/12738 (this inversion)
8383
* @see https://github.com/objectstack-ai/objectstack/issues/12586 (the pin this replaces)
84-
* @see https://github.com/objectstack-ai/objectstack/issues/12380 (the injective local codec)
84+
* @see commit 4045b954d (the injective local codec)
8585
* @see https://github.com/objectstack-ai/objectstack/issues/11535 (the class)
8686
*/
8787

@@ -256,7 +256,7 @@ describe('[#12738] driver-turso — the two transports declare ONE physical colu
256256
// ⛔ This is the assertion that would go red if anyone converged these two
257257
// onto `json` instead. It is stated as the RAW-SQL truth on purpose: it
258258
// asks what the COLUMN does, bypassing the driver codec whose job is to
259-
// make the column's answer not matter. #12380's codec still runs and is
259+
// make the column's answer not matter. Commit 4045b954d's codec still runs and is
260260
// still required — for LEGACY columns, which keep their `json` declaration
261261
// and therefore keep NUMERIC affinity.
262262
expect(

0 commit comments

Comments
 (0)