Repository navigation
Write down the stage0 mirror fixed point: one regeneration is never enough - #9116
Merged
Merged
Conversation
…the expensive way A .dag compiler-authority edit refuses until its regenerated mirror is committed, and the obvious move -- regenerate once, commit -- is wrong for a reason that is the bootstrap rather than a bug: the first candidate is the new .dag emitted by the OLD compiler, so committing it changes what the compiler emits and the next generation differs again. gunbc#9101 took two rounds and my first attempt was rejected by CI carrying only generation one. Records the loop, the verification steps that make "these are the compiler's bytes" checkable rather than asserted, the diff-transport trick for when the loop cannot run where the commit happens, and the branch-versus-merge-ref ruling with its honest limit -- one instance of transfer establishes that it can hold, not that it is automatic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ot a digest Both from review in the side thread, both real defects in the note. 1. The note generalized #9101's three-generation history into "one round is never enough". A behaviour change no other seed module exercises can leave generation two identical to generation one -- no second drift, and the second regeneration is STILL mandatory because it is what proves equality. The law is about the equality check, not about expecting a second drift: one drift-producing regeneration may be enough; one regeneration without a subsequent equality check never is. 2. The note claimed a byte count makes "these are the compiler's bytes" checkable. It does not, and this is the step the entire no-hand-authoring claim rests on. A count proves transport length and catches truncation; two different patches can share one, and git apply --check proves applicability rather than equality to the producer's output. A SHA-256 beside the count closes it, and the note now carries the full evidence chain. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Docs-only. Instrument knowledge this lane produced by having CI reject a PR, written down so the next lane touching a
src/v1/*.dagcompiler authority does not re-derive it.The trap
--required-regenrefuses a.dagauthority edit until its regenerated stage0 mirror is committed. The obvious move — regenerate once, commit the result — is wrong, and for a reason that is the bootstrap rather than a bug: the first candidate is the new.dagemitted by the OLD compiler. Committing it means the compiler built from that mirror now carries the new behaviour, so when it regenerates it re-emits every other module the change reaches.On #9101, whose change altered how folds with an unused element emit:
std_types.rslist_lengthis itself a fold with an unused element. It is not unrelated cleanup riding along with the fix — it is the same change reaching a module generation one had not yet re-emitted. The generation-one delta is not the mirror change, and a PR carrying only it passes locally and refuses in CI. That is exactly what happened to me.What the note records
RC=0/first_generation_equal=true);git apply --check. The mirror's only sanctioned author is the compiler, and a hand-authored mirror is indistinguishable from a regenerated one in the diff alone;v1-compilerbuild unaffordable in a shared memory slice, mirror files too large for a log): move the diff, not the files;On that last point
CI regenerates on the merge ref; the loop runs on the branch tree. Different trees whenever the base has moved, so convergence on one does not entail convergence on the other. The note says: iterate against the branch tree while authoring, and treat merge-ref convergence as a separate acceptance fact supplied by CI.
#9101 is one instance where the transfer held. The note says that establishes it can, not that it is automatic — a base moving under a branch can require another round, and the honest response is another iteration rather than an assumption that the branch result carries.
One accuracy note carried in the doc itself: the three-row table is the sequence across the whole exercise, not one command's output. Generation 1 was committed on its own before CI refused with
drift: std_types.rs; the loop then reported the remaining two rounds numbered from where it started. The doc says so rather than presenting a reconstruction as a transcript.🤖 Generated with Claude Code