Skip to content

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

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-20513-stage5b-test-strings
Oct 1, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-20513-stage5b-test-strings

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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 contract why texts and the mongod test-harness text. After this PR the domain:engine packages hold zero rows in scripts/doc-authoring-prose-id.baseline.json. Text only: no error code, 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):

Where Cited The text now says
driver-mongodb test-mongod.ts skip reason 5517 "retired from default test runs because concurrent downloads made green runs exit 1"
driver-mongodb test-mongod.ts abandoned-download warning 5517 "Ignoring the MongoDB binary download abandoned by a concurrent-download race"
ENGINE_DELETE_DISPATCH_CASES: where.id plus a CAS operator, multi: false 11009 "refused, the by-id path would drop the CAS guard"
ENGINE_FINDONE_PREDICATE_CASES: an empty where object 3896 "read as match-every-row, so NOT a predicate"
ENGINE_UPDATE_DISPATCH_CASES: payload id beside a DIFFERENT scalar where.id 11142, 5748 "refused; the payload id no longer silently wins over a where.id naming another row"
same table: payload id beside an $in where.id, no multi 11230 "refused; the by-id write would silently drop the declared row SET"
same table: payload id beside a NULL where.id 11230 "refused; a declared where.id that is not one primary key is never silently dropped"
same table: payload id beside a FALSY scalar where.id 11142, 11230 "(it is a scalar, so neither the different-row nor the non-scalar refusal applies)"
same table: where.id plus a CAS operator, multi: false 11009 "the redeliver shape, refused rather than dropping its CAS guard"
same table: payload id plus an extra where predicate, no multi 11009 "refused; the by-id write would silently drop the predicate, through the payload door"
OBJECT_SCHEMA_MASK_CASES write-capable-caller/exempt why 7020, 6603 "D4 is DERIVED from the schema write gate (manage_metadata)"

Citation only: the contract suite's serialized-form identity group title; 3 delete, 2 findOne and 9 update labels; the empty-readable-set why; 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), and OBJECT_SCHEMA_WRITE_CAPABILITIES (manage_metadata, the key the D4 exemption is derived from).

The test-mongod.ts docblock "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 #5517 number pins in mongodb-memory-server-gate.test.ts now 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.

File Before After
drivers/driver-mongodb/src/test-mongod.ts 3 0
metadata-core/src/contract-suite.ts 1 0
metadata-core/src/engine-delete-dispatch.ts 4 0
metadata-core/src/engine-findone-predicate.ts 3 0
metadata-core/src/engine-update-dispatch.ts 18 0
metadata-core/src/object-schema-fls-contract.ts 3 0
This stage 32 in 6 files 0

Whole 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

  • H1, held. At origin/main 9c8b65aa2 the 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.
  • H2, held. The recomputed ledger has 0 rows under packages/objectql, core, formula, metadata*, platform-objects, drivers/driver-* and plugins/plugin-pinyin-search (the domain:engine path set). The lane's ledger is empty. The whole ledger is not, so the gate's stale-baseline arm keeps its blindness floor.
  • H3, nothing keys on the old labels. Each of the 28 old literals was searched byte for byte across the repo (dist excluded). Each was found only in this stage's own source files (two delete labels have update twins), with two exceptions. The tail download — #5517) also sits in a comment in mongodb-pipeline-evaluator.testkit.ts. serialized-form identity (#7856) also titles an independent describe in metadata-core/test/canonicalize.test.ts, a test file outside the ledger. Both are left alone. No CI workflow, package.json script, vitest config, snapshot or skip list carries the labels or a -t filter 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's engine-*-dispatch / engine-findone-predicate parity loops, service-queue's it.each, and assertObjectSchemaMaskCase's failure text. Each label stays unique within its table (35 / 19 / 18).
  • H4, held. See Re-pins.

Changeset

.changeset/20513-metadata-core-case-labels-state-the-case.md: patch for @objectstack/metadata-core. Its case tables ship in dist/index.*, and the contract suite and FLS table ship in dist/testing.js (measured after build: the new labels found in those files).

There is no @objectstack/driver-mongodb entry, because test-mongod.ts is not published. The package builds src/index.ts only, and only test files import test-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 under packages/drivers/driver-mongodb/dist. The positive control MongoDBDriver is in 4.

Text-only proof

A TypeScript-AST skeleton of each changed .ts file compares merge base 670680e93 with head 24b72b809. 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 on rest import-template.ts across 6f1f1c103, a real code change.

Tests (head 24b72b809 unless noted)

  • Build: turbo run build over ./packages/* and ./packages/*/* under the verify lock, 71/71, after the last merge.
  • @objectstack/metadata-core: 16 files / 298 tests passed; typecheck exit 0.
  • @objectstack/driver-mongodb: 30 files passed and 5 skipped, 675 tests passed and 172 skipped (the skips need a MongoDB server); typecheck exit 0, including check:test-typecheck.
  • Consumers of the case tables, against the rebuilt metadata-core dist:
    • 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-gate and validation/operator-object-write-value;
    • service-queue db-queue-adapter, 38;
    • rest meta-object-fls, 95;
    • runtime domains/meta-object-fls, 85;
    • metadata-fs contract, 31;
    • metadata-protocol sys-metadata-repository.contract and protocol.update-path-id-wins, 64.
    • A verbose run before the merges showed the parity loops naming the new labels. objectql's tests resolve metadata-core through dist, so this shows they read the rebuilt build.
  • Re-pin mutations, one-off, on the committed head (2729901db), through scripts/ablation-replace.mjs in WRAP mode (restore armed on EXIT/INT/TERM):
    • Skip-reason anchor ×1 → ×0: mongodb-memory-server-gate.test.ts 1 failed / 7 passed.
    • Warning anchor ×1 → ×0: 1 failed / 7 passed.
    • Each restore: blob equals HEAD's (22a95643c8), and git diff HEAD is empty. After both, git diff HEAD was 0 bytes and git status --porcelain 0 lines.

Gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack (no paths) at 24b72b809 derived 69 commands. All 69 ran one at a time from the worktree, each exit 0. --ran reports "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-coverage and check:type-check-debt.

After the first merge (packages/spec moved on main): pnpm --filter @objectstack/spec check:generated reported all 15 artifacts up to date.

Narrowed lint: eslint --no-inline-config --format json over the 7 changed .ts files reported 7 files, 0 errors and 0 warnings, none ignored (counts from eslint's JSON). The resolved parserOptions are ecmaVersion: latest, sourceType: module, with no project or projectService. So no type-aware rule runs, and this diff cannot move an untouched file's verdict. Repo-wide pnpm lint is 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


Generated by Claude Code

claude added 6 commits October 1, 2026 07:39
…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>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

9 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
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 9 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json c6954d6d09080179d3af72c80a820c7c24cf6053 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from e7a3ebb7991f1ded9e8be5cc2d77f6caf92156e2 — the merge of head 24b72b809951c2d3809c6619b6d73f8db4a96833 into base c6954d6d09080179d3af72c80a820c7c24cf6053, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

2 participants