Skip to content

[finding] a shrink-only ratchet whose self-test asserts its own entries are PRESENT can never reach zero — one instance found and fixed, the class unswept #11694

Description

@os-zhuang

Found while landing #11596 slice 2 (PR #11692). The instance is repaired there; the class is not
swept
and that is what this card is for. Filed unassigned.

The shape

A shrink-only ratchet exists to be driven to zero. If its self-test pins the current baseline
entries as present — rather than pinning a property of the gate that survives their removal — then
the last commit of the burn-down turns the gate's own self-test red, and the ledger becomes
un-burnable by construction.

Measured instance, scripts/check-cli-test-child-env.mjs:

t(`the enumerated population contains ${named.split('/').pop()}`,live.refusal===null&&live.findings.some((f)=>f.file===named));

findings holds a file only while it still leaks. Two cases were written this way to pin
#11441's measurement that the derivation really covers those files — a good intention, and the
comment above them says exactly that in words ("they are members of the population"). But the
spelling asserts a transient fact about the tree, not a property of the gate. Repairing the two
files reported 2 of 54 case(s) failed, and the failure message read "the derivation lost this
file"
when the file was merely clean.

The repair in #11692 re-spells it as membership of the scanned population — walked, and
classified as a spawner — which is the claim that was intended and the one that survives the repair.
The gate's rule is byte-identical; the case count is unchanged; and it still discriminates (narrowing
the population root reds it again).

Why this is worth a sweep rather than a note

The two failure modes are indistinguishable on the day the pin is written and diverge only at the
moment the ratchet finally succeeds — i.e. the pin is a booby trap that arms itself years before it
fires, at the exact moment someone is trying to do the right thing. A seat hitting it mid-burn-down
sees a red gate and the most likely reactions are both wrong: leave an entry in the ledger to keep
the self-test green, or weaken the gate.

What a sweep would check

For each shrink-only / ratchet gate under scripts/, does its selfTest() (or its test twin) assert
anything that is only true while the baseline is non-empty? Candidates worth reading, chosen
because they are the ratchets this lane has touched recently and is not an exhaustive list —
⛔ derive the population rather than working from it:

⭐ The discriminating question for each, and it is answerable by reading the assertion alone:
would this case still pass if the baseline were empty? If not, it is pinned to the debt rather
than to the gate.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions