Skip to content

test(spec): the transactions tombstone pin discriminates its own subject - #19078

Merged
os-bill merged 1 commit into
mainfrom
claude/issue-18996-transactions-pin-discriminates
Sep 18, 2026
Merged

os-bill merged 1 commit into
mainfrom
claude/issue-18996-transactions-pin-discriminates

Conversation

@os-bill

@os-bill os-bill commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Fixes #18996

Clause-②: no

What was wrong

packages/spec/src/data/driver.test.ts pinned the transactions retired-key prescription with a regex that required only that METHOD PRESENCE and beginTransaction appear somewhere in the thrown message:

DriverCapabilities\.transactions.*removed.*METHOD PRESENCE.*beginTransaction.*Delete the key

PR #18890 rewrote that prescription's opening from "Transaction use is gated on METHOD PRESENCE — driver.beginTransaction …" to "Transaction use is gated on the DRIVER'S DECLARATION, no longer on METHOD PRESENCE alone: engine.transaction() asks driverSupportsTransactions(driver) …". The old regex matches both, so reverting the prescription to the now-false sentence kept this test green: the pin could not fail on the one shape it exists to catch. Its title — "points at method presence" — was in the old world too.

The shipped prose is true today; what was missing is the guard that keeps it that way. This is coverage debt, not a contract defect.

What changed

One regex and one title, in one test file. The new anchor is the pair of things #18890 made load-bearing — the negation (no longer on METHOD PRESENCE) and the predicate that replaced presence (driverSupportsTransactions):

DriverCapabilities\.transactions.*removed.*no longer on METHOD PRESENCE.*driverSupportsTransactions.*beginTransaction.*Delete the key

beginTransaction and Delete the key stay, so nothing the old pin covered is dropped.

The card suggested anchoring on DECLARATION; both discriminate on the tree measured below, and the negation was chosen because it is the literal contradiction of the false claim — a future sentence cannot say "gated on METHOD PRESENCE" and "no longer on METHOD PRESENCE" at once, whereas a bare mention of a declaration can coexist with a presence-gated claim.

⛔ Deliberately not a ban on the phrase. driver.zod.ts carries a second "gated on METHOD PRESENCE" sentence, for schemaSync, and that one is true of the runtime today. It is untouched, and so is driver.zod.ts as a whole — this PR's diff is one .test.ts file.

Evidence — the acceptance leg is an ablation, not "the new pin passes"

1. Ablation (decisive). node scripts/ablation-replace.mjs in WRAP mode over packages/spec/src/data/driver.zod.ts: the prescription's opening clause was replaced with the verbatim pre-#18890 false sentence, read out of history at 5ba2ec3ca4^:packages/spec/src/data/driver.zod.ts:266-267, with the rest of the prescription left intact.

  • mutation landed, proven on disk, not by an exit code: anchor 1 -> 0, replacement 0 -> 1, blob 46daf837a26a -> 9268d7835908
  • the new pin on that false tree: REDTests 1 failed | 57 passed (58), the failing case being the one under repair
  • restore proven byte-for-byte: blob back to 46daf837a26a, equal to the path's blob at HEAD, git diff HEAD empty
  • the new pin on the restored tree: GREENTests 58 passed (58)

2. Lit control — the defect itself, measured first-hand, on that same false tree. A probe that reads the thrown message and applies both regexes reported:

PROBE_REGEX_IN_SYNC_WITH_TEST_FILE: true
PRESCRIPTION_OPENING: Transaction use is gated on METHOD PRESENCE — `driver.beginTransaction` (`engine.transaction()`, ADR-0034 ambient transactions). …
OLD_REGEX_MATCHES: true
NEW_REGEX_MATCHES: false

The OLD pin stays green on a tree whose prescription is false. That is the blindness this card names, reproduced here rather than quoted.

3. Dark control — the trap. driver.test.ts: 58 passed before, 58 passed after. driver.zod.ts is byte-identical to the base (git hash-object = 46daf837a26a… = its blob at 0ec81857aa), so schemaSync's true sentence cannot have moved. One honest qualification: the transactionsUnsupported.*NOT this key restored assertion lives in the same it() block, so on the false tree it was NOT MEASURED — vitest aborts a case at its first failed assertion. It is green on the restored tree, inside the 58.

Verification

leg result
pnpm --filter @objectstack/spec test Test Files 491 passed (491), Tests 14299 passed (14299)
pnpm --filter @objectstack/spec typecheck exit 0 (tsc --noEmit + check:scripts-typecheck + check:test-typecheck)
derived gate families node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack → 76 commands; 72 exit 0, 4 exit 3
gate reconciliation --ran with exit codes recorded: 76 derived, 72 run, 4 NOT-MEASURED, 0 UNRUN
repo-wide lint eslint . --no-inline-config exit 0 over 6866 files, 0 errors / 0 warnings, at bada58f3c2

The four exit-3 gates each print PREREQUISITE NOT MET … nothing was measured — they read built output of packages this diff does not touch and need a full monorepo build: check:doc-formula-expressions, check:dual-build-cjs-loads, check:lean-entry-closure, check:type-check-debt. Not findings, not passes. CI builds fresh and runs them.

No narrowing is claimed for lint: the population above is the whole repo, run at the final commit of this branch.

Changeset — skip-changeset measured, not assumed

npm pack --dry-run --json in packages/spec at this commit lists 2039 files. Positive control src/data/driver.zod.ts is present; src/data/driver.test.ts is absent, and zero .test.ts files ship at all (files[] publishes src/**/*.zod.ts, never *.test.ts). Nothing any released package actually ships moves, so this diff publishes nothing. Clause-②: no.

Acceptance notes

  • The generic it.each(RETIRED_BITS) pin in the same block asserts only DriverCapabilities.BITremovedDelete the key (the bit name interpolated per case). That is weak by design — it pins that each tombstone exists and prescribes, not what any one sentence claims — so it is not a second instance of this defect. Noted, not filed.
  • The other two hand-written prescriptions in that block (streaming, queryFilters) anchor on content distinctive to their current sentences, and neither sentence has been rewritten. Noted, not filed.

Generated by Claude Code

`packages/spec/src/data/driver.test.ts` pinned the `transactions` retired-key
prescription with a regex requiring only that `METHOD PRESENCE` and
`beginTransaction` appear somewhere in the thrown message. #18890 rewrote that
prescription's opening from "gated on METHOD PRESENCE" to "gated on the
DRIVER'S DECLARATION, no longer on METHOD PRESENCE alone" — and the old regex
matches BOTH. Reverting the prescription to the now-false sentence kept the
test green, so the pin could not fail on the one shape it exists to catch. The
title said "points at method presence", which is the old world too.

Anchor on the two things #18890 made load-bearing instead: the negation
(`no longer on METHOD PRESENCE`) and the predicate that replaced presence
(`driverSupportsTransactions`). `beginTransaction` and `Delete the key` stay,
so nothing the old pin covered is dropped.

Deliberately NOT a ban on the phrase `METHOD PRESENCE`: `schemaSync`'s own
"Schema sync is gated on METHOD PRESENCE" sentence in driver.zod.ts is true of
the runtime today and is untouched.

Test-only. No runtime file, no published surface.

Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3
Co-authored-by: Claude <noreply@anthropic.com>
@os-bill os-bill added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 18, 2026 — with Claude
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs.

What this run could not see
  • 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.

Coarse fallback — 0 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 176b03582e600ee5628d21bff9422073c5a5530cpackageMentionDocs.

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

Labels

protocol:data size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] the transactions tombstone pin matches BOTH the true prescription and the false one it replaced, so it no longer discriminates its own subject

2 participants