Uh oh!
There was an error while loading. Please reload this page.
test(runtime): pin the batch-row sink's disclose/withhold log coherence - #14684
Conversation
WIP checkpoint before the verification round. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
📓 Docs Drift Check
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): |
os-musk
commented
Sep 2, 2026
Landing provenance (engine execution seat, session
Owed by the seat at MERGED: verify by content on Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Part of #14403 — the residual half. Deliberately not a closing keyword: the triage seat asked for a measured verdict and reserved the grading, so the card stays open for it.
TL;DR — this is a measured zero-implementation result on the source, plus the pin the residual was waiting for
The card predicted a lost operator diagnostic in the batch-row sink. Measured on the real stack, there is none, for a reason that is itself worth pinning. So this PR changes no executable line: one comment block in
protocol.tsrecording the measurement, and one test file where a prose "KNOWN RESIDUAL" note becomes an assertion.git diffis two files, and theprotocol.tshalf is comment-only — proven mechanically, every added line matches^\+\s*\*:Step 1 — the hard gate, run before any edit
origin/main@2aa8456cf, worktree byte-pristine:GREEN ⇒
mainis not broken today,priority:p2stands, and card item 3 (retriage the sentence pins) is not triggered — both files already carry theirRETRIAGED, not re-baselinedblocks from PR #14405. Posted on the card as comment 5513980544 before the first edit.Item 2 — both named sites already reach through, by two different mechanisms
seedFailureCause(seed-loader.ts:139-151)causechain, prefers the deepest sentence ([#14095]docblock)seedCauseLabel(seed-loader.ts)(err, printed)and compares the sentence about to be printed against the one the payload quotederrwhole toconsole.warn;util.inspectrenders the[cause]chain (Node v22.22.2)The triage read had
seedCauseLabelas an open question; on this tree it is already the more advanced form, so nothing was owed there either.⭐ The measured correction: the residual note in the pin file was half wrong
batch-row-driver-text-real-driver.integration.test.tscarried this onmain:The zero-warn half is true. The "nor the console" half is false, and the counter-evidence comes out of that suite's own rig — captured during the step-1 run, with stack frames naming
batch-row-driver-text-real-driver.integration.test.ts:136andengine.ts:4572:That is the engine's insert door taking the envelope's
causeon purpose —e instanceof DuplicateRecordError ? e.cause : e(engine.ts:10198), the #14095 / #14390 remedy, already pinned inpackages/objectql/src/driver-fault-redaction.test.tswhere it asserts the failing column survives in the line. The diagnostic moved one hop; it was never deleted.Why adding the log would have been the wrong fix, not merely a redundant one
Two independent reasons, either sufficient:
logger.erroronto such a site." The row reportssuccess: false,code: DUPLICATE_RECORD,httpStatus: 409and the producer's own sentence. The caller was told.The sink's own log exists to record a withhold. Nothing was withheld here, so there is nothing for it to record.
What actually changed
packages/metadata-protocol/src/protocol.ts— comment only. A[#14403]section onclientFacingRowFailureTextrecording the measurement and marking the disclosed branch ⛔ do-not-log, so the next reader does not re-open this from the same inference the card made.packages/runtime/src/batch-row-driver-text-real-driver.integration.test.ts— the residual note becomes a pin. Aconsole.warnrecorder is installed inrig()(⛔ recording, never muting — every call is forwarded to the realconsole.warn, so shard-log output is unchanged), and the sink's decision/log coherence is asserted in both directions on one rig:deleteManyData(undeclared FK fault, withheld) →expect(sinkWarnings).toHaveLength(1)plus the driver's ownFOREIGN KEY constraint failedinside it. This is the live control: without it a green zero in the sibling test could mean the recorder was never wired.batchData create(declared 409, disclosed) →expect(sinkWarnings).toEqual([]).Ablation — the new pin is proven to bite the exact change this PR argues against
Mutated
clientFacingRowFailureTextto log on the disclosed branch (the fix I am declining), rebuilt, ran, restored. Predicted direction: RED, and that is what happened.Both legs rebuilt
@objectstack/metadata-protocoland both were proven throughscripts/ablation-dist-preflight.mjs(present, then--absent) — the runtime suite resolves this package throughexportstodist/, so an unrebuilt ablation would have stayed green and certified a vacuous assertion. Mutation was confirmed on disk by a hit count on the injected text plus a blob-hash move, never by the editor's exit code; the restore namesHEADexplicitly rather than a baregit checkout --, which would have restored from the mutated index.Verification
All on the final tree; the union below was run at
HEAD= the commit this PR ships.Test Files 2 passed (2),Tests 4 passed (4),VERDICT command-exit 0.@objectstack/metadata-protocolfull suite —Test Files 156 passed | 2 skipped (158),Tests 2141 passed | 10 skipped (2151),VERDICT command-exit 0.typecheck—@objectstack/metadata-protocoland@objectstack/runtime, both clean.packages/runtime/tsconfig.jsonexcludes its own test files, so thattypechecksays nothing about the file I edited. Checked explicitly with a throwaway config (removed again; tree clean):tsc --noEmitexit 0, and--listFilesconfirms the edited file was actually in the program (1 hit) rather than silently absent.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands(change set taken by the script from the merge base, not from a hand-rolled diff): 29 commands, 26 measured green.check-test-completeness.mjs("there is no local log to hand it … ⛔ It is not a red"),check:dual-build-cjs-loadsandcheck:type-check-debt(both "PREREQUISITE NOT MET", needing a full-repo build; their self-tests passed, andcheck:type-check-coverageprintedOK). A fullturbo run buildwas run to clear the prerequisite and both re-run; result recorded in the dispatch report.Exit codes were captured before any pipe (
cmd > log 2>&1; EXIT=$?), and every verdict above is quoted from the gate's own verdict line rather than read off a bare$?.No contract moved
No accept set widens or narrows, no public entry gains or loses an export, no declared refusal changes shape, and no door's answer changes — only what one of them logs, and that not at all in this diff. Clause-② remains no. The four leak assertions this suite exists for (
insert into,dup@example.com,UNIQUE constraint failed,SQLITE_CONSTRAINT) are untouched, byte for byte, and passing.Changeset
Carrying
skip-changesetinstead of a changeset file, which is this workflow's own prescription for a PR that "declares no release of its own": the diff is one comment block and one test file, so nothing is published and a version bump would ship a release that changes nothing. The dispatch's default ofpatchwas explicitly conditional on the measurement, and the measurement moved it.🤖 Generated with Claude Code
https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
Generated by Claude Code