docs(driver-mongodb): re-anchor the dead tracker citations to the commits that decided them (stage 11 of #20595) - #21617
Conversation
…mits 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>
… comments The rewritten MongoDBDriver.update() docblock reaches index.d.ts, index.d.mts, index.js and index.mjs, and one more rewritten comment reaches the JavaScript output, so the published text changes. Claude-Session: https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi Co-authored-by: Claude <noreply@anthropic.com>
…tations Claude-Session: https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ae9d877cf2277f4d72c5fff1397095df1d7cab39 && git checkout ae9d877cf2277f4d72c5fff1397095df1d7cab39
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 83b3d32020a12f28e8dc8e71d5bbcc5769017b33 b69c176e95e57240663127c34a13aa9d969f2f57 && git checkout -B drift-repro 83b3d32020a12f28e8dc8e71d5bbcc5769017b33 && git merge --no-ff b69c176e95e57240663127c34a13aa9d969f2f57
node scripts/docs-audit/affected-docs.mjs --json 83b3d32020a12f28e8dc8e71d5bbcc5769017b33
|
Part of #20595
Clause-②: no
What changed
Stage 11 of the
domain:enginelane of the dead-citation sweep:packages/drivers/driver-mongodb/**, comment and docblock prose only, per the claim (5971485908). Stages 1 to 10 landed asa7d9768ec,d150c3039,4bf4e7e70,13a24ece2,db0cf2231,85986144c,48fa7a381,c205b6c35,c98a72d69andfd5a1cd59. #20595 stays open: the other half of this lane is the packages this stage does not touch (formula4 andmetadata-fs2 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
5749154545on #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:src/): the wholeallocated-but-absentpopulation of the gate's own census in this package at the base;src(avgover a boolean field returnsnullon driver-memory and a number on sqlite — same rows, same dataset, same executor #11065, $exists still reads KEY-PRESENCE rather than has-value on driver-memory's live mingo path and driver-mongodb — the #5499 freeze that excused it dissolved, #13166 explicitly excludes it, so it is now unexcused AND untracked #13195, [finding]MongoDBDriver.update()andRemoteTransport.update()fabricate a record for a missing id — a third posture that becomes a semantic violation onceIDataDriver.update()declaresnull(#13878 ruling item 5) #14428) and 2 the census never judges in this package (feat(spec): declare the not-found arm on IDataDriver.update() and un-mask driver-memory's published update/upsert types #14434, and [finding]driver-mongodb's owntypecheckis blind to its 30 test files — the only program compiling them is the TEST_DEBT ratchet, which reports a number rather than a pass #14917, which also stands ontsconfig.test.json), which the board and a single read each settle;//comment lines oftsconfig.test.json(:1[finding]driver-mongodb's owntypecheckis blind to its 30 test files — the only program compiling them is the TEST_DEBT ratchet, which reports a number rather than a pass #14917,:3[finding]@objectstack/coredeclares notypecheckscript, so no CI job ever type-checks it — and its own tsconfig program is currently red #14613,:25fix(drivers):update()on a missing id answersnullon MongoDB and Turso's remote face #14914), stage 8's precedent for the same file shape inpackages/core.vitest.config.ts,tsconfig.json,package.json,README.mdandLICENSEcite no dead number;mongodb-11151-boolean-aggregand-answers.test.ts:13named comment5448627494on [finding]AGGREGATION_ROWShas no boolean column, so the cross-driver aggregation conformance family cannot see a boolean aggregand on any face #11152, which answers 404 although [finding]AGGREGATION_ROWShas no boolean column, so the cross-driver aggregation conformance family cannot see a boolean aggregand on any face #11152 itself resolves (the card reports 24 comments and serves 16). Stage 4 rewrote the same id indriver-sqlas 「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 ofca3fd4b1aare 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 ontsconfig.test.json, each already on its line and each answering 200).A
patchchangeset: 2 of the 9 rewritten non-test lines are in the publisheddist(theMongoDBDriver.update()docblock in the.d.tsand the JavaScript, and one//line esbuild keeps), anddistis 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 --jsonat base37442d475(the before run below),allocated-but-absentper remainingdomain:enginepackage:drivers/driver-mongodbformulametadata-fsdrivers/driver-turso,metadata-core,core,metadata-protocol,objectql,metadata,drivers/driver-sql,drivers/driver-memory,drivers/driver-sqlite-wasm,plugins/plugin-pinyin-search,platform-objectsThe lane total goes 15 to 6.
driver-mongodbreads 9, as at stage 10's head census (e89bd10cd), so the stage went ahead.Census:
driver-mongodb, before and afterInstrument (A1). The gate's own
node scripts/check-issue-citations.mjs --census --json, read-only and unchanged. The count is itsallocated-but-absentfindings underpackages/drivers/driver-mongodb/.allocated-but-absent37442d475, run 17:13:20Z to 17:16:55Zee337fc39, run 17:27:02Z to 17:30:28ZThe 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) andcross-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 headb69c176e9(17:44:02Z to 17:47:23Z, 195 pages, frontier #21615, 19,436 records, newest #21615 before and after): whole-repo 119,driver-mongodb0, 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 exportedextractCitations(whole-file and comment-prose projections) over every tracked file in the package (53) and classifies each citation with the gate'sclassifyCitationagainst one board enumerated by the gate'senumerateBoard(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.tsconfig.test.json37442d475ee337fc39The 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.mdaside) counts 700 before and 678 after: also a drop of 22.Comment ids. Every ten-digit run under
packages/drivers/driver-mongodb(itsCHANGELOG.mdaside) was read: five lines, four ids.5448627494answers 404 and is rewritten;5861435168and5865693155(ruling records on #20311 and #20399,mongodb-filter.ts:696to:697,mongodb-20444-empty-operator.test.ts:6) and5186668033(mongodb-filter.ts:807) answer 200; the control5971485908, the claim, answers 200. After the rewrite the package carries four ten-digit lines, all live. Noissuecommentordiscussion_rlink stands in the package (grep exit 1; the same grep finds them inpackages/runtimeandpackages/spec).Per-number table
srccounts census sites,testthe test-comment sites,cfgthetsconfig.test.jsoncomment lines. Every sha matches exactly one commit (git rev-parse --disambiguate, count 1), is an ancestor of the base37442d475and oforigin/main54521f08c(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 for20950404c, #14428 forca3fd4b1a, the comment id forf6fa22ce1), and 2 in the message alone (#14434 for93940d492, in the subject's squash suffix; #14914 forca3fd4b1a, 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 blameat 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 (c4ecf0c49citing #11065 three times;df1812050citing #13195 five times;9268aec56, which createdmongodb-exists-has-value-translation.test.tsas a measurement before the ruling, citing #13195 once;ca3fd4b1aciting #14434 and #14917;a06faebbeciting #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.sourcesays whether an earlier stage already used this anchor for this number (reused) or it was measured here (measured).#1106520950404cdriver-memorycounts a boolean aggregand as 1/0 inavgandsumon both its faces; it wrotenumericAggregandExprinmemory-analytics.ts, the expressionmongodb-aggregation.ts:657says it reproduces (the squash of PR #11153; its diff names #11065 7 times)#131959dac1ae01$existsmeans HAS A VALUE on the live mingo path, the analytics face andtranslateFilter; it wrote the_presenceAndguard for$existsalone, the[#13195] Value-independentcomment and the note that the same clobber was reachable through$nulland$between, the three things themongodb-filter.tssites credit to the number (the squash of PR #13529)#14428ca3fd4b1aupdate()on a missing id answersnullon MongoDB and Turso's remote face; it wrote theMongoDBDriver.update()docblock and createdmongodb-update-missing-id.test.ts#1443493940d492IDataDriver.update()(that pull request's squash); stage 10's 「Since #13878 (commit 93940d4)」 for the twin sentence#14917a06faebbe#5286sibling route; it created this package'stsconfig.test.jsonand graduated theTEST_DEBTentry (the squash of PR #15465)#1461381208086a@objectstack/coredeclares a typecheck script and its test layer enters the ratchet through atsconfig.test.jsonsibling; stage 8 used it for the identical sentence inpackages/core#14914ca3fd4b1aupdate()declaration introduced and the type-check debt ratchet catching them (10 to 13), the eventtsconfig.test.json:25describes5448627494f6fa22ce1min/maxon every face; its message records the 2026-08-28 maintainer ruling (option A, superseding #11249'sfalse/true), its diff names the id 3 times, and it wrote the lineNo 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'stocommit SHA's, stage 1's form). These say more than the tag:mongodb-11151-boolean-aggregand-answers.test.ts:13), stage 4's wording for the same id and the same sentence indriver-sql, verbatim. The quoted ruling 「12745 A回,其他同意。」 on the next line is untouched.update()on a missing id answersnullon MongoDB and Turso's remote face #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 (「[spec] IDataDriver 的 query 参数要求QueryAST.object与第一实参重复 —— 下游被迫as any(20 处实测),提议 Omit/optional 化 #5181 (PR refactor(spec)!: IDataDriver 的 query 参数改为 DriverQuery,对象名只写一遍 (#5181) #6076)」 to 「[spec] IDataDriver 的 query 参数要求QueryAST.object与第一实参重复 —— 下游被迫as any(20 处实测),提议 Omit/optional 化 #5181 (commit 6513c17)」). The alternative, if the possessive reads wrong: 「caught, in the change commit ca3fd4b landed, its」, one line, no reflow.driver-mongodb's owntypecheckis blind to its 30 test files — the only program compiling them is the TEST_DEBT ratchet, which reports a number rather than a pass #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.mongodb-exists-has-value-translation.test.ts:4was written by9268aec56, the measurement that pinned the divergence while 「the direction stays undecided」;9dac1ae01inverted the file in place onto the ruled answer. The header now opens 「[commit 9dac1ae]」, stage 5's anchor for the twin header indriver-memory'smemory-exists-has-value-faces.test.ts.$existsalone」 (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」.eslint.config.mjsdeclares no line-length rule, and a reflow would move neighbouring lines and every line citation into the file).Sites left
describetitles atmongodb-exists-has-value-translation.test.ts:138($exists still reads KEY-PRESENCE rather than has-value on driver-memory's live mingo path and driver-mongodb — the #5499 freeze that excused it dissolved, #13166 explicitly excludes it, so it is now unexcused AND untracked #13195) andmongodb-update-missing-id.test.ts:150([finding]MongoDBDriver.update()andRemoteTransport.update()fabricate a record for a missing id — a third posture that becomes a semantic violation onceIDataDriver.update()declaresnull(#13878 ruling item 5) #14428), and theittitle atmongodb-operator-key-clobber.test.ts:227($exists still reads KEY-PRESENCE rather than has-value on driver-memory's live mingo path and driver-mongodb — the #5499 freeze that excused it dissolved, #13166 explicitly excludes it, so it is now unexcused AND untracked #13195). Both numbers are in this stage's table. Strings are outside this stage's surface; non-test strings cite none.src: the release-ownedCHANGELOG.mdnames dead numbers on 11 sites (7 numbers); left.Mechanical guard: no code token moves
The guard compares base
37442d475against 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):forEachChildwalk. Comments are trivia there, and JSDoc is never visited. A leaf that is not itself a token is re-scanned with trivia skipped.getChildrenwalk, JSDoc nodes skipped. String, template and numeric literals are compared in full on both readings.tsconfig.test.json: reading 2 overts.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):mongodb-filter.ts) and 「it is the BUILD」 to 「it is the BUILd」 (tsconfig.test.json): 0 files changed (exit 0 each).export class MongoDBDrivertoXMongoDBDriver,mongodb-driver.ts): DIFFER on both readings (exit 1).describetitle 「… on a missing id」 to 「… on a missing iD」,mongodb-update-missing-id.test.ts): DIFFER on both readings (exit 1).input:followed by the$${field}template, to$${field}x,mongodb-aggregation.ts): DIFFER on both readings (exit 1).$lte: 100to101,mongodb-filter.test.ts): DIFFER on both readings (exit 1)."lib": ["ES2022"]toES2023,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 fromHEAD. Each restore was proven equal to itsHEADblob (2c4ba4f8babb,aebae4859583,48ffb45e011f,4f12e29dbbce,581fa7ca2401,162a1f72bae6), withgit diff HEADempty and a clean tree afterwards.Changeset:
patch(distmeasured)files[]isdist,README.mdandCHANGELOG.md, and the package is not private. In one script under the shared verify lock (VERDICT command-exit 0, held 164s, shared-box seconds), atee337fc39: the dependency closure was built first (pnpm --filter '@objectstack/driver-mongodb^...' build, exit 0), then the package's ownbuild(tsup andcheck-dts-emitted) ran three times, exit 0 each:distfiles hashed (index.js,index.mjs, their sourcemaps,index.d.ts,index.d.mts). 2 of the 9 rewritten non-test lines appear verbatim indist: theMongoDBDriver.update()docblock line (mongodb-driver.ts:432) in all four ofindex.js,index.mjs,index.d.tsandindex.d.mts, and the// [commit 9dac1ae01] Value-independentline (mongodb-filter.ts:1265) inindex.jsandindex.mjs. The other 7 sit in comments the build drops.index.d.ts,index.d.mts,index.js,index.mjs); the two sourcemaps do not.scripts/ablation-dist-preflight.mjsfinds the base marker 「[[finding]MongoDBDriver.update()andRemoteTransport.update()fabricate a record for a missing id — a third posture that becomes a semantic violation onceIDataDriver.update()declaresnull(#13878 ruling item 5) #14428] A miss answers」 in those 4 built files (exit 0).HEADblob,git diff HEADempty, porcelain empty): all 6 files are byte-identical to leg 1, and the preflight's--absentreading 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.mddeclares apatchfor@objectstack/driver-mongodb, comment text only, with the claim'sClause-②: noline. 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 underpackages/drivers/driver-mongodb.Gates (head
b69c176e9)Derived gates:
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commandsatb69c176e9(11 paths against merge base54521f08c) 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.--ranreports 「62 derived, 62 run, 0 NOT-MEASURED, 0 UNRUN」 (a derived zero) and exits 0. The PM's lead derivation (48 commands, treeec390ec00, 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-censusand two release self-tests),check:type-check-coverageandcheck:type-check-debt(thetsconfig.test.jsonpath), 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.mjsexits 0 (「no issue citations added against 54521f0」: the+lines in the 3 non-test source files carry no number);pnpm check:issue-citationsexits 0 (its self-test);pnpm check:doc-authoringexits 0 (the sibling-package prose-id baseline holds, no growth);pnpm check:nul-bytesexits 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(「nomajorbump」; its Clause-② level axis reads the pull request body, so it is not applicable to a local run and is CI's reading), andcheck:changeset-gate-self-tests.check:type-check-coverageandcheck:type-check-debtexit 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), thenpnpm --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 amongodbinary, which run only on opt-in.pnpm --filter @objectstack/driver-mongodb typecheck(tsc --noEmitandcheck:test-typecheckovertsconfig.test.json) exits 0.tsc --listFilesOnlyputs all 36 tracked test files intsconfig.test.json's program, and each of the 9 changed.tsfiles 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.tsfiles plusdist/index.jsas the control andtsconfig.test.json: 11 results, 0 errors and 2 warnings, the control's ignore notice and 「no matching configuration」 fortsconfig.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.mjsnever 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-widepnpm lintis CI's run.Acceptance notes
origin/mainatec390ec00; by the time the worktree was cut,mainhad moved one commit (37442d475, a release-workflow fix touching none of this package,check-issue-citations.mjsordispatch-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 mergesmainonce, pinned to54521f08c(mergeb69c176e9, no conflict, no deferred regeneration). The two commits it brought (0721848b8,spec;54521f08c, a QA checklist item) touch neitherpackages/drivers/driver-mongodb,check-issue-citations.mjsnordispatch-gates.mjs; the workspace was rebuilt after the merge, before the tests and gates. The net diff againstmainis the 10 rewritten files (+23/−23) and the changeset (+15).driver-mongodb's 3 test-string sites (above);CHANGELOG.md(release-owned).Generated by Claude Code