Repository navigation
test(ci): the ratchet case that tells the ledger from the constant 0 (#2472) - #2490
Merged
Merged
Conversation
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
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
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 free
to 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.
Closes the last open item of #2472, and demonstrates the one guard that was still unproven.
The gap
check_specs_parse.pycomparesnow > was, wherewasis a spec's recorded discard debt. Every case in its control planted into a spec whose recorded debt is zero, sonow > wasandnow > 0were the same expression.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 > 0raises a false alarm. So the new case asserts silence, and it is the only case in that control that does.The file had reasoned half-way, and correctly
_CONTROL_SPECis 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
tryaroundjson.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:
Without it the control dies there and every later case silently never runs.
#2472 in full
specs_parseratchet only atwas == 0seal_coverage's two uncovered pathsjson.loadsguard unprovenThe 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