Skip to content

Commit f97660c

Browse files
docs(driver-mongodb): re-anchor the dead tracker citations to the commits that decided them (stage 11 of #20595) (#21617)
Part of #20595 Clause-②: no ## What changed Stage 11 of the `domain:engine` lane of the dead-citation sweep: `packages/drivers/driver-mongodb/**`, comment and docblock prose only, per the claim (`5971485908`). Stages 1 to 10 landed as `a7d9768ec`, `d150c3039`, `4bf4e7e70`, `13a24ece2`, `db0cf2231`, `85986144c`, `48fa7a381`, `c205b6c35`, `c98a72d69` and `fd5a1cd59`. #20595 stays open: the other half of this lane is the packages this stage does not touch (`formula` 4 and `metadata-fs` 2 on the census after this stage, 6 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 **22 sites on 22 lines in 10 files, covering 7 numbers, plus one dead comment id on one more line**: - **9 census sites** (9 lines, 3 files under `src/`): the whole `allocated-but-absent` population of the gate's own census in this package at the base; - **10 test-comment sites** (10 lines, 6 test files), which the census defers. They carry 5 numbers: 3 the census itself reads as dead in this package's `src` (#11065, #13195, #14428) and 2 the census never judges in this package (#14434, and #14917, which also stands on `tsconfig.test.json`), which the board and a single read each settle; - **3 sites outside the census glob, inside the claimed surface**: the `//` comment lines of `tsconfig.test.json` (`:1` #14917, `:3` #14613, `:25` #14914), stage 8's precedent for the same file shape in `packages/core`. `vitest.config.ts`, `tsconfig.json`, `package.json`, `README.md` and `LICENSE` cite no dead number; - **1 dead comment-id citation**: `mongodb-11151-boolean-aggregand-answers.test.ts:13` named comment `5448627494` on #11152, which answers 404 although #11152 itself resolves (the card reports 24 comments and serves 16). Stage 4 rewrote the same id in `driver-sql` as 「landed as commit f6fa22c」, and this stage takes that wording. **Anchors: 7 numbers and the comment id, all by commit; 0 by ADR, 0 by repository qualifier; 7 distinct shas** (#14428 and #14914 share `ca3fd4b1a`: the card's fix and that pull request's own squash). 5 numbers and the comment id reuse the anchor an earlier stage measured for them; `a06faebbe` (#14917) and the #14914 reading of `ca3fd4b1a` are measured here. Only comments changed. Every file keeps its line count (23 lines out, 23 in, plus the changeset), so no line citation into any of them moves. No code token moves (the guard below). All 46 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 #5286, #13676 and #14504 on `tsconfig.test.json`, each already on its line and each answering 200). **A `patch` changeset**: 2 of the 9 rewritten non-test lines are in the published `dist` (the `MongoDBDriver.update()` docblock in the `.d.ts` and the JavaScript, and one `//` line esbuild keeps), 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 `37442d475` (the before run below), `allocated-but-absent` per remaining `domain:engine` package: | package | before | after this stage | |---|---|---| | `drivers/driver-mongodb` | **9** | **0** | | `formula` | 4 | 4 | | `metadata-fs` | 2 | 2 | | `drivers/driver-turso`, `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 15 to 6. `driver-mongodb` reads 9, as at stage 10's head census (`e89bd10cd`), so the stage went ahead. ## Census: `driver-mongodb`, 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-mongodb/`. | reading | tree | board | whole-repo `allocated-but-absent` | sites | lines | files | numbers | |---|---|---|---|---|---|---|---| | before | base `37442d475`, run 17:13:20Z to 17:16:55Z | enumerated, 195 pages, frontier #21613, 19,434 records | 128 | **9** | 9 | 3 | 3 | | after | `ee337fc39`, run 17:27:02Z to 17:30:28Z | enumerated, 195 pages, frontier #21614, 19,435 records (newest number read before the run #21613, after it #21614) | 119 | **0** | 0 | 0 | 0 | The whole-repo drop is 9, and the two finding sets differ by exactly the 9 rows of this package, removed; none was added. `resolves` (35,697), `resolves-as-pull-request` (2,383) and `cross-repo-unjudged` (1,250) 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 `b69c176e9` (17:44:02Z to 17:47:23Z, 195 pages, frontier #21615, 19,436 records, newest #21615 before and after): whole-repo 119, `driver-mongodb` 0, and the finding set is identical to the after run, line numbers included. **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 (53) and classifies each citation with the gate's `classifyCitation` against one board enumerated by the gate's `enumerateBoard` (195 pages, frontier #21613, 19,434 records, read 17:17:48Z to 17:21:11Z), the same board for both readings. Every one of the 7 numbers was then read on its own over the issues endpoint (17:21:47Z): **all 7 answer 404**; the numbers that stay on changed lines (#5286, #13676, #14504) and the controls #11152, #11249, #11635, #5346, #13878, #20399, #15280 and #12745 answer 200. | reading | citations | dead | src comment | test comment | `tsconfig.test.json` | test string | changelog | |---|---|---|---|---|---|---|---| | before, `37442d475` | 1,002 | **36** | 9 | 10 | 3 | 3 | 11 | | after, `ee337fc39` | 980 | **14** | 0 | 0 | 0 | 3 | 11 | The citation count drops by 22, the 22 rewritten tracker-number sites; no respelling stays a citation. The live counts did not move (src comment: 279 resolve, 12 as pull requests, 3 cross-repo; test comment: 264, 16 and 5; files outside `src`: 9 resolve). A third, raw reading (every `#` followed by 2 to 6 digits, whatever surrounds it, `CHANGELOG.md` aside) counts 700 before and 678 after: also a drop of 22. **Comment ids.** Every ten-digit run under `packages/drivers/driver-mongodb` (its `CHANGELOG.md` aside) was read: five lines, four ids. `5448627494` answers 404 and is rewritten; `5861435168` and `5865693155` (ruling records on #20311 and #20399, `mongodb-filter.ts:696` to `:697`, `mongodb-20444-empty-operator.test.ts:6`) and `5186668033` (`mongodb-filter.ts:807`) answer 200; the control `5971485908`, the claim, answers 200. After the rewrite the package carries four ten-digit lines, all live. No `issuecomment` or `discussion_r` link stands in the package (grep exit 1; the same grep finds them in `packages/runtime` and `packages/spec`). ## Per-number table `src` counts census sites, `test` the test-comment sites, `cfg` the `tsconfig.test.json` comment lines. Every sha matches exactly one commit (`git rev-parse --disambiguate`, count 1), is an ancestor of the base `37442d475` and of `origin/main` `54521f08c` (`git merge-base --is-ancestor`, exit 0 for all 7 on both; exit 0 is self-proving, and the clone was unshallowed first), and names the number it replaces in its message, its diff or both: 3 in the message and the diff (#13195, #14613, #14917), 3 in the diff alone (#11065 for `20950404c`, #14428 for `ca3fd4b1a`, the comment id for `f6fa22ce1`), and 2 in the message alone (#14434 for `93940d492`, in the subject's squash suffix; #14914 for `ca3fd4b1a`, in the subject's squash suffix and a body line naming that pull request's contract-review round), where the dead number was that pull request's own and the commit is its squash. The `+` lines carry exactly these 7 nine-hex spans as new ones. `git blame` at the base puts 10 of the 23 changed lines on their anchor; the other 13 were written by a commit that cites the number as an earlier decision (`c4ecf0c49` citing #11065 three times; `df1812050` citing #13195 five times; `9268aec56`, which created `mongodb-exists-has-value-translation.test.ts` as a measurement before the ruling, citing #13195 once; `ca3fd4b1a` citing #14434 and #14917; `a06faebbe` citing #14613 and #14914 on the file it created), and in each case the anchor is the commit that made the change the sentence credits to the number. `source` says whether an earlier stage already used this anchor for this number (`reused`) or it was measured here (`measured`). | number | src | test | cfg | anchor | kind | source | what it decided | |---|---|---|---|---|---|---|---| | `#11065` | 2 | 1 | 0 | `20950404c` | commit | reused (stage 4, stage 5) | `driver-memory` counts a boolean aggregand as 1/0 in `avg` and `sum` on both its faces; it wrote `numericAggregandExpr` in `memory-analytics.ts`, the expression `mongodb-aggregation.ts:657` says it reproduces (the squash of PR #11153; its diff names #11065 7 times) | | `#13195` | 6 | 5 | 0 | `9dac1ae01` | commit | reused (stage 5) | `$exists` means HAS A VALUE on the live mingo path, the analytics face and `translateFilter`; it wrote the `_presenceAnd` guard for `$exists` alone, the `[#13195] Value-independent` comment and the note that the same clobber was reachable through `$null` and `$between`, the three things the `mongodb-filter.ts` sites credit to the number (the squash of PR #13529) | | `#14428` | 1 | 2 | 0 | `ca3fd4b1a` | commit | reused (stage 10) | `update()` on a missing id answers `null` on MongoDB and Turso's remote face; it wrote the `MongoDBDriver.update()` docblock and created `mongodb-update-missing-id.test.ts` | | `#14434` | 0 | 1 | 0 | `93940d492` | commit | reused (stage 4, stage 5, stage 10) | declare the not-found arm on `IDataDriver.update()` (that pull request's squash); stage 10's 「Since #13878 (commit 93940d4)」 for the twin sentence | | `#14917` | 0 | 1 | 1 | `a06faebbe` | commit | measured | put the test layer in front of tsc via the `#5286` sibling route; it created this package's `tsconfig.test.json` and graduated the `TEST_DEBT` entry (the squash of PR #15465) | | `#14613` | 0 | 0 | 1 | `81208086a` | commit | reused (stage 8) | `@objectstack/core` declares a typecheck script and its test layer enters the ratchet through a `tsconfig.test.json` sibling; stage 8 used it for the identical sentence in `packages/core` | | `#14914` | 0 | 0 | 1 | `ca3fd4b1a` | commit | measured | that pull request's own squash; its message records the three TS18047 errors the widened `update()` declaration introduced and the type-check debt ratchet catching them (10 to 13), the event `tsconfig.test.json:25` describes | | comment `5448627494` | 0 | 1 | 0 | `f6fa22ce1` | commit | reused (stage 4) | the boolean aggregand column in the aggregation conformance fixture with ruled numeric `min` / `max` on every face; its message records the 2026-08-28 maintainer ruling (option A, superseding #11249's `false` / `true`), its diff names the id 3 times, and it wrote the line | No ADR or ruling record names any of the 7 numbers as the place their decision is recorded. ## Wordings to check Most rewrites swap a tag in place (`[#N]` to `[commit SHA]`, `(#N)` to `(commit SHA)`, `#N's` to `commit SHA's`, stage 1's form). These say more than the tag: - **The dead comment id**: 「applied on that card's comment 5448627494, ruling verbatim and」 became 「landed as commit f6fa22c, ruling verbatim and」 (`mongodb-11151-boolean-aggregand-answers.test.ts:13`), stage 4's wording for the same id and the same sentence in `driver-sql`, verbatim. The quoted ruling 「12745 A回,其他同意。」 on the next line is untouched. - **A dead pull-request number, in a possessive**: 「That is how CI caught PR #14914's / three TS18047 errors」 became 「That is how CI caught commit ca3fd4b's / three TS18047 errors」 (`tsconfig.test.json:25`). The errors arose on that pull request's branch and were narrowed before it landed, so the squash as landed carries none of them; its message records both the errors and the catch. This is stage 10's squash form (「#5181 (PR #6076)」 to 「#5181 (commit 6513c17)」). The alternative, if the possessive reads wrong: 「caught, in the change commit ca3fd4b landed, its」, one line, no reflow. - **A filed defect**: 「That exclusion is itself a filed defect (#14917), not a design.」 became 「… a filed defect (closed by commit a06faeb), not a design.」 (`mongodb-update-missing-id.test.ts:72`). The sentence was written the day before the fix and describes the card; stage 5's 「CLOSED by commit 9dac1ae」 is the form for a card named as an open defect. - **A file header written before the ruling**: `mongodb-exists-has-value-translation.test.ts:4` was written by `9268aec56`, the measurement that pinned the divergence while 「the direction stays undecided」; `9dac1ae01` inverted the file in place onto the ruled answer. The header now opens 「[commit 9dac1ae]」, stage 5's anchor for the twin header in `driver-memory`'s `memory-exists-has-value-faces.test.ts`. - **Sentence starts**: where the number opened a sentence, the new text opens with 「Commit」: 「// Commit 9dac1ae landed this rule for `$exists` alone」 (`mongodb-filter.ts:1476`). 「The commit 2095040 family shape」 (`mongodb-11151-boolean-aggregand-answers.test.ts:10`) is stage 4's 「the settled commit 2095040 family shape」. - **Ruling dates kept**: 「[#13195, ruled 2026-08-30]」 became 「[commit 9dac1ae, ruled 2026-08-30]」 on two test lines, stage 5's form. - 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: 3 test-string sites, 2 numbers, 3 files**: the `describe` titles at `mongodb-exists-has-value-translation.test.ts:138` (#13195) and `mongodb-update-missing-id.test.ts:150` (#14428), and the `it` title at `mongodb-operator-key-clobber.test.ts:227` (#13195). Both 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 11 sites (7 numbers); left. ## Mechanical guard: no code token moves The guard compares base `37442d475` against the tree over all 10 touched files, with TypeScript 6.0.3, to stages 2 to 10's two-reading specification (their script was a scratch file and is gone, so it was rewritten here to that specification and proven with the controls below): - **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. - **`tsconfig.test.json`**: reading 2 over `ts.parseJsonText`, and reading 1 replaced by the parsed config object (`ts.parseConfigFileTextToJson`) compared structurally. Results, at `ee337fc39` (the later commits touch none of the 10 files): - Real run: 20,837 base tokens, **0 files with a token change** (exit 0). - Comment controls: 「Value-independent」 to 「VALUE-independent」 (`mongodb-filter.ts`) and 「it is the BUILD」 to 「it is the BUILd」 (`tsconfig.test.json`): 0 files changed (exit 0 each). - Positive control, an identifier (`export class MongoDBDriver` to `XMongoDBDriver`, `mongodb-driver.ts`): DIFFER on both readings (exit 1). - Positive control, a string literal (the `describe` title 「… on a missing id」 to 「… on a missing iD」, `mongodb-update-missing-id.test.ts`): DIFFER on both readings (exit 1). - Positive control, a template literal (`input: ` followed by the `$${field}` template, to `$${field}x`, `mongodb-aggregation.ts`): DIFFER on both readings (exit 1). - Positive control, a numeric literal (`$lte: 100` to `101`, `mongodb-filter.test.ts`): DIFFER on both readings (exit 1). - Positive control, a config value (`"lib": ["ES2022"]` to `ES2023`, `tsconfig.test.json`): 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 (`2c4ba4f8babb`, `aebae4859583`, `48ffb45e011f`, `4f12e29dbbce`, `581fa7ca2401`, `162a1f72bae6`), 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 164s, shared-box seconds), at `ee337fc39`: the dependency closure was built first (`pnpm --filter '@objectstack/driver-mongodb^...' build`, exit 0), then the package's own `build` (tsup and `check-dts-emitted`) ran three times, exit 0 each: - **Leg 1**, the head text: 6 `dist` files hashed (`index.js`, `index.mjs`, their sourcemaps, `index.d.ts`, `index.d.mts`). 2 of the 9 rewritten non-test lines appear verbatim in `dist`: the `MongoDBDriver.update()` docblock line (`mongodb-driver.ts:432`) in all four of `index.js`, `index.mjs`, `index.d.ts` and `index.d.mts`, and the `// [commit 9dac1ae] Value-independent` line (`mongodb-filter.ts:1265`) in `index.js` and `index.mjs`. The other 7 sit in comments the build drops. - **Leg 2**, the base text put back in the 3 non-test touched files (3 of 3 proven equal to their base blob, written to the tree only): 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 (3 of 3 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-mongodb-provenance-anchors.md` declares a `patch` for `@objectstack/driver-mongodb`, 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-mongodb`. ## Gates (head `b69c176e9`) - **Derived gates:** `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands` at `b69c176e9` (11 paths against merge base `54521f08c`) derived 62 commands. All 62 ran (17:43:06Z to 17:55:21Z, after the workspace build), each exit code captured before any pipe: 62 exit 0. `--ran` reports 「62 derived, 62 run, 0 NOT-MEASURED, 0 UNRUN」 (a derived zero) and exits 0. The PM's lead derivation (48 commands, tree `ec390ec00`, one path) is a subset: the extra 14 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), `check:type-check-coverage` and `check:type-check-debt` (the `tsconfig.test.json` path), and four gates whose sources name the touched driver files (`check:engine-double-contract`, `check:objectql-double-limit`, `check:query-options-erasure`, `check:where-matcher`). - **Named readings:** `node scripts/check-issue-citations.mjs` exits 0 (「no issue citations added against 54521f0」: the `+` lines in the 3 non-test source files carry no number); `pnpm check:issue-citations` exits 0 (its self-test); `pnpm check:doc-authoring` exits 0 (the sibling-package prose-id baseline holds, no growth); `pnpm check:nul-bytes` exits 0 (9,980 files, no raw control bytes), and a control-byte grep over the 11 changed files finds none (exit 1). The changeset gates exit 0: `check-adr-0087-registration` (「1 non-breaking changeset(s) seen」), `check-empty-changeset` (「1 declaring changeset(s) added」), `check-changeset-no-major` (「no `major` bump」; its Clause-② level axis reads the pull request body, so it is not applicable to a local run and is CI's reading), and `check:changeset-gate-self-tests`. `check:type-check-coverage` and `check:type-check-debt` exit 0 (the debt re-measure: every entry at its measurement). - **Build, tests and typecheck, under the verify lock** (VERDICT command-exit 0, held 225s, shared-box seconds), at `b69c176e9`: the workspace build (`turbo run build --filter='./packages/*' --filter='./packages/*/*' --concurrency=2`: 71 of 71 tasks, 17 cached), then `pnpm --filter @objectstack/driver-mongodb test`: 31 test files pass and 5 are skipped (36), 690 tests pass and 182 are skipped (872); the skips are the suites that need a `mongod` binary, which run only on opt-in. `pnpm --filter @objectstack/driver-mongodb typecheck` (`tsc --noEmit` and `check:test-typecheck` over `tsconfig.test.json`) exits 0. `tsc --listFilesOnly` puts all 36 tracked test files in `tsconfig.test.json`'s program, and each of the 9 changed `.ts` files in a program (the 3 non-test ones in both). No importing package owes a run: the declaration files change only in comment text. - **Lint, as a proven narrowing, at `b69c176e9`:** eslint with inline config disabled, over the 9 touched `.ts` files plus `dist/index.js` as the control and `tsconfig.test.json`: 11 results, 0 errors and 2 warnings, the control's ignore notice and 「no matching configuration」 for `tsconfig.test.json` (eslint's files patterns never name `.json`, so that file is outside its population); none of the 9 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 `ec390ec00`; by the time the worktree was cut, `main` had moved one commit (`37442d475`, a release-workflow fix touching none of this package, `check-issue-citations.mjs` or `dispatch-gates.mjs`), and the branch was cut there. The clone was shallow (two shallow roots, 1,215 commits reachable) and held none of the anchors, so it was unshallowed (`git fetch --unshallow origin main`, 15,634 commits) before any blame, ancestry or history reading. The branch merges `main` once, pinned to `54521f08c` (merge `b69c176e9`, no conflict, no deferred regeneration). The two commits it brought (`0721848b8`, `spec`; `54521f08c`, a QA checklist item) touch neither `packages/drivers/driver-mongodb`, `check-issue-citations.mjs` nor `dispatch-gates.mjs`; the workspace was rebuilt after the merge, before the tests and gates. The net diff against `main` is the 10 rewritten files (+23/−23) and the changeset (+15). - **The same dead numbers outside this package**, each left to its own carrier: `driver-mongodb`'s 3 test-string sites (above); `CHANGELOG.md` (release-owned). - **Wording only:** no line without a number was changed. --- _Generated by [Claude Code](https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5d0e4e2 commit f97660c

11 files changed

Lines changed: 38 additions & 23 deletions
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/driver-mongodb': patch
3+
---
4+
5+
Provenance comments in `@objectstack/driver-mongodb` 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. One of
11+
these docblocks sits on an exported member (`MongoDBDriver.update()`), so the reworded text appears in
12+
the published `index.d.ts` / `index.d.mts`; that docblock and one more comment esbuild keeps appear in
13+
the JavaScript output (`index.js` / `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-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

0 commit comments

Comments
 (0)