Skip to content

Commit ee337fc

Browse files
committed
docs(driver-mongodb): re-anchor the dead tracker citations to the commits that decided them
Comment and docblock prose only: 22 tracker-number sites and one dead comment id, on 23 lines in 10 files, now cite the commit in this repository's history that made the decision each sentence describes. Every file keeps its line count. Claude-Session: https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi Co-authored-by: Claude <noreply@anthropic.com>
1 parent 37442d4 commit ee337fc

10 files changed

Lines changed: 23 additions & 23 deletions

‎packages/drivers/driver-mongodb/src/mongodb-11151-boolean-aggregand-answers.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
* ## The ruling this suite pins
88
*
99
* - **`sum` / `avg` answer arithmetic** — `3` / `0.5` over a 3-true/3-false
10-
* fixture. The #11065 family shape, landed on `driver-memory` and on every
10+
* fixture. The commit 20950404c family shape, landed on `driver-memory` and on every
1111
* SQL dialect (#11635).
1212
* - **`min` / `max` answer `0` / `1`** — #11152 (maintainer 2026-08-28,
13-
* applied on that card's comment 5448627494, ruling verbatim and
13+
* landed as commit f6fa22ce1, ruling verbatim and
1414
* untranslated: 「12745 A回,其他同意。」), SUPERSEDING #11249's
1515
* `false` / `true`: booleans aggregate as NUMBERS on every face, with no
1616
* per-aggregate exception, so one boolean column's aggregates answer in one

