Skip to content

Cut a byte-identical duplicate declaration that main's floor refuses (MAIN RED, second break) - #9498

Closed
gunbai-bot[bot] wants to merge 1 commit into
mainfrom
fix/duplicate-fan-wiring-declaration
Closed

gunbai-bot[bot] wants to merge 1 commit into
mainfrom
fix/duplicate-fan-wiring-declaration

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

MAIN'S SECOND BREAK, independent of #9397's rename and not fixed by it. From
the floor job on #9463 (98608127128), which names both in one refusal:

fleet_fan_wiring_witness.dag:754:1: error: duplicate declaration
'srv3_wiring_with_a_duplicated_header' in module
'gunbc.fleet_fan_wiring_witness' -- a second declaration of one name
silently replaced the first

THE TWO DECLARATIONS ARE BYTE-IDENTICAL. Diff of the two ranges (447-453 and
754-760) is empty: same value, same construction. So this is a delete, not a
choice about which control survives -- a first report read them as differing
because their SURROUNDING ANNOTATIONS differ, and dispatched it as a semantic
decision.

ONLY THE ANNOTATIONS DIFFERED, AND ONE HALF WAS WORTH KEEPING. The deleted
copy's comment carried a fact the survivor's did not -- why FAN3 and not FAN2
-- so it is folded into the surviving declaration rather than going out with
the block. Deleting a duplicate whole would have dropped irreducible authored
rationale (§4c), which is the quiet cost of "it's just a delete".

THE DELETION STOPS AT THE BLANK LINE. Under §4c a standalone leading // block
attaches to the declaration that FOLLOWS it, so the annotation beginning "A
HEADER WHOSE DRIVEN COUNT NOBODY OBSERVED" belongs to
srv1_wiring_with_unobserved_driven_count, not to the duplicate above it. Taking
"the declaration and its comment" as one unit would have stripped the rationale
off a fixture this change does not touch, with nothing to catch it: the corpus
still parses, the witness still passes, and only the paragraph explaining why
that fixture forces exactly one unobserved header is gone.

WHY THIS REACHED MAIN AT ALL, measured rather than assumed. Compiling this file
as an entry does not see the duplicate. Run against the same file with the
duplicate PRESENT and with it CUT, output is identical:

0 blocking error(s), 272 advisory diagnostic(s)

Both arms, character for character. The duplicate-declaration check lives only
in the floor's strict preparation, so no entry-grain compile can discriminate
it -- which is also why this commit's own evidence is the floor job above and
not a local compile. A local green here proves nothing about this class.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com


Main is red for two independent reasons. #9488 fixes the #9397 rename; this fixes the other. Neither greens main alone.

Verified independently by swift-badger-524. Reported by deep-ant-102, whose diagnosis of the break was right and whose read of the two blocks as differing was not — corrected before their dispatch acted on it.

🤖 Generated with Claude Code

MAIN'S SECOND BREAK, independent of #9397's rename and not fixed by it. From
the floor job on #9463 (98608127128), which names both in one refusal:

  fleet_fan_wiring_witness.dag:754:1: error: duplicate declaration
    'srv3_wiring_with_a_duplicated_header' in module
    'gunbc.fleet_fan_wiring_witness' -- a second declaration of one name
    silently replaced the first

THE TWO DECLARATIONS ARE BYTE-IDENTICAL. Diff of the two ranges (447-453 and
754-760) is empty: same value, same construction. So this is a delete, not a
choice about which control survives -- a first report read them as differing
because their SURROUNDING ANNOTATIONS differ, and dispatched it as a semantic
decision.

ONLY THE ANNOTATIONS DIFFERED, AND ONE HALF WAS WORTH KEEPING. The deleted
copy's comment carried a fact the survivor's did not -- why FAN3 and not FAN2
-- so it is folded into the surviving declaration rather than going out with
the block. Deleting a duplicate whole would have dropped irreducible authored
rationale (§4c), which is the quiet cost of "it's just a delete".

THE DELETION STOPS AT THE BLANK LINE. Under §4c a standalone leading `//` block
attaches to the declaration that FOLLOWS it, so the annotation beginning "A
HEADER WHOSE DRIVEN COUNT NOBODY OBSERVED" belongs to
srv1_wiring_with_unobserved_driven_count, not to the duplicate above it. Taking
"the declaration and its comment" as one unit would have stripped the rationale
off a fixture this change does not touch, with nothing to catch it: the corpus
still parses, the witness still passes, and only the paragraph explaining why
that fixture forces exactly one unobserved header is gone.

WHY THIS REACHED MAIN AT ALL, measured rather than assumed. Compiling this file
as an entry does not see the duplicate. Run against the same file with the
duplicate PRESENT and with it CUT, output is identical:

  0 blocking error(s), 272 advisory diagnostic(s)

Both arms, character for character. The duplicate-declaration check lives only
in the floor's strict preparation, so no entry-grain compile can discriminate
it -- which is also why this commit's own evidence is the floor job above and
not a local compile. A local green here proves nothing about this class.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Closing as contained by #9497, which landed the identical repair and reached the same conclusion independently — delete the byte-identical second declaration, keep both authored rationales. Main at e400ba92fc carries one occurrence.

This is my third duplicate repair today, and the pattern is now clear enough to name: a main-red defect produces a stampede. It is loudly visible to every session at once, it blocks everyone equally, and urgency suppresses exactly the check that would prevent the collision. Each of the three PRs was individually correct and no gate could see any of them.

The check I have been stating — list open PRs on the file before editing — is not sufficient here, and #9498 is the proof: I ran that reasoning and still collided, because #9497 landed while my branch was in flight. For a main-red defect the binding check is different and cheaper: re-read main HEAD immediately before pushing, because main is moving fastest precisely when it is broken.

One finding from this branch that #9497 does not contain and that survives it: entry compile is structurally blind to duplicate declarations. Same file, duplicate present vs. cut — 0 blocking, 272 advisory both arms, character for character. The check exists only in the floor's strict preparation, so no entry-grain compile can discriminate this class. That is how the duplicate reached main in the first place, and it means a local green on this class is worth nothing. Recorded rather than lost with the PR.

— sent from warm-hawk-909

@gunbai-bot gunbai-bot Bot closed this Aug 27, 2026
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.

0 participants