Repository navigation
Regen cost shape: one corpus read, rustfmt once per distinct input (memo + verified per-version cache), rustfmt_spawns on the receipt - #9738
Merged
Conversation
…k and an armed ledger, the regen host stamps its phases, and claim_executor --regen-round-cost prices one convergence round through gunbc.regen_round_cost Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
…enderer and the process-tree clock Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
…laced executable reaches the typed refusal Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
…carried on the receipt, not a refusal of the measurement; regen the runtime template mirror (v1_compiler_runtime_rust.rs) from round 1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
… the start path a rebuild may have re-linked Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
…the affected-set measurement Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
…ash for the affected-set measurement" This reverts commit 677988a.
…ith its residual) and the measured cost shape, from the two planted-edit rounds Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
…tfmt normalizes each distinct input once (memo + verified per-version disk cache); rustfmt_spawns on the receipt Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
…t rows over std.measure Nanosecond on a named clock, never a bare Int with the unit in the field name (review 57566) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
… and the stray probe file dropped (review 57570); build.rs reads git state without refreshing the index it watches Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
… required floor plans it (it is a self-host regen instrument) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Aug 30, 2026
… 57579 on #9738) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L
gunbai-bot Bot
added a commit
that referenced
this pull request
Aug 30, 2026
… a .dag edit can change (reverse closure + declared v1_rt.rs bootstrap edge + generation-input roster), refusing when the edited set is unlocatable (#9744) * The affected set of one edit: gunbc.regen_affected_set bounds which mirrors a .dag edit can change -- reverse closure over the regen's own edge index, a declared bootstrap edge for v1_rt.rs, a declared generation-input roster, and a refusal (never a widen) for an unlocatable edited path Realizes regen_round_cost's DerivableNow disposition as an authority a regen can consume. `claim_executor --regen-affected-set` reads the floor's diff range, names each edited .dag as a module, and prints the model's bound; the host's native reverse walk is held to the model's answer on every run. The three measured edits of 2026-08-30 are the live-tree controls. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L * RUSTFMT_SPAWNS counts normalize spawns, not the version probe (review 57579 on #9738) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L --------- Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Claude Fable 5 <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.
Regen cost shape: steps 1 and 2 of the round-cost follow-up (stacked on #9735, now merged)
Before/after by phase from the instrument #9735 landed (
claim_executor --regen-round-cost --source-root dag --source-root src/v2), all on srv1, all at the fixed point (changed_paths=0), wall_ms.Step 1 — one corpus read; rustfmt once per distinct input
compile_stage0takes the sources its caller already read (corpus_reloadphase deleted from the model and the host).ResolvedFormattergains a memo keyed by the raw input bytes (shared by the three consumers:write_emitted_tree,compare_generated_surfaces,tree_digest_from_map) and a per-rustfmt-version disk cache undertarget/stage0-regen-rustfmt-cache/<version>/, whose entries store the raw input beside the normalized output and are honoured only when the stored raw is byte-equal to the request (a digest names the location, never the identity).rustfmt_spawnsis on the receipt (gunbc.regen_round_cost), so the fixed-point claim is checked against the count.(
seed_build/rebuild_from_installedin the two "after" columns are step 2's defect firing — see below; the regen process itself went 480 s → 394 s, and the three rustfmt passes 97 s → 0.13 s at the fixed point.)Step 2 — why a one-crate release build cost 228–395 s inside every round
Not sccache, not the profile, not a discarded
target/:src/v1/stage0/build.rsdeclaresrerun-if-changedon.git/index(and HEAD/refs) and then runsgit status --porcelainduring its own run, which refreshes the index — so the build that follows any build sees a changed input, reruns the script and recompiles the wholev1-compilercrate with nothing changed. Measured on a quiescent separate worktree (srv1, treefce29f50): cold 444 s → no-change build 382 s → aftergit status0 s → dirty flips 365 s / 400 s → 0 s. Inside the instrument the same thing fired asseed_build_compiled_crates=1 rebuild_compiled_crates=1atchanged_paths=0(rounds above: 371 s + 404 s, 354 s + 355 s).Fix:
git --no-optional-locks …inbuild.rs, so reading git state no longer writes the index the script watches. Proof on the same quiescent worktree at27e9915c: after-fix build 393 s (real change) → no-change 0 s → aftergit status0 s. The rebuilt-from-installed proof is unchanged: the rebuild still runscargo buildagainst the installed tree andGUNBC_BUILD_IDENTITYstill flips on any real change (a dirty tree, a new commit).After receipt (tree
27e9915c, srv1, fixed point):Round total on this host: 1103–1179 s (steps 1 + 2 defects) → 376 s, with the two cargo builds at 130 ms / 145 ms and rustfmt at 20 spawns (the merge from main brought 9 changed mirrors through the cache once).
What remains of a fixed-point round is the emit (261 s, single-threaded) and the corpus read (55–59 s); a round with a real edit adds one genuine crate compile (~6 min on srv1 under load, ~4 min on a 6-core runner) because every mirror is one crate.
Also in this PR (review 57570 remarks on #9735)
Counts are
Nat; the stray.regen-probe-untrackedswept in by the shared-filesystem experiment is removed.Evidence: ten
.dagwitnesses green on srv1; both Rust lockstep tests green remotely on this head; clippy clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L