‎packages/drivers/driver-mongodb/src/mongodb-aggregation.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,15 +646,15 @@ export function buildAggregationPipeline(opts: {
646646
* `$sum`'s identity `0` and averaged to `null` here, while `SUM(col)` /
647647
* `AVG(col)` answer `3` / `0.5` over the same 3-true/3-false rows on every SQL
648648
* dialect (#11635), `driver-memory` answers those numbers on both of its faces
649-
* (#11065), and objectql's in-memory fallback answers them too because its
649+
* (commit 20950404c), and objectql's in-memory fallback answers them too because its
650650
* `toNumber` is `Number(v)` and `Number(true) === 1`. A rate measure over a
651651
* flag column — an SLA-violation rate, a win rate — is the ordinary shape of
652652
* that query, and the two answers are not two spellings of one: a dashboard
653653
* tile bound to the measure renders a percentage under SQL and a blank here,
654654
* indistinguishable from "no matching rows". `sum`'s `0` is the worse half,
655655
* being a plausible number rather than a visible hole.
656656
*
657-
* The expression is the one #11065 landed on `driver-memory`'s analytics face
657+
* The expression is the one commit 20950404c landed on `driver-memory`'s analytics face
658658
* (`memory-analytics.ts`, `numericAggregandExpr`), reproduced rather than
659659
* imported: this driver shares no line of code with that one, and the shared
660660
* contract between them is the VALUES in `@objectstack/spec/data`, not a

‎packages/drivers/driver-mongodb/src/mongodb-driver.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ describe.skipIf(!sharedMongod)('MongoDBDriver', () => {
155155
it('should update a record and return updated data', async () => {
156156
await driver.create('task', { id: 'upd-1', title: 'Original', status: 'new' });
157157
const result = await driver.update('task', 'upd-1', { title: 'Updated', status: 'done' });
158-
// `update()` declares `Record<string, unknown> | null` (#14428): a miss
158+
// `update()` declares `Record<string, unknown> | null` (commit ca3fd4b1a): a miss
159159
// answers `null`. This case is the FOUND arm, so pin that first and read
160160
// the fields through it -- same idiom as `findOne` above.
161161
expect(result).not.toBeNull();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ export class MongoDBDriver implements IDataDriver {
429429
}
430430

431431
/**
432-
* [#14428] A miss answers `null` — the arm `IDataDriver.update()` declares
432+
* [commit ca3fd4b1a] A miss answers `null` — the arm `IDataDriver.update()` declares
433433
* (#13878) and the one `InMemoryDriver`, `SqlDriver`, `SqliteWasmDriver` and
434434
* `TursoDriver`'s local face already return.
435435
*

‎packages/drivers/driver-mongodb/src/mongodb-exists-has-value-translation.test.ts‎

Lines changed: 3 additions & 3 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-
* [#13195] What `translateFilter` emits for `$exists`, and what MongoDB makes
4+
* [commit 9dac1ae01] What `translateFilter` emits for `$exists`, and what MongoDB makes
55
* of it on a row with NO VALUE — measured, not read.
66
*
77
* ## The ruling, and why this driver was thought to be the hard half
@@ -93,7 +93,7 @@ function matchMongoDoc(row: Record<string, unknown>, doc: Record<string, unknown
9393
if ((cond as Array<Record<string, unknown>>).some((b) => matchMongoDoc(row, b))) return false;
9494
continue;
9595
}
96-
// [#13195] Modelled because the emitter now produces it: a lowered
96+
// [commit 9dac1ae01] Modelled because the emitter now produces it: a lowered
9797
// `$exists` whose key is already taken by a sibling operator is promoted to
9898
// its own branch rather than merged over the sibling.
9999
if (field === '$and') {
@@ -203,7 +203,7 @@ describe('[#13195] `$exists` translation and its answer on a no-value row', () =
203203
});
204204

205205
/**
206-
* [#13195] `$exists` SHARING a field constraint with another operator.
206+
* [commit 9dac1ae01] `$exists` SHARING a field constraint with another operator.
207207
*
208208
* Not a cell the card or the ruling names — it is a consequence of the
209209
* prescribed lowering, found by measuring it. `{$ne: null}` / `{$eq: null}`

‎packages/drivers/driver-mongodb/src/mongodb-filter.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ describe('MongoDB Filter Translator', () => {
228228
});
229229

230230
it('translates $exists to the nullness test — has-value, not key-presence', () => {
231-
// [#13195, ruled 2026-08-30] Was `{avatar: {$exists: true}}`, a
231+
// [commit 9dac1ae01, ruled 2026-08-30] Was `{avatar: {$exists: true}}`, a
232232
// passthrough, which is key-presence at the wire level. `$exists` means
233233
// HAS A VALUE (`!= null`) — #5298 leg 3 / #5369 — and the lowering is the
234234
// one the `$null` arm in the same file already emits.

‎packages/drivers/driver-mongodb/src/mongodb-filter.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ function translateCondition(
10371037
// sibling operator on the same field. Merging one would drop a
10381038
// constraint silently, so each becomes its own `$and` branch — see
10391039
// `assembleLoweredWrites()`. This consumed a single `_presenceAnd`
1040-
// when the guard covered `$exists` alone (#13195); it is a LIST now
1040+
// when the guard covered `$exists` alone (commit 9dac1ae01); it is a LIST now
10411041
// because the class has several members and one field constraint
10421042
// can contest more than one key.
10431043
const extraAnd = translated._extraAnd as Record<string, unknown>[] | undefined;
@@ -1077,7 +1077,7 @@ function translateCondition(
10771077
* Read straight off the spec's `FILTER_OPERATORS` declaration order rather than
10781078
* hand-copied, so a seventeenth operator is ranked the day it is declared. The
10791079
* rank of `$exists` (last in that list) is what makes this generalisation emit,
1080-
* byte for byte, the documents #13195's guard already emits for the one
1080+
* byte for byte, the documents commit 9dac1ae01's guard already emits for the one
10811081
* operator it moved. `$like` / `$ilike` are declared but NOT translated by this
10821082
* driver — the `default:` arm refuses them before the assembly runs — so the
10831083
* fallback below is a totality floor, never a live path.
@@ -1146,7 +1146,7 @@ interface LoweredWrite {
11461146
*
11471147
* Free key → merge inline (the overwhelmingly common case). Taken key → the
11481148
* write becomes its own `$and` branch on the same field, where both constraints
1149-
* survive. That is exactly the guard #13195 landed for `$exists` alone,
1149+
* survive. That is exactly the guard commit 9dac1ae01 landed for `$exists` alone,
11501150
* generalised to every writer rather than restated once per operator.
11511151
* `driver-memory`'s reference matcher looped the operators and therefore could
11521152
* not express this defect at all; it was the oracle both drivers agreed with
@@ -1239,7 +1239,7 @@ function translateFieldOperators(
12391239
* {@link assembleLoweredWrites} after the loop. Collected rather than
12401240
* assigned because an arm cannot know whether the key it wants is already
12411241
* spoken for by a sibling operator the author wrote LATER — which is the
1242-
* whole of the defect this replaces. It subsumes #13195's single-operator
1242+
* whole of the defect this replaces. It subsumes commit 9dac1ae01's single-operator
12431243
* `presence` collection: `$exists` is one writer among the rest now.
12441244
*/
12451245
const writes: LoweredWrite[] = [];
@@ -1262,7 +1262,7 @@ function translateFieldOperators(
12621262
put(op, store(value));
12631263
break;
12641264

1265-
// [#13195] Value-independent — a presence predicate takes a boolean, not
1265+
// [commit 9dac1ae01] Value-independent — a presence predicate takes a boolean, not
12661266
// a comparand, so it is never coerced. And "present" means the field HAS
12671267
// A VALUE (`!= null`), never key presence: #5298 leg 3 / #5369, landed in
12681268
// PR #5962, ruled onto this driver by the maintainer on 2026-08-30.
@@ -1473,7 +1473,7 @@ function translateFieldOperators(
14731473

14741474
// [#13524] Assemble every lowered write, and do NOT let one clobber another.
14751475
//
1476-
// #13195 landed this rule for `$exists` alone and said in this spot that the
1476+
// Commit 9dac1ae01 landed this rule for `$exists` alone and said in this spot that the
14771477
// identical clobber was reachable through `$null` and `$between`. Enumerating
14781478
// the declared vocabulary instead of the noticed operators found the whole
14791479
// `$regex` string family too, which `driver-memory` had promoted for years

‎packages/drivers/driver-mongodb/src/mongodb-null-comparand-refusal.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ describe('[#5347] driver-mongodb refuses a non-boolean $null comparand', () => {
139139
expect(translateFilter({ stage: 'won' })).toEqual({ stage: 'won' });
140140
expect(translateFilter({ stage: { $in: ['won'] } })).toEqual({ stage: { $in: ['won'] } });
141141
expect(translateFilter({ score: { $between: [1, 2] } })).toEqual({ score: { $gte: 1, $lte: 2 } });
142-
// [#13195, ruled 2026-08-30] `$exists` lowers to the nullness test now —
142+
// [commit 9dac1ae01, ruled 2026-08-30] `$exists` lowers to the nullness test now —
143143
// has-value, not key-presence. The point of this line is unchanged: the
144144
// operator is still ACCEPTED here, and only `$null`'s comparand is refused.
145145
expect(translateFilter({ stage: { $exists: true } })).toEqual({ stage: { $ne: null } });

‎packages/drivers/driver-mongodb/src/mongodb-update-missing-id.test.ts‎

Lines changed: 3 additions & 3 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-
* [#14428] `MongoDBDriver.update()` answers a missing id with `null`, not with
4+
* [commit ca3fd4b1a] `MongoDBDriver.update()` answers a missing id with `null`, not with
55
* a record it made up.
66
*
77
* # What was broken
@@ -13,7 +13,7 @@
1313
* `updateOne({ id })` matching nothing and `findOne({ id })` coming back `null`
1414
* still produced a row — the caller's own payload plus the `updated_at` this
1515
* driver had just stamped, under an id that names no document. Since #13878
16-
* (PR #14434) `IDataDriver.update()` declares `Promise[Record[string, unknown]
16+
* (commit 93940d492) `IDataDriver.update()` declares `Promise[Record[string, unknown]
1717
* | null]`, so "a row for an id that does not exist" is no longer a way of
1818
* satisfying the declaration: it is a value the declaration distinguishes from.
1919
* Four of six shipped implementations already answered `null`; this one and
@@ -69,7 +69,7 @@
6969
* only `node_modules`/`dist`, lists 43). vitest transpiles without
7070
* typechecking, and the root `tsconfig.json` excludes `packages` entirely,
7171
* so neither of those picks it up either. That exclusion is itself a filed
72-
* defect (#14917), not a design.
72+
* defect (closed by commit a06faebbe), not a design.
7373
* - **`pnpm check:type-check-debt` DOES compile it.** The ratchet's
7474
* `--re-measure` leg generates a project that drops the test exclusion and
7575
* runs `tsc` over this package with its tests un-hidden, then compares the

‎packages/drivers/driver-mongodb/tsconfig.test.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// The TEST-layer type-check program (#14917), adopting the mechanism #5286 set
1+
// The TEST-layer type-check program (commit a06faebbe), adopting the mechanism #5286 set
22
// for `packages/spec` and #5449 generalised — the route `packages/objectql`
3-
// (#13676), `packages/runtime` (#14504) and `packages/core` (#14613) already
3+
// (#13676), `packages/runtime` (#14504) and `packages/core` (commit 81208086a) already
44
// run. `tsconfig.json` beside this file stays exactly as it is: it is the BUILD
55
// config, and its `**/*.test.ts` exclusion has a reason. This sibling puts the
66
// excluded layer back in front of tsc, and `package.json`'s `typecheck` script
@@ -22,7 +22,7 @@
2222
// FALSE, and the correction on the card is right: a second program does compile
2323
// these files. `scripts/check-type-check-coverage.mjs`'s `remeasureProject`
2424
// extends this package's tsconfig, drops only the test glob, and compares the
25-
// result against its `TEST_DEBT` ledger. That is how CI caught PR #14914's
25+
// result against its `TEST_DEBT` ledger. That is how CI caught commit ca3fd4b1a's
2626
// three TS18047 errors, which this package's own `typecheck` could not see. So
2727
// the pins were not phantoms. What was true is narrower and is what this file
2828
// closes: the only program reading this layer was a DEBT RATCHET — an

0 commit comments

Comments
 (0)