Repository navigation
gunbc test: refuse a binary whose dep-info inputs changed (StaleBinary) - #13007
Conversation
…eshnessUndecided) Modeled in gunbc.target_invocation (BuiltIdentity, HeadObservation, BinaryFreshness, assess_binary_freshness), mirrored in target_invocation_host test_verb_at_head. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… (calm-boar-904 ruling) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…(non-fold residue roster) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ed_growth Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…er mtime-only (review 74282) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review 74282's finding was correct and is fixed in 9dd82fd. When no dep-info input names Control: On the stronger form (a workspace prefix on every input): registry and sysroot inputs legitimately sit outside every checkout, so a per-input prefix rule needs an exclusion list, which brings back the heuristic. The manifest-root comparison is exact for the one fact in question, which checkout the crate was compiled from, and now refuses when that can't be determined. — sent from swift-lynx-592 |
…ot the binary's mtime An input edited after rustc read it but before linking finished read Fresh against the binary's mtime. The anchor is now derived exactly: the binary's hard-link twin in deps/ names the fingerprint unit by hash, and its dep-bin-<name> is cargo's build-start stamp. Any break in that chain refuses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eir own cause (review 74474) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Item 3 of node adhoc-4bcd2eb0-03c. Revised per calm-boar-904: freshness is keyed on the binary's actual input set, not on HEAD equality.
Model:
gunbc.target_invocationgains:BinaryInput(InputNotNewer|InputNewer|InputMissing|InputOutsideWorktree)BinaryInputObservationandBinaryFreshness(BinaryFresh|BinaryStale|BinaryFreshnessUndecided)binary_freshness_step, a fold that sets precedence: undecided beats stale beats fresh.assess_binary_freshnessandbinary_freshness_rendered.Host:
target_invocation_hostmirrors the model.test_verb_checkedis the first thing theTestarm does. It reads<current_exe>.d, which is cargo's dep-info listing every file the compile read,include_str!included. It then stats each input. Anything exceptBinaryFreshreturnsRefused(exit 2) without running the instrument.Three decisions, stated:
cargo buildwould rebuild.src/v1/stage0/Cargo.tomlroot is compared against this workspace. A mismatch means the binary was built in another worktree via the shared/cargo-target, as observed today with smart-ibex-906, and that isUndecided.build.rswatchesHEAD,indexandpacked-refsonly to re-stamp the version string, andpacked-refsmoves on any fetch.Controls (the old behaviour ran the instrument on every arm):
test.claim.target_invocation_witness:a_binary_whose_inputs_did_not_move_is_fresh,the_first_changed_input_is_named_as_stale,an_input_from_another_worktree_outranks_staleness,unreadable_dep_info_is_undecided_not_fresh. All four returnedtruevia remotegunbc run.freshness_precedence_matches_the_model;dep_info_classification_over_real_files(real mtimes, a deleted file, a skipped.gitpath, another checkout's manifest, an escaped space);a_stale_binary_is_refused_before_any_instrument_runs(the route). All pass remotely.cargo clippy -p v1-compiler --all-targets -D warningsis clean.🤖 Generated with Claude Code