Skip to content

The emitter shipped its own mirror one generation behind: main's regen has refused every run since #8691 - #8969

Merged
briansrls merged 1 commit into
mainfrom
x/emit-rust-mirror-fixed-point
Aug 23, 2026
Merged

briansrls merged 1 commit into
mainfrom
x/emit-rust-mirror-fixed-point

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

main has been red on witnesses since #8691 merged. Every run since 1caf8d519 fails with one unchanging signature:

required-regen: first_generation_equal=false planned=132 executed=132 declared_divergent=1 [main.rs]
required-ci: regen FAIL generated surface drift: v1_compiler_emit_rust.rs

The cause

#8691 taught the emitter to drop the no-op sharing.iter_owned receiver clone, and committed a mirror of the emitter emitted by the old binary. The new emitter has therefore never been at its own fixed point. Build the committed mirror, emit with it, and three sites come back without the clone the committed file still carries:

-  for p in parts.clone().iter().cloned() {
+  for p in parts.iter().cloned() {

That is the entire drift: three lines, one file, and exactly one file out of the 132-module candidate tree differs. first_generation_equal=false is the tool saying precisely this. #8691's change is correct — only its second bootstrap generation was never taken.

Bisect

commit result
f2d1ae7e1 success (last green)
1caf8d519 (#8691) failure
every main run since failure, same signature

Reproduced locally from origin/main byte-for-byte before making any edit.

The fix is the sanctioned route, not a hand-edit

The mirror installed here is the candidate the regen itself produced at target/stage0-regen-candidate. Production precedes adjudication, so the artifact a refusal names is the artifact the author installs. Hand-authoring these three lines would have reached identical bytes and proved nothing — that is the laundering the fixed-point work closed one gate over, and it is not re-opened here.

Verified by execution

On the rebuilt binary, not the one that emitted the candidate:

  • --required-regen generation 2 → first_generation_equal=true, exit 0
  • re-emitted candidate byte-identical to the committed file
  • cargo fmt --all --check clean — the artifact remains a fixed point of the formatter, so both normalizing consumers still agree

Not claimed

This restores the fixed point #8691 left un-taken. It adds nothing that would have caught the gap. Nothing refuses a one-generation-stale mirror except the next run of the gate that just spent a day red; closing that is a separate question from getting main green.


Found while investigating unrelated CI failures on #8932. Two independent failures were in play — see the PR discussion for the spawn rustfmt: No such file or directory flake, which is a concurrency defect in the shared runner $HOME and is not addressed here.

🤖 Generated with Claude Code

https://claude.ai/code/session_017HBx8dnz3oCiiHXoSBdtH2

…n has refused every run since #8691

#8691 taught the emitter to drop the no-op `sharing.iter_owned` receiver clone
where syntactically provable safe, and committed a mirror of the emitter that
was itself emitted by the OLD binary. So the new emitter has never been at its
own fixed point: build the committed mirror, emit with it, and three sites come
back without the clone the committed file still carries.

    -  for p in parts.clone().iter().cloned() {
    +  for p in parts.iter().cloned() {

That is the whole drift -- three lines in one file, and exactly one file out of
the 132-module candidate tree differs. `first_generation_equal=false` is the
tool stating precisely this, and it is not a defect in #8691's change: the
change is correct, only its second bootstrap generation was never taken.

BISECT. main is green through f2d1ae7 and has failed EVERY witnesses run since
1caf8d5 (#8691) with one unchanging signature, `required-ci: regen FAIL
generated surface drift: v1_compiler_emit_rust.rs`. Reproduced locally from
origin/main byte-for-byte before any edit.

THE FIX IS THE SANCTIONED ROUTE, NOT A HAND-EDIT. The mirror installed here is
the candidate the regen itself produced at target/stage0-regen-candidate --
production precedes adjudication, so the artifact a refusal names is the artifact
the author installs. Hand-authoring these three lines would have reached the same
bytes and proved nothing; that is the laundering the fixed-point work closed one
gate over, and it is not re-opened here.

VERIFIED BY EXECUTION, on the rebuilt binary rather than the one that emitted it:
  - `--required-regen` generation 2: first_generation_equal=true, exit 0
  - re-emitted candidate is byte-identical to the committed file
  - `cargo fmt --all --check` clean -- the artifact remains a fixed point of the
    formatter, so its two normalizing consumers still agree

NOT CLAIMED: this restores the fixed point that #8691 left un-taken. It does not
add anything that would have CAUGHT the gap -- nothing refuses a mirror that is
one generation stale except the next run of the gate that just spent a day red,
and closing that is a separate question from getting main green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HBx8dnz3oCiiHXoSBdtH2
@briansrls
briansrls merged commit 52fee11 into main Aug 23, 2026
1 check passed
@briansrls
briansrls deleted the x/emit-rust-mirror-fixed-point branch August 23, 2026 01:54
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