Repository navigation
Regen round cost: claim_executor --regen-round-cost prices one convergence round on two clocks through gunbc.regen_round_cost, and the affected-set disposition - #9735
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
…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
|
Addressed review 57566 in fce29f5: |
Regen round cost: a named phase-breakdown instrument + affected-set scoping
Deliverable 1 — the instrument.
claim_executor --regen-round-cost --source-root dag --source-root src/v2runs ONE convergence round exactly asgunbc.generated_artifact_merge_driver generated_artifact_merge_driver_repair_stepsprescribes it — seed build → the samerun_required_regenthe required phase runs → install of the drifted mirrors → rebuild from the installed seed → diff — and prints every phase on two clocks (wall, process-tree CPU), rendered bygunbc.regen_round_cost regen_round_cost_renderthrough the interpreter (no Rust copy of the format). It extends the existing instrument rather than adding one:v1_rt::trace_mark(emitted fromv1.compiler.runtime_rust) gains a CPU reading per mark and an armed ledger; the regen host stamps its own phase boundaries under the labelsgunbc.regen_round_cost regen_round_phase_labelnames; compile.dag's existing marks are consumed unchanged. Receipt also lands attarget/stage0-regen-round-cost.txt.Fail-closed arms: the emitting seed must be the built seed (executable bytes digested before/after the seed build; a changed binary refuses with the reason); a refused regen stops the round at emit with no install; a failed rebuild-from-installed is carried on the receipt as a round failure (the phases before it are measured facts) and fails the exit code; an unreadable CPU clock renders
na, never 0, and poisons the total.Evidence:
dag/test/claim/regen_round_cost_witness_test.dag(9 fns incl. two RED controls, alltrueon srv1 via the builtgunbc), and two Rust lockstep tests inrequired_regen_host.rs(host_built_receipt_renders_through_the_modelis byte-exact against the model; run remotely, green).Two receipts, one edit (planted
datarow instd.content_hash, tree677988a2, clean):BuildBuddy runner
192.168.241.2(6 cores, 7 GiB):srv1 (128 cores, load ~50 during the run):
Fixed-point control (no edit, tree
75bc5007, srv1): total 480.7 s wall / 480.9 s CPU,changed_paths=0,first_generation_equal=true.What the instrument says (shape, not transcribed as a claim beyond these trees):
cargo builds of the seed are ≈60 % of a real round (BuildBuddy 228 s + 239 s; srv1 under load 395 s + 366 s) for a ONE-mirror change, because every mirror compiles into one crate. The change-denominated cost lives in the rebuild, not the emit — so the addendum's D3 (shard the emit) condition (“emit is the dominant share”) is NOT met and D3 was not built.corpus_loadthencorpus_reloadinsidecompile_stage0, 53 s/77 s), and rustfmt normalizes the whole population three times (mirror_write,adjudicate,digest: 67 s/97 s). Both are fixable and are not fixed here (measurement lane).0fe2c517) had the stale seed emit the OLDv1_rt.rsover the hand-synced one and the rebuild refused; round 2 (tree75bc5007) reached the fixed point.Deliverable 2 — affected-set disposition (
gunbc.regen_round_cost regen_affected_set_disposition): DerivableNow from the closure the regen already builds (cli_run regen_input_sources_over_roots/extend_sources_to_both_closure_fixpoint: imports + dotted + bare refs), read in reverse from the edited module and restricted to the compared mirrors, plus the runtime template products. Evidence by identity: (1) editv1.compiler.runtime_rust→ drift{v1_compiler_runtime_rust.rs, v1_rt.rs}vs 9 predicted (v1_rt.rsis the one dependent outside the import graph: the template's product, emitted from the string baked into the emitting seed); (2) editstd.content_hash→ drift{std_content_hash.rs}vs 72 predicted, on both hosts. The bound is an over-approximation; the residual is the seed's own baked mirrors as a generation-level input (the bootstrap), and exactness needs the per-module emit. The cross-module state named in the model (reference_derived_use_linesclosure-wide args) stays inside the reverse closure, so it does not break the bound.Also fixed on the way:
resolved_graph_cache::transform_content_digestreadcurrent_exe(), which becomes… (deleted)after any in-process rebuild re-links the binary; it now reads/proc/self/exe(the running image) on Linux. Observed on both hosts: the in-roundcargo buildrecompiled thev1-compilercrate once more after an identical build in the same shell (seed_build_compiled_crates=1, byte-identical output) —src/v1/stage0/build.rsdeclaresrerun-if-changed=src; attributable, not chased here.Not built, cited for follow-up:
gunbc.witness_floor_workflowruns withcache: falsedeliberately (rust-cache's post step deleted other jobs' files on the shared self-hosted home; the note beside that row says~/.cargopersists across jobs anyway). A cache row there is a candidate only fortarget/, and the receipts show the seed build is the dominant cost of a round, so it is worth pricing separately.🤖 Generated with Claude Code
https://claude.ai/code/session_01KGCnzm2zkb37mVHgrGCt9L