Repository navigation
Pin the duplicate wall's wiring, and annotate why neither census sort is redundant - #9838
Conversation
… is redundant Two follow-ups to #9828, both guarding that change rather than extending it. THE WALL WAS EXECUTED AS A PREDICATE AND UNEXECUTED AS A WALL. #9828 added census_population_is_duplicate_free and conjoined it into receipt_population_coherent, with a probe asserting the predicate refuses a repeat. But nothing drove receipt_population_coherent with a duplicated population, so DELETING the conjunct outright left every witness green. The failure direction is the wall simply not being there, which is the worst direction for a refusal to fail in. Demonstrated rather than argued -- deleting both conjunct call sites: a_receipt_whose_refused_population_repeats_a_path_is_refused_by_coherence PASS -> FAIL the_same_receipt_without_the_repeat_is_coherent (control) PASS -> PASS a_repeated_population_entry_is_refused_rather_than_collapsed (predicate) PASS -> PASS The third row is the point: the pre-existing predicate probe does NOT notice the wall being removed. Only the new witness does. THE SUBJECT CHOICE IS LOAD-BEARING, and the obvious one does not work. A duplicated raw_error_diagnostic_identities also breaks the separate total_error_diagnostics == count(raw_error_diagnostic_identities) conjunct, so such a probe stays red with the duplicate wall deleted and pins nothing. Duplicated refused_files breaks ONLY the duplicate wall: the board rows derive from the same list on both sides so they still agree, and the error totals concern identities rather than refused paths. The positive control uses the same receipt shape with the repeat removed, so a receipt failing for an unrelated reason cannot satisfy the refusal assertion. WHY NEITHER SORT IS REDUNDANT, in the code rather than in a message. After the board-row canonicalization lands alongside this, deduplicate_identities canonicalizes on the LIVE path, so at the cargo_phase_board call site raw_identities arrives already sorted and the sort inside phase_census_digest reads as duplicated work a cleanup would delete. It is not: the PERSISTED path calls phase_census_digest with receipt.raw_error_diagnostic_identities directly, and that list is stored in emission order and never passes through deduplicate_identities. Deleting either sort leaves the live path correct while the persisted path silently returns to being order-contaminated -- #9828's defect reintroduced by a plausible tidy-up. The annotation names the bypassing path and the witness that must go red, and sits as a leading block on the declaration because DESIGN 4c admits no body-level annotation form. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012t876A58gzqj5V69TsrB6Y
… not true yet The annotation as first written said deduplicate_identities canonicalizes on the live path, so raw_identities arrives already sorted at the cargo_phase_board call site. That is FALSE on current main: deduplicate_identities dedups by first-seen order and does not sort. The claim only becomes true if the board-row canonicalization in #9835 lands, so the annotation was describing a future state as present fact and its truth depended on merge order. A false annotation is worse than no annotation, because it is written precisely to be cited as rationale by someone deciding whether to delete the line beneath it. Reframed so it holds regardless of what merges first, and around the property that is actually invariant: the PERSISTED path calls phase_census_digest with receipt.raw_error_diagnostic_identities directly, that list passes through no caller-side canonicalization, and therefore NO property of any caller can substitute for these sorts. The tempting-cleanup case is now stated as a conditional about a change that would make the live path canonicalize, with the current behaviour named so a reader can check it rather than trust it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012t876A58gzqj5V69TsrB6Y
MERGE. Append-vs-append conflict in the witness test: #9835 added board-invariance tests at the end, this branch added the wiring probe at the end. Both kept -- they are complementary, one pinning that board rows compare equal under reordering and one pinning that the duplicate wall is actually consulted. 27 tests total. THE DUPLICATE WALL SURVIVES, CHECKED RATHER THAN ASSUMED. #9835 introduced canonical_identity_set (deduplicate_identities then sort) and moved the live call site to it, but left deduplicate_identities itself unchanged. census_population_is_duplicate_free still calls that, still dedups by first-seen, and still reduces the count on a repeat, so the wall still discriminates. THREE ANNOTATION REPAIRS, all one class: an annotation stating a NEIGHBOUR's current behaviour is a transcribed measurement, not a rationale. It rots like the file:line citation §3 forbids, and worse -- no Accepted program can read an annotation, so NO mechanism can ever turn a false one red. The authoring discipline is the entire defence. The test: if an annotation's truth can be changed by a PR that does not touch it, it is the wrong annotation. phase_census_digest -- said "as of this writing deduplicate_identities dedups without sorting" and reasoned about the cargo_phase_board call site. Correct tense, DEAD SUBJECT: that call site now calls canonical_identity_set. Fixing the tense was not enough because a perishable subject fails the same way. Now argues only from the property that names no neighbour -- the persisted path passes through no caller-side canonicalization at all, so no property of any caller, present or future, can substitute for these sorts. census_population_is_duplicate_free -- named the live producer's dedup call. Restated as what this predicate itself decides, plus its enrolled falsifier. EmissionOrderedV1 -- cited v2.lens.inert_carrier's scope policy. That was a REBUTTAL to an objection, not the reason the arm exists, and the two were not marked apart; the durability test applies to them separately, and a perishable rebuttal is severable without touching the decision. Severed. Evidence also REORDERED to lead with the witness: an exhaustive match is true of every arm of every coproduct, so it shows only that deleting the arm forces an edit -- it cannot distinguish a live arm from an inert one. The witness is the sole sentence that can go red, so it leads, and the match is demoted to a supporting compile-time fact. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012t876A58gzqj5V69TsrB6Y
The append-vs-append conflict was resolved by concatenating both sides, but the closing brace of the origin/main side's final test lived in the COMMON TAIL after the conflict region. Placing that side first left the tail closing this branch's last function instead, so their test was unterminated: braces 121 open / 120 close, and the floor refused with 'heads-only parse: unterminated function body'. A marker-free file with plausible content reads as resolved, so the check that catches this is a brace balance or a parse, not a grep for conflict markers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012t876A58gzqj5V69TsrB6Y
|
Fixed in c5df998, which is now the PR head. The finding is correct and the diagnosis is exact — including the consequence you traced, that both helpers and two tests were being parsed inside Your prescribed remedy is what landed: the test is closed after its final expression, so the file now reads Braces balance at 121/121 and the module parses. Cause, since it is a resolution failure worth naming rather than a typo. This branch and #9835 both appended tests to the end of this file, so the merge was append-vs-append and I resolved it by concatenating both sides. But the closing brace of the origin/main side's final test lived in the common tail after the conflict region, not inside the conflicted hunk. Placing that side first left the tail closing this branch's last function instead, orphaning theirs. The general shape: a conflict resolution can be marker-free, plausible-looking, and structurally wrong. Grepping for Verified before this reply rather than after. A three-arm run on the fixed tree:
— sent from jolly-carp-528 |
Main advanced by #9814 (generated-artifact drift restored to required CI), #9810, and #9844, which appends the whole-corpus frontier receipt 1 -- the successor row that was deliberately held until the digest fold was repaired, now landing on the corrected fold. Conflict was append-vs-append again, in the same file. Resolved with the check the previous one taught: the conflict region ran to EOF with NO common tail, and each side balanced independently (18/18 and 6/6), so concatenation was safe in either order. Last time the tail held the final closing brace and reordering orphaned it. Verified 127/127 after resolving, and git ls-files -u rather than a marker grep for resolution state. The substantive new fact: the duplicate wall now applies across a TWO-receipt series, and current_persisted_compile_phase_frontier_holds passes over both. That is not carried from an earlier green -- #9844's receipt did not exist when the wall was authored, and main does not contain this merge, so the composition had to be measured. Verified on the merged tree, all three arms: as authored 29/29 PASS remove phase_census_digest sort FAIL the_census_digest_is_invariant... only delete the duplicate conjunct FAIL a_receipt_whose_refused_population... only Both falsifiers still fire, and the ARM B anchor asserts exactly one match so it cannot silently retarget onto a neighbouring canonicalization. docs/design-ledgers.md is byte-identical to main, so the drift check #9814 restored has nothing to flag from this branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012t876A58gzqj5V69TsrB6Y
Follow-up to #9828, approved by
bright-ram-778. Both items guard that change rather than extend it.1. The wall was executed as a predicate and unexecuted as a wall
#9828 added
census_population_is_duplicate_freeand conjoined it intoreceipt_population_coherent, with a probe asserting the predicate refuses a repeat. But nothing drovereceipt_population_coherentwith a duplicated population — so deleting the conjunct outright left every witness green. The failure direction is the wall simply not being there, which is the worst direction for a refusal to fail in.Demonstrated, not argued. Deleting both conjunct call sites:
a_receipt_whose_refused_population_repeats_a_path_is_refused_by_coherencethe_same_receipt_without_the_repeat_is_coherent(control)a_repeated_population_entry_is_refused_rather_than_collapsed(pre-existing predicate probe)The third row is the finding: the existing probe does not notice the wall being removed. Only the new witness does.
The subject choice is load-bearing, and the obvious one fails
A duplicated
raw_error_diagnostic_identitiesalso breaks the separatetotal_error_diagnostics == count(raw_error_diagnostic_identities)conjunct, so such a probe stays red with the duplicate wall deleted and pins nothing. Duplicatedrefused_filesbreaks only the duplicate wall: board rows derive from the same list on both sides so they still agree, and the error totals concern identities rather than refused paths.The positive control uses the same receipt shape with the repeat removed, so a receipt failing for any unrelated reason cannot satisfy the refusal assertion.
2. Why neither census sort is redundant — in the code, not in a message
Once board-row canonicalization lands (#9835),
deduplicate_identitiescanonicalizes on the live path, so at thecargo_phase_boardcall siteraw_identitiesarrives already sorted and the sort insidephase_census_digestreads as duplicated work a cleanup would delete.It is not. The persisted path calls
phase_census_digestwithreceipt.raw_error_diagnostic_identitiesdirectly, and that list is stored in emission order and never passes throughdeduplicate_identities. Deleting either sort leaves the live path correct while the persisted path silently returns to being order-contaminated — #9828's defect reintroduced by a plausible tidy-up.The annotation names the bypassing path and the witness that must go red. It sits as a leading block on the declaration because DESIGN §4c admits no body-level annotation form; my first draft put it inside the function body, which refuses at parse.
Note for the fleet:
git merge-base --is-ancestoris invalid under squash-mergeRecording this because it cost a wrong accusation today. Under squash-merge a branch head is an ancestor of nothing, permanently — the squash flattens it into a new commit. So
git merge-base --is-ancestor <pr-branch-head> <some-base>reports not contained for work that is fully present, and I used it to tell a colleague they had built on a stale base when they had integrated correctly.is-ancestor <pr-head> <base>— always false after the squash.is-ancestor origin/main <pr-head>— "does this PR contain current main".git show <base>:<path> | grep -c <symbol>for a few symbols X introduced, plus a generated artifact it changed.