Repository navigation
XL-R-3: change-denominated compile.emit -- render only affected modules; path-only lib_rs/manifest aggregates proven content-independent; text/integer stub predicates re-grounded total on the resolved graph; byte-identical planted-edit and unscoped controls - #9776
Merged
Merged
Conversation
…om paths and the graph Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YM4QYhNNZSapeLZUTQv6V
…s could not see Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YM4QYhNNZSapeLZUTQv6V
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YM4QYhNNZSapeLZUTQv6V
…e emitter's declaration Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YM4QYhNNZSapeLZUTQv6V
gunbai-bot
Bot
force-pushed
the
session/bright-seal-86
branch
from
August 31, 2026 00:43
0f98a45 to
1736317
Compare
… compile.emit paid to answer false Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YM4QYhNNZSapeLZUTQv6V
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Aug 31, 2026
…, XL-R-4A rebuild scope #9765, DESIGN placement plan #9769). Conflicts: 5 regen-owned stage0 mirrors taken ours from the ef328db8 converged tree — regen fixes forward; main's hand-maintained required_regen_host.rs auto-merged from main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXfYKNQTD3VfYyQcnJpxNU
This was referenced Aug 31, 2026
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.
XL-R-3: render only the modules a change can move; derive the population-denominated answers from paths and from the resolved graph.
XL-R-2 (#9757) landed the selection and let a scoped round adjudicate only the mirrors one edit can change. Emit still rendered all 143. This makes the render itself change-denominated.
The split that makes a scoped emission a subset rather than a different answer
A scoped emit renders fewer files. Everything it declares about the whole crate must not move, or the round silently ships an E0583 in a crate nobody re-rendered.
emit_lib_rs_from_paths/emit_emitted_population_manifesttakeList<String>. Content independence is the parameter type, not a claim about the body: there is no content there to depend on. A crate'smodblock is a statement about which files exist, never about what is in them.closure_needs_module_filename_stubis total under every scope.import_refusalsare observed only for rendered modules, and that is exact. An emit carrying an error diagnostic returns no files, so a committed mirror is a file some clean emit produced and the unrendered modules had nothing to say. The argument is carried by thefinal_filesconstruction that makes it true, withan_emit_that_refuses_hands_back_no_filesas its discriminating red.committed_not_emittedand the population identity join would be scoped by accident — the one thingv2.workflow.required_regensays may never be scoped.Evidence
Planted-edit control — one function added to
dag/std/keyed_row.dag, both arms on the shipped emitter:WholePopulationScopeAffectedScope members=71diff -rqover the whole installedsrc/v1/stage0/src: 0 differing files. Byte-identical at identity grain across all 143 mirrors.Two named vacuity guards run in the harness beside that table, and they are why the agreement claim means anything:
regen-scope: AffectedScope members=[1-9]. AWholePopulationScopehere would mean the scope never narrowed and the two arms are the same procedure compared against itself.changed_paths. A zero would mean the planted edit moved no bytes, so both arms install nothing and the trees agree for the wrong reason.Both fired on earlier attempts and stopped the result being reported. An empty diff is the success signal and the signature of two arms that never executed; the guards assert the preconditions for the answer to mean anything, which the answer itself cannot do.
Unscoped control — CI's whole-population regen on the
.dagchange reported drift in exactly the modules edited, withlib.rsandemitted_population.rsabsent: the re-grounding moved no emitted byte elsewhere, and added or dropped no stub.Five unit controls (
required_regen_host::tests, running incargo test -p v1-compiler --lib) driveRenderSelectedMirrorsthroughcompile_stage0, the real production entry. Proven discriminating rather than assumed: mutating the aggregates to derive from rendered files turns 3 red; reverting returns 18 pass.Cost, stated against what it does not buy
compile.emit260.0 s → 213.0 s (−18.1%); round 366.4 s → 298.9 s (−18.4%). Instrument:claim_executor --regen-round-cost,phase=compile.emit. Noise is bounded by a replicate of the whole arm on the same emitter — 256 098 ms and 260 007 ms, 3.9 s apart, against a 47 s effect.Rendering half the modules buys 18%, so per-module rendering is about a third of the phase and
build_emit_rust_context— whole-graph work no selection can narrow without losing correctness — is the rest. This does not reach the "163 s of a 465 s round" the phase's headline suggests. The decomposition is the point: per-module rendering is ~1/3 ofcompile.emit,build_emit_rust_contextis the rest. The next target is therefore the preamble, not the fold — and that is explicitly out of this lane, a separate approved lane if it is wanted, not follow-up work implied by this PR.A regression is included in that accounting: the first version of the resolved-graph predicate walked every module through
repair_input_origin_candidatestwice, costing 288 s and takingcompile.emitfrom 258 s to 546 s. Isolated with a probe that short-circuited the predicate and left emitted bytes unchanged, then fixed exactly — ause crate::X::nameline requiresnameto resolve through the registry to a module with filenameX, soregistry_declares_module_filenameanswersfalsewithout walking anything. Every correctness control was green for the entire life of that regression — the output was byte-perfect the whole time the phase ran at 2.1x cost. Only the round-cost receipt showed it, and I had been treating that receipt as an artifact to collect at the end rather than as an instrument to read while working. A cost-shape defect is invisible to every check that asks whether the bytes are right.Standing limitation a reviewer should know
This PR's scoped path cannot be exercised by this PR's own CI.
regen_affected_setanswersWholePopulationfor any edit underregen_generation_input_prefixes(v1.compiler.,extdeps.languages.), and this branch edits threev1.compiler.*modules — so every round on this branch is whole-population regardless of what is planted on top. That is the bound behaving correctly. The scoped arm's standing evidence is the five unit controls plus the hand-run corpus control above; a green build lane here does not cover it.