Skip to content

required_regen_host: fixture supplies its partition rows; decode via wire authority; budget precondition stated as a red - #12367

Merged
gunbai-bot[bot] merged 4 commits into
mainfrom
session/clever-cat-758
Sep 27, 2026
Merged

gunbai-bot[bot] merged 4 commits into
mainfrom
session/clever-cat-758

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

What was actually failing (attribution, §6b)

cargo test --release -p v1-compiler --lib required_regen_host at main 46b0b2cca1, at #12255's parent and at #12171's parent:

Earliest unjustified boundary: compile_stage0 read its admission inputs (host-shell roster and partition package graph) from the live seed tree inside the function. A witness over a three-module fixture had no way to supply the package graph its population is built under, so it was judged against the seed's rows, which name none of its modules. The admission was right. Its inputs were not at the interface.

Changes

  1. One route, parameterized by the supplied package graph. compile_stage0_admitted(sources, selection, host_shell_modules, packages) does the emission and edge admission. Production compile_stage0 is a thin wrapper that calls it with the seed tree's host shell and emitted_tree_packages, so there is no test-only copy of the pipeline. The fixture supplies selection_fixture_packages, which has the seed's shape at fixture scale: v1_rt (rust_runtime_prelude_module) in a foundation crate, and the three modules in a layered core crate that re-exports it. So each prelude edge is admitted by the partition's own layering rule. The admission is unchanged. New RED control: the_fixture_refuses_as_not_covered_without_its_partition_rows (same fixture with no rows → Stage0EmittedEdgesNotCovered naming fx_beta).
  2. Follow-up (a): the hand-restated decoder is removed, not recorded. A decode authority exists (value_to_wire_json → serde_json::from_value, as in namespace_baseline decode_environment_value), so emitted_tree_packages decodes the rows, shell name and shell deps into the mirror types through it. GeneratedPartitionCrateRow and the kind variants are no longer restated, and an unrepresentable row refuses as undecodable. Inhabitance claim for the real read: the_emitted_tree_package_graph_decodes_to_the_compiled_rows_at_a_settled_head.
  3. Budget boundary (operator pick). require_measurable_host_budget() opens each of the 14 live-corpus claims and the decode claim. With no readable bound it panics NOT MEASURED: host budget unreadable (...): still red, never a pass, now located at the claim. The scope-repair control's formatter arm, Err(_) => return, was a vacuous pass (its comment claimed the opposite); it now panics NOT MEASURED too. New row: gunbc.recurring_failure_mode missing_precondition_reported_as_a_pass.
  4. Follow-up (b): justified, no code change. gunbc.stage0_partition_rebuild_scope and gunbc.v1.v1_consumer_census have no Rust mirror and no Rust caller. They run only as interpreted .dag over the evaluated source roots, where stage0_partition_package_dependency_names reads that tree's generated_partition_crate_rows, which are the supplied rows by construction. The compiled-rows defect Required-regen admits emitted edges against the emitted tree's own partition (#12171 bootstrap deadlock) #12255 fixed exists only for a mirror running inside a predecessor binary. If either is ever mirrored and run by a predecessor, it must switch to partition_package_dependency_names_over with supplied rows.

Evidence

  • cargo clippy --all-targets -- -D warnings: clean (BuildBuddy).
  • required_regen_host on BuildBuddy (no cgroup): 35 pass; 15 red, all NOT MEASURED: host budget unreadable, as designed. All 25 tests:: pass, including the 4 fixed and the RED control.
  • srv1 with a cgroup bound: pending (requested from neat-boar-16; to be posted here).

🤖 Generated with Claude Code

Brian Searls and others added 3 commits September 26, 2026 18:50
…0_admitted takes the package graph as input

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…state the host-budget precondition as a red; RFM missing_precondition_reported_as_a_pass

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

On the one item review 71608 couldn't verify: the derives hold. Stage0EmittedTreePackages (gunbc_stage0_emitted_edge_admission.rs) derives Debug, Clone, PartialEq, Serialize, Deserialize, and GeneratedPartitionCrateRow and GeneratedPartitionCrateKind carry the same emitted derives (the kind with #[serde(tag = "_variant")], the tag policy value_to_wire_json encodes). This is also established by execution: cargo clippy --all-targets -D warnings compiles the serde_json::from_value::<im::Vector<Rc<GeneratedPartitionCrateRow>>> decode, the ..(*selection_fixture_packages()).clone() spread and the assert_eq! on rows, and the tests:: group ran green on it. No change needed. The srv1 run under a cgroup bound is still pending, and it is the first execution of the decode claim itself.

— sent from clever-cat-758

… existing one

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

0f555a2: convergence fixture owns a fresh root. Six regen_convergence_host_instrument_tests failed on srv1 at fc159acd3f, at fs::write(...).unwrap() in fixture_workspace, not in the git call. Cause (confirmed on srv1 by neat-boar-16): the root was keyed only on <pid>-<counter> under a shared /tmp. srv1's /tmp held 3848 such dirs, 3826 owned by ghrunner (the CI runner sharing srv1), so a pid collision wrote into another user's leftover tree and failed on permission. The root now also carries wall-clock nanos and is created with create_dir, so an existing root refuses, located, and is never reused. Clippy --all-targets -D warnings is clean at this head.

Known residue, not fixed here: these fixtures still leak their root when a test fails (remove_dir_all runs only on success), which is how the shared runner accumulated thousands. The fix is a Drop guard owning the root. That changes fixture_workspace's return shape at every call site, so I'm leaving it out of this PR to keep the srv1 qualification of this head valid. It's a small follow-up.

— sent from clever-cat-758

@gunbai-bot

gunbai-bot Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

srv1 qualification at 0f555a28ea (run by neat-boar-16 inside systemd-run --user --scope -p MemoryMax=40G): cargo test --release -p v1-compiler --lib required_regen_host gives 50 passed, 0 failed, 1 ignored. That covers the 4 fixture tests, the NotCovered RED control, the 14 live-corpus claims under a readable budget, the 6 convergence fixtures, and the decode inhabitance claim (the first execution of the wire-decode path). The ignored test is the pre-existing live-corpus dag_artifact_identity_control_holds. Clippy --all-targets -D warnings is clean at this head.

— sent from clever-cat-758

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 26, 2026
Merged via the queue into main with commit 2f27bd9 Sep 27, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/clever-cat-758 branch September 27, 2026 01:37
@briansrls
briansrls restored the session/clever-cat-758 branch September 27, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants