Skip to content

#265: a proof that drove a copy of its subject, and a boundary that was wrong - #274

Merged
Polichinel merged 2 commits into
developmentfrom
fix/265-rename-proof-and-seam-registry-tests
Aug 14, 2026
Merged

#265: a proof that drove a copy of its subject, and a boundary that was wrong#274
Polichinel merged 2 commits into
developmentfrom
fix/265-rename-proof-and-seam-registry-tests

Conversation

@Polichinel

Copy link
Copy Markdown
Collaborator

C-89's two orphaned deferrals, both discharged. Test-only; no package code changes.

The proof drove a copy of its subject

test_the_drift_check_would_catch_a_rename rebuilt the gated check's comparison with its own comprehensions instead of calling it — so blanking the real check's assertions left the proof green. A proof of a reimplementation.

Its two siblings had already been repaired this way via _describe_changes, which makes this a second incident, not a guessed abstraction. The comparison is now _name_and_class_drift, called by both the gated check and the proof.

Mutation-proven: making that function return ([], {}) now fails the proof for both partners, where before it passed. It also gained an assertion that the report names both sides of a mismatch — what this package expects and what the registry declares — because a reader who cannot tell which one moved cannot act on it.

The relocation is answered "no", with the reason recorded

The deferral said the coordinate-value guards belong in tests/test_redaction_guard.py. They stay where they are. Their subject is _EXPECTED_NAMES, derived from _PARTNER_ENV — the declaration of what each partner reads, which is the substance of test_env_declaration.py. Moving a guard away from the declaration it guards so that a filename reads better trades a real coupling (CCP) for a filing convenience, and would mean exporting a private name from one test module into another.

That deferral had already fired once without being done. Answering it is the point; deferring it a third time was the thing to avoid.

What was actually misfiled moved instead

registry_at / registry_current / rows are the shared reader, not this package's environment declarations. Their refusal tests plus _scratch_repo are now tests/test_seam_registry.py115 lines out, no shared private state left behind.

test_env_declaration.py is 1406 lines against 1503 before; the split removed more than that and the shared comparison put some back.

Verification

ruff clean; 457 passed, 1 skipped, 39 xfailed — the same 457 before and after the move, which is the point. A file split that changes the count has moved something it should not have.

Closes #265.

Polichinel and others added 2 commits August 14, 2026 23:51
… that was wrong

C-89's two orphaned deferrals, both discharged.

THE PROOF DROVE A COPY. test_the_drift_check_would_catch_a_rename rebuilt the gated
check's comparison with its own comprehensions instead of calling it, so blanking the
real check's assertions left the proof green — a proof of a reimplementation. Its two
siblings had already been repaired the same way via _describe_changes, which makes this
a second incident rather than a guessed abstraction.

The comparison is now _name_and_class_drift, called by both. Mutation-proven: making it
return ([], {}) fails the proof for both partners, where before it passed. It also gained
an assertion that the report names BOTH sides of a mismatch — what this package expects
and what the registry declares — because a reader who cannot tell which one moved cannot
act on it.

THE RELOCATION IS ANSWERED "no", with the reason recorded rather than deferred a third
time. The coordinate-value scan STAYS in test_env_declaration.py. Its subject is
_EXPECTED_NAMES, derived from _PARTNER_ENV — the declaration of what each partner reads,
which is the substance of that module. Moving a guard away from the declaration it guards
so a filename reads better trades a real coupling for a filing convenience, and would
mean exporting a private name from one test module into another.

What was actually misfiled moved instead. registry_at / registry_current / rows are the
shared READER, not this package's environment declarations, and their refusal tests plus
_scratch_repo are now tests/test_seam_registry.py — 115 lines out, no shared private
state left behind. test_env_declaration.py is 1406 lines against 1503 before; the split
removed more than that and the shared comparison put some back.

Same 457 tests before and after the move, which is the point: a file split that changes
the count has moved something it should not have.

Suite 457 passed / 1 skipped / 39 xfailed, ruff clean.

Closes #265.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Focused verification of a test-only change — lighter than the full multi-agent gate the
last two stories got, because nothing under views_postprocessing/ moved, the test count
is identical before and after, and both new behaviours are mutation-proven. Saying which
gate ran, rather than implying the same one.

It still found two false claims, both mine, both the measure-don't-recall rule.

"115 LINES OUT" was invented. Measured: the moved block is 109 lines of test code, and
test_env_declaration.py went 1503 -> 1406, a net 97, because the shared comparison put
some back. No command had produced 115.

"ITS TWO SIBLINGS HAD ALREADY BEEN REPAIRED THE SAME WAY VIA _describe_changes" is not
what happened. Reading the sibling's own docstring: the rotation proof CALLING
_describe_changes was part of the defect, not the repair — it drives "the helper
underneath" rather than the check. The actual repair was a new test driving the real
check under monkeypatch.

That matters because it was load-bearing: I used it as the WET-before-DRY licence for
extracting a shared function, and a precedent that does not exist cannot license
anything. The extraction is still right, for a reason now stated honestly — the
comparison is a pure function of two dicts and both callers want exactly it, so sharing
it is the same guarantee with less machinery than monkeypatching a gated check. What
justifies it is that this is the second time the pattern has bitten, not a rule about
line counts.

Also verified and true: the new module imports nothing private from the old one, and
nothing anywhere else referenced the moved tests by name.

Suite 457 passed / 1 skipped / 39 xfailed, ruff clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Polichinel
Polichinel merged commit 0d38a71 into development Aug 14, 2026
4 checks passed
@Polichinel
Polichinel deleted the fix/265-rename-proof-and-seam-registry-tests branch August 14, 2026 21:56
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.

1 participant