Uh oh!
There was an error while loading. Please reload this page.
feat(devx): ratchet check:engine-double-contract's consumer-seam population - #10502
Merged
os-zhuang merged 1 commit intoAug 21, 2026
Merged
Conversation
…lation (#9708) `SEAMS_DISCOVERED` fires at zero and never at one-fewer-than-yesterday, and `REFUSES` iterates the discovered set — so a seam that LEAVES the set was judged by nothing. Measured by ablation on the card: deleting the `remove()` seam from packages/mcp/src/stdio-data-bridge.ts took the census down one and left the script printing OK, exit 0. The shape was chosen on a measurement rather than inherited from #9680: this file's own scanAllSeams, unmodified, replayed over 58 daily trees of main (2026-06-25..2026-08-21) found 3 membership changes — two moves and one arrival — 2 refusal-state transitions SHARED_ONLY already governs, and 0 outright departures. One event a fortnight against a site of the #4435/#5138/#5581/#7867 family silently ceasing to be judged. - scripts/engine-double-contract.seams.json: the enumerated population, keyed (file, fn, verb) — not on the line, so an unrelated edit above a seam cannot churn it. Written by the same `--write` as the pinned ledger. - SEAMS_RETAINED separates four loss worlds; `unrecognised` (the function is still declared and the scan no longer reads a seam in it) refuses the regeneration remedy the other three offer, because regenerating there would record a blind spot as intended. - The seam list now prints on every run, green or red, and says the population is ratcheted rather than merely counted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
os-zhuang
marked this pull request as ready for review
August 21, 2026 02:09
Uh oh!
There was an error while loading. Please reload this page.
os-zhuang
deleted the
claude/issue-9708-engine-double-consumer-seam-ratchet
branch
August 21, 2026 02:49
This was referenced Aug 21, 2026
This was referenced Aug 21, 2026
This was referenced Aug 21, 2026
Closed
This was referenced Aug 21, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #9708
SEAMS_DISCOVEREDfires at zero and never at one-fewer-than-yesterday, andREFUSESiterates the discovered set — so a seam that leaves the set was judged by nothing. The card's own reproduction, re-measured on currentmain(a718ee3dd): deleting theremove()seam frompackages/mcp/src/stdio-data-bridge.tstook the census 6 → 5 and left the script printingOK, exit 0.The design act was decided on a measurement, not inherited
The card explicitly refused to inherit #9680's answer by reflex, so "vanished seam = error vs ledger row vs distinct verdict" was settled by replaying this file's own
scanAllSeams, unmodified, over 58 daily trees oforigin/main(one commit per day, 2026-06-25 → 2026-08-21):objectql→metadata-protocol) · 2026-07-27callDatamoved file (http-dispatcher.ts→action-execution.ts) · 2026-08-12 the MCP stdio bridge arrived, +2local→shared) —SHARED_ONLYalready governs those and this ledger deliberately does notOne event a fortnight, and a legitimate one costs a single
--writecommit. Against that, the loss it closes is a site of the #4435/#5138/#5581/#7867 family — four shipped instances of a receipt answered for a write that touched zero rows — silently ceasing to be judged. Cheap ratchet, expensive miss, so it is built. The reasoning and the numbers live in the gate's own header, not only here.What landed
scripts/engine-double-contract.seams.json— the enumerated population, keyed(file, fn, verb). Not keyed on the line: a seam's line moves on every edit above it, and a ledger regenerated reflexively is the number nobody reads that this card exists to leave. Written by the same--writeas the pinned ledger — two regeneration commands for one gate is how a second artifact goes stale while every message says "run --write".SEAMS_RETAINEDseparates four loss worlds —file-removed,function-removed,unrecognised,sites-removed.unrecognised(the function is still declared and the scan no longer reads a seam in it) is the one that refuses the regeneration remedy the other three offer, because regenerating there would record a blind spot as intended.SEAMS_RETAINEDerror is about.SEAM_VERBSis named once and read by both the scan and the ledger check, so an entry naming a verb the scan never reads is rejected instead of recording a population nothing checks.Ablations (all confirmed on disk, never by an editor's exit code)
Each mutation was verified with a
grep -con the text being changed, before and after; the gate reads source, so no build is involved.remove()member — the card's own repro (async remove(object, id)1 → 0, 21292 → 20685 bytes)SEAMS_RETAINED [delete] … declares no function named remove() any moresuccess→acknowledged(success: true1 → 0,remove(still 1)unrecognised, message refuses--writepackages/mcp/src/(330 bytes on disk)SEAMS_RETAINED … the seam ledger does not record itSEAMS_RETAINEDalone,REFUSESsilent — the population verdict is independent of the refusal verdict--self-testred, naming 6 assertions, 4 of them live rowsRestores after 1–3: byte count back to 21292,
git status --porcelainempty, gate green.Ablation 4 is the anti-vacuity control the #8999 lesson asks for. Blinded, the walker turns ablation 2's tree into
declares no function named remove()— the quieter story told about the louder defect — which is why the self-test drives it against the real tree and not only fixtures. What it deliberately does not assert is that the ledger on disk matches the tree: that is the verdict of the run the self-test gates, and duplicating it would make a genuine seam removal surface as a self-test failure.Positive control for the population, and what it cannot see
The instrument was proved to find known-present members before any count was claimed: the scratch probe (this gate's file, unmodified except for one CLI line) reproduced all 6 live rows — same files, lines, functions, refusal spellings — before it was pointed at a single historical tree.
Asked what makes the census return a false empty:
productionFiles()walkspackages/only, while the double side of the same gate walksSCAN_ROOTS(packages,examples). Re-run with the walk widened toexamples,apps,skillsandscripts(2026-08-21): the same rows, zero extra — a controlled zero, since the widened walk still returns all six rather than silently returning nothing. Filed as #10496 rather than folded in here — widening changes the invariant's subject and buys zero rows today, and it is recorded in the gate header as a stated scope boundary rather than left undeclared.Gates
Derived with
node scripts/pm/dispatch-gates.mjs(no path arguments) against the real diff, then run on the head commit1df4d7c382:No changeset: the diff is
scripts/**only and publishes nothing (skip-changeset).Generated by Claude Code