Skip to content

Commit 286316e

Browse files
committed
docs(driver-sql): re-anchor the dead tracker citations to the commits and ADR that decided them (stage 4 of #20595)
Comment and docblock prose only, in ruling C+D's form C: every comment site in packages/drivers/driver-sql that cited a tracker number answering 404 (39 numbers, 291 sites on 287 lines), plus the dead comment id 5448627494 (2 lines), now cites the ADR when one records the decision, otherwise the commit in this repository that made it. Every file keeps its line count; no code token, string literal or numeric literal moves; no tracker number is added. Claude-Session: https://claude.ai/code/session_017xfMoEjKUuSh2xYB8sCozp Co-authored-by: Claude <noreply@anthropic.com>
1 parent 222ecc2 commit 286316e

55 files changed

Lines changed: 291 additions & 291 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/drivers/driver-sql/src/builtin-column-collision.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export type FieldKeyClass = 'storage' | 'presentation';
7272
export const FIELD_KEY_STORAGE_CLASS: Readonly<Record<string, FieldKeyClass>> = Object.freeze({
7373
// ---- storage: the column's own shape -------------------------------------
7474
type: 'storage', // `createColumn`: the column type itself
75-
maxLength: 'storage', // `createColumn`: varchar(n) vs TEXT, and the #11374 keyable decision
75+
maxLength: 'storage', // `createColumn`: varchar(n) vs TEXT, and commit d0e3a885b's keyable decision
7676
multiple: 'storage', // `createColumn`: a multi-value field is a JSON column
7777
precision: 'storage', // numeric column shape (this driver does not read it yet)
7878
scale: 'storage', // numeric column shape (this driver does not read it yet)

‎packages/drivers/driver-sql/src/dialect-emission-refusal.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* `engine.syncObjectSchema` → `SqlDriver.syncSchema` → the DDL gate, on a
6464
* server that is already serving HTTP. That was the exact test #8035 applied
6565
* when it UNregistered `MONGODB_MULTI_TENANT_UNSUPPORTED` for failing it — a
66-
* removal #16649 reversed under the #16404 door-or-no-door rule, which takes
66+
* removal that commit 613bfbd3d reversed under the #16404 door-or-no-door rule, which takes
6767
* registration out of that test's reach entirely: every `code` that ships in
6868
* `dist` carries a ledger row, and wire-reachability now decides only what a
6969
* door ANSWERS with. This one can be carried, so the door serves it under its

‎packages/drivers/driver-sql/src/live-dialect-matrix.testkit.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ export function declareUnprovisionedCell(cell: DialectCell, matrix: string): voi
448448
* Nothing in the corridor (15_000, 600_000) is distinguishable by measurement,
449449
* so the value is fixed by this package's OWN existing answer for live-touching
450450
* sites: 60 explicit `60_000` budgets across 22 files — #13688 and its sweep
451-
* #13902 put them on live test BODIES, #14213 and #14628 on the hooks that pay
451+
* #13902 put them on live test BODIES, #14213 and commit 6392b9c2b on the hooks that pay
452452
* a live connect. Adopting it leaves the live matrix with ONE live budget
453453
* instead of two, so a red at 60_000 ms is unambiguous about which bound it hit.
454454
*

‎packages/drivers/driver-sql/src/media-column-move.pin.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* refusing.
1212
*
1313
* ⛔ The single most load-bearing assertion here is that the PostgreSQL retype
14-
* arm's pre-check exists at all. The #15041 addendum prescribed the retype with
14+
* arm's pre-check exists at all. The ADR-0104 2026-09-05 addendum prescribed the retype with
1515
* NO pre-check, and that form was measured on live PostgreSQL 16.13 to accept a
1616
* row holding an inline metadata blob and flatten it to its own literal text.
1717
* The director ruling (decision batch #120 item 1) replaced the clause; a pin

‎packages/drivers/driver-sql/src/media-column-move.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* `sys_file` id, and the pre-check that ABORTS instead of destroying a row the
77
* backfill never converted.
88
*
9-
* The ruling on #15041 gave this step one requirement in words — abort *"on
9+
* The ruling in ADR-0104's 2026-09-05 addendum gave this step one requirement in words — abort *"on
1010
* the first cell that is not a JSON string"* — and one sketch in SQL beside
1111
* it. **The sketch does not implement the requirement, and that was measured
1212
* rather than argued** (director ruling, decision batch #120 item 1): on live

‎packages/drivers/driver-sql/src/schema-drift.base-type-mismatch.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ describe('diffManagedTable — a SINGLE-VALUE JSON-class field over a stale text
364364
// The card's scope, asserted rather than described: the fork applies to
365365
// every single-value member of the writer's set.
366366
//
367-
// ⚠️ [#15989] #15041 has since been ruled — option A, the file family's
367+
// ⚠️ [#15989] ADR-0104's 2026-09-05 addendum has since ruled — option A, the file family's
368368
// column holds the bare `sys_file` id — so the family is no longer a member
369369
// of {@link JSON_COLUMN_FIELD_TYPES}: it is asked per deployment, and
370370
// `diffTags` omits `fileColumnsMoved`, i.e. every call here is about a

‎packages/drivers/driver-sql/src/schema-drift.ts‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export const HASH_SHADOW_SUFFIX = '__hash';
417417
* orphan pass reports as `unmapped_column` with a `drop_column` op. Dropping it
418418
* would take the UNIQUE index it carries with it, silently returning the object
419419
* to "registered but its declared uniqueness unenforced" — the very state
420-
* #11374/#11627 exist to end, reached this time through the migration tool
420+
* #11627 and commit d0e3a885b exist to end, reached this time through the migration tool
421421
* rather than through a refused DDL.
422422
*
423423
* Matched by SUFFIX rather than by a registry of known names, deliberately: the
@@ -448,7 +448,7 @@ export function isHashShadowColumn(name: string): boolean {
448448
* 64-character identifier limit.
449449
*
450450
* ⚠️ Lives HERE, beside {@link isHashShadowColumn}, rather than in the driver:
451-
* #13015 was the price of the split. The ORPHAN-column pass knew the shadow
451+
* The defect commit cd1348802 fixed was the price of the split. The ORPHAN-column pass knew the shadow
452452
* vocabulary and the INDEX differ did not, so a healthy shadow-carried UNIQUE
453453
* had its column protected from a drop while the index that column carries was
454454
* proposed for a destructive rebuild. Both passes now ask the same module the
@@ -473,7 +473,7 @@ export function hashShadowColumnFor(indexName: string): string {
473473
/**
474474
* One key part a hash shadow hashes: the column identity, and whether the
475475
* generation expression folds it through the NULL-safe `COALESCE(col, ...)`
476-
* form (ADR-0120 D3, carried into the shadow by #12998).
476+
* form (ADR-0120 D3, carried into the shadow by commit df1c75c4b).
477477
*/
478478
export interface HashShadowKeyPart {
479479
column: string;
@@ -482,16 +482,16 @@ export interface HashShadowKeyPart {
482482

483483
/**
484484
* Read the DECLARED key parts back out of a hash shadow's stored
485-
* `GENERATION_EXPRESSION` (#13015).
485+
* `GENERATION_EXPRESSION` (commit cd1348802).
486486
*
487487
* This is what makes a shadow-carried key COMPARABLE rather than merely
488-
* skippable. Since #12998 the expression carries the NULL-safe parts in their
488+
* skippable. Since commit df1c75c4b the expression carries the NULL-safe parts in their
489489
* COALESCE spelling, so the FORM of the key — which columns, and which of them
490490
* are folded — survives the round trip, and the differ can ask the real
491491
* question ("does this shadow enforce what metadata declares?") instead of the
492492
* blind one ("is this a shadow at all?").
493493
*
494-
* ⛔ Why the blind question is not good enough: a shadow created BEFORE #12998
494+
* ⛔ Why the blind question is not good enough: a shadow created BEFORE commit df1c75c4b
495495
* hashes the RAW columns, so `CONCAT` returns NULL for every NULL-organization
496496
* row and the rows the COALESCE bucket exists to constrain are constrained by
497497
* nothing (#5030's shape). It is indistinguishable BY NAME from a healthy one.
@@ -858,7 +858,7 @@ export function diffManagedTable(args: {
858858
columns: PhysicalColumn[];
859859
dialect: SqlDialectName;
860860
/**
861-
* Which columns an index KEYS ON (#11374), keyed by field name — the exact
861+
* Which columns an index KEYS ON (commit d0e3a885b), keyed by field name — the exact
862862
* map {@link indexedKeyColumns} builds. Consulted ONLY by the varchar-length
863863
* branch below, through {@link varcharColumnChars}, to answer the same
864864
* question `createColumn` asks before it sizes a text-family column.
@@ -1703,7 +1703,7 @@ export interface PhysicalIndex {
17031703
/**
17041704
* When this index is physically carried by a #11627 hash shadow, the
17051705
* DECLARED key parts that shadow hashes, read back from the generation
1706-
* expression (#13015 via #12998) by `SqlDriver.introspectIndexes`.
1706+
* expression (commit cd1348802 via commit df1c75c4b) by `SqlDriver.introspectIndexes`.
17071707
*
17081708
* Absent both when the index is NOT shadow-carried and when it is but the
17091709
* expression could not be read. {@link isHashShadowCarrier} tells those two
@@ -2029,7 +2029,7 @@ export function diffUnbuildableIndexes(args: {
20292029
* field-level `unique` through {@link uniqueIndexesFromFields}, object-level
20302030
* `indexes[]` through {@link normalizeDeclaredIndex} — so "which columns end up
20312031
* in a key" has ONE answer, shared by the index sync that creates them and by
2032-
* the DDL that has to make them keyable in the first place (#11374).
2032+
* the DDL that has to make them keyable in the first place (commit d0e3a885b).
20332033
*
20342034
* ⚠️ Deliberately NOT filtered by `physicalColumns`, unlike `expectedIndexes`:
20352035
* its caller runs BEFORE the columns exist — deciding a column's TYPE is the
@@ -2275,15 +2275,15 @@ function indexSignature(
22752275
* Answerable from the index alone, by NAME: the shadow is derived from the
22762276
* index name ({@link hashShadowColumnFor}), so a carrier is an index whose sole
22772277
* key column is its own shadow. That is what makes this the FAIL-SAFE half of
2278-
* #13015 — it holds even when the generation expression cannot be read, and a
2278+
* commit cd1348802 — it holds even when the generation expression cannot be read, and a
22792279
* carrier is never a thing this differ may propose destroying on a guess.
22802280
*/
22812281
export function isHashShadowCarrier(index: PhysicalIndex): boolean {
22822282
return index.columns.length === 1 && index.columns[0] === hashShadowColumnFor(index.name);
22832283
}
22842284

22852285
/**
2286-
* The key an index ENFORCES, which is not always the key it STORES (#13015).
2286+
* The key an index ENFORCES, which is not always the key it STORES (commit cd1348802).
22872287
*
22882288
* For an ordinary index the two are the same. For a #11627 shadow-carried
22892289
* UNIQUE the stored key is one VARBINARY(32) generated column and the enforced
@@ -2358,7 +2358,7 @@ export function diffManagedIndexes(args: {
23582358
if (!p || p.primary || isRuntimeManagedIndex(p, runtimeCreated, tenantField)) return false;
23592359
if (!p.unique || p.partial === true) return false;
23602360
if ((p.expressions?.length ?? 0) > 0 || (p.nullSafeColumns?.length ?? 0) > 0) return false;
2361-
// #13015: nor is a hash-shadow carrier. Its stored key is one generated
2361+
// Commit cd1348802: nor is a hash-shadow carrier. Its stored key is one generated
23622362
// column, so the identity comparison below already excludes it — stated
23632363
// outright because the exclusion must survive that comparison changing,
23642364
// and because `replace_unique_index` DROPS the legacy name.
@@ -2428,7 +2428,7 @@ export function diffManagedIndexes(args: {
24282428
// Same normalization on BOTH sides (#4884, ADR-0120 D3): column identity
24292429
// AND key-part form, literal-agnostic on the COALESCE literal — asked of
24302430
// the key the index ENFORCES, which for a #11627 shadow-carried UNIQUE is
2431-
// not the column it stores (#13015).
2431+
// not the column it stores (commit cd1348802).
24322432
const pk = enforcedIndexKey(p);
24332433
if (
24342434
p.unique === e.unique &&
@@ -2445,7 +2445,7 @@ export function diffManagedIndexes(args: {
24452445
// (`recreate_index` → drop first) this differ cannot undo. Not ours to
24462446
// reconcile (#4884).
24472447
if (isRuntimeManagedIndex(p, runtimeCreated, tenantField)) continue;
2448-
// #13015, fail-safe half: a hash-shadow carrier whose generation
2448+
// Commit cd1348802, fail-safe half: a hash-shadow carrier whose generation
24492449
// expression could NOT be read (`shadowKey` unresolved). We know by name
24502450
// that the index is driver-owned and that its stored key is a digest, so
24512451
// the identity comparison above is meaningless for it — but we do not know
@@ -2455,7 +2455,7 @@ export function diffManagedIndexes(args: {
24552455
// ⛔ The `!p.shadowKey` half is load-bearing, and was measured: without it
24562456
// this guard swallows the RESOLVED carriers too, which silently demotes the
24572457
// whole fix to the blind skip — every shadow-carried index unreportable,
2458-
// including a pre-#12998 one hashing the RAW columns whose constraint does
2458+
// including one from before commit df1c75c4b hashing the RAW columns whose constraint does
24592459
// not cover NULL-organization rows at all. Green, quiet, and the exact
24602460
// trade this fix exists to refuse.
24612461
if (isHashShadowCarrier(p) && !p.shadowKey) continue;
@@ -2471,7 +2471,7 @@ export function diffManagedIndexes(args: {
24712471
// clean → recategorised `safe` (dev autoMigrate may apply); duplicates →
24722472
// blocked with a row report, the old index left in place.
24732473
//
2474-
// #13015: read through the ENFORCED key, so a pre-#12998 shadow — same
2474+
// Commit cd1348802: read through the ENFORCED key, so a shadow from before commit df1c75c4b — same
24752475
// columns, hashed RAW instead of through the NULL-safe COALESCE — is
24762476
// recognised as exactly this tightening and gets the same duplicate
24772477
// pre-flight before anything is dropped. The explicit "physical side is
@@ -2530,7 +2530,7 @@ export function diffManagedIndexes(args: {
25302530
// (#4884 — the boot advised dropping `idx_sys_metadata_overlay_draft`, the
25312531
// partial UNIQUE enforcing draft-overlay uniqueness, on a healthy fresh DB).
25322532
if (isRuntimeManagedIndex(p, runtimeCreated, tenantField)) continue;
2533-
// #13015: an orphaned shadow carrier is still an orphan — its declaration
2533+
// Commit cd1348802: an orphaned shadow carrier is still an orphan — its declaration
25342534
// is gone, and `drop_index` is the right remedy — but the report must name
25352535
// the constraint it enforced, not the digest column it stored.
25362536
const po = enforcedIndexKey(p);

‎packages/drivers/driver-sql/src/sql-driver-11176-bulk-and-merge-updated-at.test.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* [#11176] The two write doors that did not advance `updated_at`: `updateMany()`
55
* on every dialect, and `upsert()`'s merge branch on Postgres and MySQL.
66
*
7-
* ## Not #11067, and the difference is what this file is set up to show
7+
* ## Not the defect commit 479fba50d fixed, and the difference is what this file is set up to show
88
*
9-
* #11067 is about `tablesWithTimestamps` being filled only by DDL, so a
9+
* Commit 479fba50d is about `tablesWithTimestamps` being filled only by DDL, so a
1010
* `skipSchemaSync` deployment never stamped. These two are missing on EVERY
1111
* deployment — so almost every table here is built by the driver's own
1212
* `initObjects`, with `tablesWithTimestamps` correctly populated. That is the
@@ -57,7 +57,7 @@
5757
* ## §6 The narrowing, stated as a measurement rather than a claim
5858
*
5959
* The upsert stamp reads `observedUpdatedAtColumn` — DDL-observed, or settled
60-
* `present` by a successful stamped UPDATE — and deliberately NOT #11067's
60+
* `present` by a successful stamped UPDATE — and deliberately NOT commit 479fba50d's
6161
* `presumed` state. `presumed` exists so an UPDATE can speculate and then
6262
* RECOVER (`updateWithPresumedTimestamp`); the upsert door has no such recovery,
6363
* and a wrong presumption there would name a missing column in an INSERT column
@@ -66,7 +66,7 @@
6666
* would break first if the narrowing were ever widened without a recovery.
6767
*
6868
* `updateMany` has no such narrowing: it is an UPDATE door, so it reuses
69-
* #11067's machinery whole (§7).
69+
* commit 479fba50d's machinery whole (§7).
7070
*
7171
* ## Reverse verification (direction predicted before running)
7272
*
@@ -87,7 +87,7 @@ const OPTS = { bypassTenantAudit: true } as any;
8787
/**
8888
* The instant a row is backdated to before the write under test.
8989
*
90-
* A sentinel far in the past rather than a sleep, for #11067's reason: a stamp
90+
* A sentinel far in the past rather than a sleep, for commit 479fba50d's reason: a stamp
9191
* taken a moment after an insert default can legitimately land on the same
9292
* stored value. Backdating removes the race without weakening the assertion —
9393
* the stamp either moved to ~now or did not move at all, and those are six
@@ -338,7 +338,7 @@ function measure(cell: DialectCell): void {
338338
// ── §6 The declared narrowing, measured at the property that would break ──
339339

340340
it('§6 still upserts a hand-migrated table that has NO `updated_at` column', async () => {
341-
// The upsert stamp reads the OBSERVED answer, never #11067's presumption,
341+
// The upsert stamp reads the OBSERVED answer, never commit 479fba50d's presumption,
342342
// because this door has no recovery to fall back on. If that narrowing is
343343
// ever widened without one, this is the call that stops working.
344344
const id = 'n1';
@@ -349,7 +349,7 @@ function measure(cell: DialectCell): void {
349349
expect(after.row.title).toBe('b');
350350
});
351351

352-
// ── §7 `updateMany` reuses #11067's machinery whole ──────────────────────
352+
// ── §7 `updateMany` reuses commit 479fba50d's machinery whole ──────────────────────
353353

354354
it('§7 stamps a `skipSchemaSync` table, and still updates one without the column', async () => {
355355
// The presumption and its recovery, exercised through the bulk door: it is
@@ -363,7 +363,7 @@ function measure(cell: DialectCell): void {
363363
expect(presumed.updatedAt).toBeGreaterThan(BACKDATED_MS);
364364
expect(presumed.row.title).toBe('b');
365365

366-
// The other half of #11067's pair: a table that genuinely lacks the column
366+
// The other half of commit 479fba50d's pair: a table that genuinely lacks the column
367367
// must NOT gain a new rejection.
368368
await driver.create(NO_COL, { id: 'n2', title: 'a', status: 'bulk' }, OPTS);
369369
const touched = await driver.updateMany(NO_COL, { where: { status: 'bulk' } }, { title: 'b' }, OPTS);

‎packages/drivers/driver-sql/src/sql-driver-11224-update-stamp-precision.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* audit answer comparing the two, a "modified since creation?" badge, and above
3939
* all a millisecond-precision delta cursor (`updated_at > cursor`), which
4040
* SKIPS every row whose stamp was truncated back below it — the same
41-
* silent-wrong-answer family as #11067 / #11176 / #11223, reached by a fourth
41+
* silent-wrong-answer family as #11176 / #11223 / the one commit 479fba50d fixed, reached by a fourth
4242
* mechanism. §2 asserts that skip is gone by issuing the cursor comparison as
4343
* real SQL on the server rather than comparing numbers in JS.
4444
*

‎packages/drivers/driver-sql/src/sql-driver-11627-hash-shadow-key.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* ## Why a shadow and not a prefix index
1717
*
18-
* The maintainer's 2026-08-24 ruling on #11374 chose the hash route and
18+
* The maintainer's 2026-08-24 ruling, landed as commit 107bb4ba4, chose the hash route and
1919
* rejected prefix-unique indexes, on measurement: `UNIQUE KEY (token(191))`
2020
* enforces uniqueness over the PREFIX, so two genuinely distinct tokens that
2121
* share their first 191 characters collide and the second is refused as

0 commit comments

Comments
 (0)