Skip to content

test(ci): the ratchet case that tells the ledger from the constant 0 (#2472) - #2490

Merged
gHashTag merged 2 commits into
masterfrom
fix/ratchet-knows-the-ledger
Aug 23, 2026
Merged

gHashTag merged 2 commits into
masterfrom
fix/ratchet-knows-the-ledger

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

Closes the last open item of #2472, and demonstrates the one guard that was still unproven.

The gap

check_specs_parse.py compares now > was, where was is a spec's recorded discard debt. Every case in its control planted into a spec whose recorded debt is zero, so now > was and now > 0 were the same expression.

if now > 0     control: PASSES        live gate: RED

That mutation ignores the ledger entirely — every spec carrying debt would fail — and nothing in the control would have named the change.

The distinguisher is debt UNDER the recorded figure, not more of it

A spec owing 1,139 tokens, planted with about ten. Correct code is silent; now > 0 raises a false alarm. So the new case asserts silence, and it is the only case in that control that does.

now > 0     control passed before  ->  killed
now >= was  killed before and after
now != was  killed before and after
no-op       silent -- the control does not cry wolf

The file had reasoned half-way, and correctly

_CONTROL_SPEC is chosen as a REQUIRED spec with zero debt, deliberately, with a comment: a spec owing 1,139 tokens would swallow a ten-token plant and make the drift case vacuous.

That is right for the drift case, and it is exactly what left this question open. Two cases whose requirements point opposite ways need two fixtures, not one rule.

The guard nobody had seen fire

#2469 added a try around json.loads(out) in wp18's control so garbage stdout records [FAIL] instead of aborting with a traceback. Correct by construction, never demonstrated — which is why it stayed on the open list.

Planting a gate that prints non-JSON:

[FAIL] TP0_whole_program_clean_exit0
exit 1, zero tracebacks

Without it the control dies there and every later case silently never runs.

#2472 in full

item outcome
wp18 drift verdict uncovered refuted — three mutations of increasing narrowness, all killed
specs_parse ratchet only at was == 0 fixed here
seal_coverage's two uncovered paths stated in the file
json.loads guard unproven demonstrated here

The new-blindness check I owed

Three files now delete a sibling's cached bytecode on every run. In CI the two sharing a workflow are sequential steps; ten concurrent pairs run locally gave zero failures. No race — measured, not assumed.

Closes #2472

check_specs_parse compares now > was, and every case in its control
planted into a spec whose recorded debt is ZERO -- so now > was and
now > 0 were the same expression.

Measured: `if now > 0` passes the control and turns the LIVE gate red.
That mutation ignores the ledger entirely, every spec carrying debt would
fail, and nothing in the control would have named the change.

The distinguisher is not more debt, it is debt UNDER the recorded figure:
a spec owing 1,139 tokens planted with about ten. Correct code is silent;
now > 0 raises a false alarm. The new case asserts SILENCE and is the
only case there that does.

  now > 0     control passed before, killed now
  now >= was  killed before and after
  now != was  killed before and after
  no-op       silent

The file had reasoned half-way: _CONTROL_SPEC is deliberately a spec with
zero debt, because one owing 1,139 tokens would swallow a ten-token plant
and make the DRIFT case vacuous. Right for that case, and exactly what
left this question open -- two cases with opposite requirements need two
specs, not one rule.

Also demonstrated, closing the last item: the json.loads guard from #2469
was correct by construction and never seen to fire. Planting a gate that
prints non-JSON gives [FAIL] TP0_whole_program_clean_exit0, exit 1, zero
tracebacks.

Closes #2472
…two fixtures (#2472)

check_specs_parse deliberately chose a zero-debt spec so a large debt
would not swallow a small plant in the DRIFT case. Correct -- and exactly
what made `now > was` indistinguishable from `now > 0`, a mutation that
passes the control and reddens the live gate.

Plus: the economical distinguisher is usually "assert silence", not a
bigger plant. A control made entirely of cases demanding red is blind to
every mutation that makes a gate louder, and that is the shape a constant
substituted for a variable takes.

And: a guard written "correct by construction" is in the same evidential
state as a gate nobody has seen go red. The json.loads guard from #2469
is now demonstrated -- [FAIL], exit 1, zero tracebacks.

Refs #2472
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-23 02:38:52 UTC

Summary

Status Count
Total Open PRs 6
PRs with Failing Checks 2
PRs with All Checks Green 4
READY 3
FAILING 2
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e905ba8eeb53 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit a7795e6 into master Aug 23, 2026
24 of 26 checks passed
@gHashTag
gHashTag deleted the fix/ratchet-knows-the-ledger branch August 23, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two control gaps left open by the survivor sweep, named rather than inferred

1 participant