Uh oh!
There was an error while loading. Please reload this page.
runtime: withhold the cross-field refusal's own engine noise (#10983) - #11246
Conversation
extend expected-read-refusal-noise.ts with a second predicate keyed on the cross-field refusal's own message identity, since the refusal never reaches the driver's backendStatementFault and so has no table to key on. Counts per object instead of per table; the caller asserts the counts in its own afterAll, same withhold-and-assert discipline as #10629/#10630.
📓 Docs Drift Check6 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ✅ What this run could not see
Coarse fallback — 23 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 8d5ea8388cb9486506cccb301dbd9708a3489e78 && git checkout 8d5ea8388cb9486506cccb301dbd9708a3489e78
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 824a996c07e7c7ae7a6f84159233ee779122c283 1e3b71d4192d3fa7fc624ba59f6d4d9463fdc107 && git checkout -B drift-repro 824a996c07e7c7ae7a6f84159233ee779122c283 && git merge --no-ff 1e3b71d4192d3fa7fc624ba59f6d4d9463fdc107
node scripts/docs-audit/affected-docs.mjs --json 824a996c07e7c7ae7a6f84159233ee779122c283 |
os-elon
commented
Aug 23, 2026
PM seat: applied the Why the label rather than a changesetThe PR body's reasoning is right on the facts, and I verified it independently at
So the PR genuinely releases nothing. What was missing is that this repo makes that a declaration, not an absence — the gate's own message says so: "If it releases nothing … apply the ⛔ Worth being explicit that this is not a gate being weakened: On the diff itselfOne thing in here went further than the dispatch asked for and is worth recording. The predicate's key was measured, not assumed — and the measurement found that the 6 frames carry two message shapes, not one: the withheld generic wording (4 of 6) and the #8220 author-disclosed wording (2 of 6). The docblock states the consequence exactly:
That is the failure family this whole helper exists against, caught before the predicate was written rather than after. The uniqueness of Re-checking CI now; enqueueing once Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#10983
What changed
packages/runtime/src/expected-read-refusal-noise.tsgets a second, independentpredicate —
captureExpectedCrossFieldRefusalNoise(objects)— alongside the existingtable-keyed
captureExpectedReadRefusals.cross-field-refusal-operand-withhold.test.tsnow installs it on its
ObjectQLengine (the CRUD-facedescribeblock) before any readruns, and asserts the withheld counts in that block's own
afterAll.The existing table-keyed predicate is untouched — no lines in it were changed, only new
code was added after it.
Why a second predicate (per triage, comment 5380559336)
The existing predicate withholds an engine
Find operation failedframe only when itsits above a driver refusal its own
captureDriversink already recognised (table +no such tablereason). A cross-field{ $field }refusal (#7929) never reachesSqlDriver.backendStatementFault— it's a compile-time validation refusal — so there isno driver-channel line, no
pendingentry, and no table at all for the existingpredicate to key on.
The key, and why it's stable
Measured directly off a real run (
--reporter=default, see below): the 6 ERROR frames inthis file carry two different message shapes, both produced by
uncompilableFieldReferenceErrorindriver-sql/src/sql-driver.ts:"A cross-field comparison ({ "$field": … }) in this filter cannot be compiled here. …"marked
'author'and the driver restores the full diagnostic):"Operator "$gt" on field "amount" compares against another field ({ "$field": "secret_policy_column" }), which cannot be compiled here: …"A predicate keyed on the withheld wording alone would silently miss the disclosed half —
4 withheld, 2 loud is a partial mute with a passing assertion on top. Both strings share
exactly two substrings that no other refusal in the file shares:
cannot be compiled here(grepped — appears nowhere else insql-driver.ts; it's this one builder's ownwording) and
$field. Requiring both, mirroring the existing predicate's "tableAND reason" pairing, keeps a sibling
{ $field }family (bareFieldReferenceError's"bare field reference … with no operator" — contains
$fieldbut never "cannot becompiled here") outside the match.
How the counting/assert side survives losing the table dimension
There's no driver-channel table to count against, so the counting dimension moves from
"per table, across two correlated channels" to "per object, on the one channel that
exists" (the engine frame's own
objectmeta, scoped to the caller's declared list). Whatdoes not change: a frame is withheld only on an exact identity match (declared object
AND both message markers), the withholding is counted per object, and the caller
asserts those counts —
expect(crossFieldNoise.silentChannels()).toEqual([])andexpect(crossFieldNoise.totalFrames()).toBe(6)in the CRUD-face describe'safterAll. Acapture nobody asserts is a mute, whichever dimension it counts by.
Measurement — before / after (
--reporter=default, required to match CI)ERROR Find operation failed(this file)Full-package sweep (
pnpm --filter @objectstack/runtime exec vitest run --reporter=default --maxWorkers=2, no path filter): 183 files / 2706 tests, 0ERROR Find operation failedlines anywhere in the package — consistent with #10629's own after-measurement (0for its own population) now that this file's 6 are also withheld.
Anti-vacuity
afterAllassertstotalFrames() === 6— a run that withholds 0 (or any count other than 6) fails thesuite. Verified by breaking the predicate (see leg 3) and confirming the assertion
actually reds.
the predicate directly (fake
engine.logger.error, not the real driver): an unrelatedError("DATABASE_ERROR: the connection pool was destroyed mid-statement") onobject: 'cross_field_deal'reaches the loud sink untouched — not withheld, notcounted. Also checked: a matching message on an undeclared object stays loud
(object-scoped, like the table predicate), and a sibling
{ $field }family (barefield reference — contains
$fieldbut not "cannot be compiled here") is notswallowed.
fix committed, temporarily changed the predicate's matched phrase to a string that
cannot appear (
REVERSE_VERIFICATION_PROBE_NEVER_MATCHES), reran the same--reporter=defaultcommand:ERROR Find operation failedframes came back loud (verbatim, matching the"before" measurement byte-for-byte);
afterAllassertion failed(
AssertionError: expected [ Array(1) ] to deeply equal []—silentChannels()correctly named the now-unmatched channel), proving the assert side is real and not
vacuous;
git checkout HEAD -- packages/runtime/src/expected-read-refusal-noise.tsback to the committed, correct predicate (confirmed clean via
git diff --stat HEAD).Changeset
None.
expected-read-refusal-noise.tsis test-only by its own docblock (not importedby
src/index.ts, so tsup never bundles it) andpackages/runtime/package.json's"files"is["dist", "README.md", "CHANGELOG.md"]— nothing in this diff ships. Purelytest-noise suppression, no shipped-behaviour change.
Gates run
All of the below ran against the final commit
1e3b71d419.pnpm --filter @objectstack/runtime test(--reporter=default --maxWorkers=2, no pathfilter) —
Test Files 183 passed (183)/Tests 2706 passed (2706), 0ERROR Find operation failedlines anywhere in the package.pnpm --filter @objectstack/runtime typecheck— clean (tsc --noEmit, no output).pnpm --filter @objectstack/runtime build— clean (tsup, DTS build success).node scripts/pm/dispatch-gates.mjsderived these named local gates; every one run andgreen, verdict line quoted:
pnpm check:cross-package-test-inputs(explicitly re-run per standing instruction)—
OK: 14 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.(plus its own 104/104 self-test)pnpm check:published-files—69 publishable package(s) ... declare a files whitelist that covers every entry point ...; 1 publish more than dist/ + README.md + CHANGELOG.md, each with a registered reason.pnpm check:slot-lookup—slot-lookup ratchet holds: 107 unswept site(s) in 25 file(s), none new ... baseline key set verified against e4a71d4: no files added.pnpm check:test-source-alias—check-test-source-alias OK — 72 packages with tests scanned; ...pnpm check:type-source-resolution—check-type-source-resolution OK — 77 packages with a tsconfig.json scanned; ...node scripts/check-ci-filter-parity.mjs—OK: all 88 declared cross-package glob(s) (76 unique) are covered by core or crosspkg ...node scripts/check-cross-package-test-inputs.mjs— same OK line as above (ci.ymlentry point)
node scripts/check-plugin-teardown-shape.mjs—63 Plugin implementation(s) ...; every teardown-shaped method ... sits beside a real destroy() (0 known-unreached, SHRINK-ONLY, baseline fully burned down).node scripts/docs-audit/check-affected-docs.mjs— exit 0, informationalreachability report only (no assertion failure).
pnpm check:query-options-erasure—query-options-erasure ratchet holds: 67 unswept non-test site(s) in 17 file(s), none new ...; baseline key set verified against e4a71d4: no files added.pnpm check:type-check-coverage—check-type-check-coverage: OK — 65/78 workspace packages type-checked (plus the root), 13 in the DEBT ledger ..., 1 exempt.pnpm check:type-check-debt(workspace closure built first —pnpm exec turbo run build --filter='./packages/*' --filter='./packages/*/*',70/70 tasks successful — then re-measured) —
check-type-check-coverage --re-measure: OK — 33 ledger entr(ies) re-measured in 240.1s, 1896 raw tsc error(s) total, none above its recorded number.(an unrelated pre-existing-debtimprovement surfaced —
@objectstack/runtime: TEST_DEBT records 227, tsc now reports 225 (-2)— not introduced by this diff, left as-is; lowering ledgerceilings for packages this card did not touch is out of scope here)
pnpm check:engine-double-contract—check-engine-double-contract: OK — 384 pinned, 133 in the DEBT ledger, 2 exempt.pnpm check:where-matcher—where-matcher conformance holds: 282 matcher(s) discovered, 282 answer the combinator battery correctly or refuse it loudly (170 refuse). 0 silently-wrong and 0 unjudged matcher(s) ...; baseline key set verified against e4a71d4: no files added.pnpm check:nul-bytes—check-nul-bytes: OK (scanned 6521 text file(s) ...; no raw ASCII control bytes).Out of scope
Nothing found beyond this card's scope during implementation.
Generated by Claude Code