Skip to content

Commit bfc5e47

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-21517-approval-actor-texts
2 parents a1c75e6 + fd5a1cd commit bfc5e47

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)