test(metadata-core,driver-mongodb): shipped case labels and mongod harness text state each case in words instead of a tracker number (stage 5b) - #21139
Conversation
…st-harness text state each case in words instead of a tracker number The shared engine case tables (delete / update dispatch, findOne predicate), the repository contract suite's serialized-form describe title, the object-schema FLS contract's `why` texts and driver-mongodb's mongod gate (skip reason, abandoned-download warning, acquisition timeout) cited tracker numbers where the case belonged. Each label that already stated its case loses only the citation; each that leaned on the number now says the rule. The two mongod gate pins assert the sentence that replaced the number. Ledger recomputed with --census-ledger: the six files leave it (32 occurrences), 653 -> 621 overall; no other row moves. Text only: no code, export, status or control flow changes. Claude-Session: https://claude.ai/code/session_01Ujdtvqs7ree7WyQmEDwEnG Co-authored-by: Claude <noreply@anthropic.com>
…patch) driver-mongodb carries no entry: its test-mongod.ts is not in the published dist (measured after build: the module's strings and its mongodSkipReason symbol answer 0 files under dist, the MongoDBDriver positive control 4). Claude-Session: https://claude.ai/code/session_01Ujdtvqs7ree7WyQmEDwEnG Co-authored-by: Claude <noreply@anthropic.com>
…age5b-test-strings
…age5b-test-strings
…age5b-test-strings
…age5b-test-strings
📓 Docs Drift Check9 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 9 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 e7a3ebb7991f1ded9e8be5cc2d77f6caf92156e2 && git checkout e7a3ebb7991f1ded9e8be5cc2d77f6caf92156e2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c6954d6d09080179d3af72c80a820c7c24cf6053 24b72b809951c2d3809c6619b6d73f8db4a96833 && git checkout -B drift-repro c6954d6d09080179d3af72c80a820c7c24cf6053 && git merge --no-ff 24b72b809951c2d3809c6619b6d73f8db4a96833
node scripts/docs-audit/affected-docs.mjs --json c6954d6d09080179d3af72c80a820c7c24cf6053 |
Fixes #20513
Clause-②: no
Stage 5b, the last stage of this lane under the maintainer's A / A ruling on the card (5902360492): the
src/-shipped test strings. These are the 28 literals (32 occurrences in 6 files) that PR #20924's body inventoried as stage 5b and release 5922539397 restates: shared case labels, a suite title, two contractwhytexts and the mongod test-harness text. After this PR thedomain:enginepackages hold zero rows inscripts/doc-authoring-prose-id.baseline.json. Text only: no errorcode, export, HTTP status, case value or control flow moves.What this does
Each label or harness line sent the reader to a tracker number for the reason behind it. In form D, as stages 1 to 5a applied it, the number goes. Where the sentence already stated the case, only the citation goes (17 literals). Where the sentence leaned on the number, it now says the case in words (11 literals):
driver-mongodbtest-mongod.tsskip reasondriver-mongodbtest-mongod.tsabandoned-download warningENGINE_DELETE_DISPATCH_CASES: where.id plus a CAS operator,multi: falseENGINE_FINDONE_PREDICATE_CASES: an emptywhereobjectENGINE_UPDATE_DISPATCH_CASES: payload id beside a DIFFERENT scalar where.id$inwhere.id, no multimulti: falseOBJECT_SCHEMA_MASK_CASESwrite-capable-caller/exemptwhymanage_metadata)"Citation only: the contract suite's
serialized-form identitygroup title; 3 delete, 2 findOne and 9 update labels; the empty-readable-setwhy; the mongod acquisition-timeout message. Each new clause was read against today's code:resolveEngineUpdateDispatch(the different-row refusal fires only on a truthy scalar where.id, the non-scalar refusal only on a declared non-scalar),ObjectQL.requireFindOnePredicate(absent, null and an empty object are read as match-every-row), andOBJECT_SCHEMA_WRITE_CAPABILITIES(manage_metadata, the key the D4 exemption is derived from).The
test-mongod.tsdocblock "Names the issue and the switch" now says "Names the reason and the switch", so it stays true. No other comment or docblock moves; code comments still cite ids, as in every earlier stage.Re-pins (H4). The two
#5517number pins inmongodb-memory-server-gate.test.tsnow assert the text that replaced the number: the skip line contains "retired from default test runs because concurrent downloads made green runs exit 1", and the guard's warning contains "download abandoned by a concurrent-download race". Neither pin was deleted. Both were proven able to fail (below).Ledger (
scripts/doc-authoring-prose-id.baseline.json)Recomputed with
node scripts/check-doc-authoring.mjs --census-ledger(exit 0: no growth refusal) and copied into place. The diff is 25 deleted lines, nothing added.drivers/driver-mongodb/src/test-mongod.tsmetadata-core/src/contract-suite.tsmetadata-core/src/engine-delete-dispatch.tsmetadata-core/src/engine-findone-predicate.tsmetadata-core/src/engine-update-dispatch.tsmetadata-core/src/object-schema-fls-contract.tsWhole ledger: files 175 → 169, pairs 441 → 428, occurrences 653 → 621. Gate pinned sites 549 → 521. No other file's row moves. After each of the four merges of
origin/main(below) the recomputed ledger was byte-identical to the committed one.Hypotheses, measured
origin/main9c8b65aa2the six files held exactly the inventory:#5517×3;#7856×1;#11009×4 (delete);#11767,#3896,#4346(findOne);#11009×6,#11142×4,#11230×4,#5748×4 (update);#3545,#6603,#7020(FLS). The gate's census listed 28 literals carrying 32 occurrences.packages/objectql,core,formula,metadata*,platform-objects,drivers/driver-*andplugins/plugin-pinyin-search(thedomain:enginepath set). The lane's ledger is empty. The whole ledger is not, so the gate's stale-baseline arm keeps its blindness floor.distexcluded). Each was found only in this stage's own source files (two delete labels have update twins), with two exceptions. The taildownload — #5517)also sits in a comment inmongodb-pipeline-evaluator.testkit.ts.serialized-form identity (#7856)also titles an independentdescribeinmetadata-core/test/canonicalize.test.ts, a test file outside the ledger. Both are left alone. No CI workflow,package.jsonscript, vitest config, snapshot or skip list carries the labels or a-tfilter on them. The cited numbers appear elsewhere only in workflow comments, an ADR anchor's invariant prose and a merge-parent sha. The labels reach other code only as test names: objectql'sengine-*-dispatch/engine-findone-predicateparity loops,service-queue'sit.each, andassertObjectSchemaMaskCase's failure text. Each label stays unique within its table (35 / 19 / 18).Changeset
.changeset/20513-metadata-core-case-labels-state-the-case.md:patchfor@objectstack/metadata-core. Its case tables ship indist/index.*, and the contract suite and FLS table ship indist/testing.js(measured after build: the new labels found in those files).There is no
@objectstack/driver-mongodbentry, becausetest-mongod.tsis not published. The package buildssrc/index.tsonly, and only test files importtest-mongod.ts. Measured after build:mongodSkipReason, "retired from default test runs", "concurrent-download race" and "waiting for the MongoDB binary" are each in 0 files underpackages/drivers/driver-mongodb/dist. The positive controlMongoDBDriveris in 4.Text-only proof
A TypeScript-AST skeleton of each changed
.tsfile compares merge base670680e93with head24b72b809. In the skeleton, every string literal and template text is one placeholder, pure-literal+operands collapse, and comments are never read. Result: 7 of 7 SAME, with token and literal-slot counts identical per file. Control: the same tool reports DIFF onrestimport-template.tsacross6f1f1c103, a real code change.Tests (head
24b72b809unless noted)turbo run buildover./packages/*and./packages/*/*under the verify lock, 71/71, after the last merge.@objectstack/metadata-core: 16 files / 298 tests passed;typecheckexit 0.@objectstack/driver-mongodb: 30 files passed and 5 skipped, 675 tests passed and 172 skipped (the skips need a MongoDB server);typecheckexit 0, includingcheck:test-typecheck.metadata-coredist:objectql, 7 files / 181 tests:engine-delete-dispatch,engine-update-dispatch,engine-findone-predicate,engine-update-by-id-payload-id,engine-update-multi-payload-id,engine-write-not-found-gateandvalidation/operator-object-write-value;service-queuedb-queue-adapter, 38;restmeta-object-fls, 95;runtimedomains/meta-object-fls, 85;metadata-fscontract, 31;metadata-protocolsys-metadata-repository.contractandprotocol.update-path-id-wins, 64.metadata-corethroughdist, so this shows they read the rebuilt build.2729901db), throughscripts/ablation-replace.mjsin WRAP mode (restore armed on EXIT/INT/TERM):mongodb-memory-server-gate.test.ts1 failed / 7 passed.22a95643c8), andgit diff HEADis empty. After both,git diff HEADwas 0 bytes andgit status --porcelain0 lines.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(no paths) at24b72b809derived 69 commands. All 69 ran one at a time from the worktree, each exit 0.--ranreports "69 derived, 69 run, 0 NOT-MEASURED, 0 UNRUN". Among them:check:doc-authoring: 521 pinned sites across 169 files, no growth, no burn-down unrecorded;check:driver-conformance: 50 covered cells, 0 DEBT, 0 exempt, the same reading as before the change;check:engine-double-contract,check:dual-build-cjs-loads(105 require entry points across 66 packages load, read from the post-merge build),check:nul-bytes,check:type-check-coverageandcheck:type-check-debt.After the first merge (
packages/specmoved on main):pnpm --filter @objectstack/spec check:generatedreported all 15 artifacts up to date.Narrowed lint:
eslint --no-inline-config --format jsonover the 7 changed.tsfiles reported 7 files, 0 errors and 0 warnings, none ignored (counts from eslint's JSON). The resolvedparserOptionsareecmaVersion: latest, sourceType: module, with noprojectorprojectService. So no type-aware rule runs, and this diff cannot move an untouched file's verdict. Repo-widepnpm lintis CI's.NOT MEASURED locally (CI's): the live MongoDB cells of
driver-mongodb, the Test Core shards, Dogfood, and the workspace type-check lanes.Acceptance notes
origin/mainwas merged four times while this was open (1d55ee66e,4f1c99822,4516a0643,24b72b809; the third brings in fix(objectql)!: a per-aggregation filter refuses a scalar comparison on a declared JSON-stored field, in where's words #21097). None of the incoming commits touches a file this PR changes. They touchobjectql,rest,runtimeandmetadata-protocol, so those consumer suites were re-run at the final head.mainmoved again after the gate union; the queue rebuilds on it.driver-mongodb's filter and temporal suites, landed before the first merge and shares no file with this PR.metadata-core/test/canonicalize.test.tstitles its owndescribeserialized-form identity (#7856), andmongodb-memory-server-gate.test.tstitles twodescribeblocks[#5517] …. Both are*.test.tsfiles, which the ruling's third category (src/-shipped test strings) and the ledger do not cover. They are left as they are: noted, not filed.domain:specpackages carry tracker numbers (spec175 andlint83 messages): this lane's share of the #20513 A/A burn-down #20749, runtime strings in thedomain:servicespackages carry tracker numbers (168 messages in 17 packages, 263 ledgered ids): this lane's share of the #20513 A/A burn-down #20751 and runtime strings in thedomain:clipackages carry tracker numbers (114 messages in 8 packages, 254 ledgered ids): this lane's share of the #20513 A/A burn-down #20753 carryBlocked-by:lines naming this card. They unlock when it leaves the open state on merge.Generated by Claude Code