From 1f9182cdb012c6cc05b98ec75d3fc8f68492c260 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 5 Aug 2026 19:49:23 +0000 Subject: [PATCH 01/11] WIP: PR A: reuse one v1-compiler build across release bins and the compile-co --- dag/gunbc/ci_spec.dag | 4 ++-- .../workflow/ci_v1_compiler_tests_compile_gate_emit.dag | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dag/gunbc/ci_spec.dag b/dag/gunbc/ci_spec.dag index 53903ad5a9e..c3f9f860fa6 100644 --- a/dag/gunbc/ci_spec.dag +++ b/dag/gunbc/ci_spec.dag @@ -227,7 +227,7 @@ data gunbc_ci_compile_clean_clamp_note: String = "COMPILE-CLEAN LEG CLAMP (prelu data gunbc_ci_compile_clean_clamp: RunnableBatchClamp = RunnableBatchClamp { overhead: second(count: 60), per_unit: millisecond(count: 320) } -data ci_release_features: String = "text_lookup_work_counter" +data ci_release_features: String = "text_lookup_work_counter,interp_test_witness,test_hooks" fn ci_release_build_line() -> String { concat( @@ -249,7 +249,7 @@ fn ci_fmt_gate_line() -> String { "\"$CARGO_BIN\" fmt --all --check" } -data ci_v1_compiler_tests_compile_gate_note: String = "cargo check -p v1-compiler-tests --tests, RE-ENROLLED 2026-07-31 (operator ruling, PR #7490 repair): the nextest RUN half of commit_gate_rust_suite_removed_disposition stays retired (~37 GiB, seed-runtime red), but #7490's typecheck_module signature migration updated stage0 call sites and left four direct integration-test callers stale on main — compile breakage invisible to DagCompileCleanGate (dag-only) and the release build (v1-compiler stage0 only; v1-compiler-tests is a separate workspace crate). This is the fmt-amendment pattern applied to the missing COMPILE half: compile-only, no test execution, ~41s measured cold on the repair host — not RustMonolithGate re-enrollment. Placement: build job immediately after fmt, before the ~33min release build. Operation shape and shell scaffold: v2.workflow.ci_v1_compiler_tests_compile_gate_emit (extdeps.cargo_build cargo.Build.Check)." +data ci_v1_compiler_tests_compile_gate_note: String = "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; no test execution), RE-ORDERED 2026-08-05 (operator ruling, PR A / fierce-heron-177): runs AFTER the release build so the gate reuses the release-profile v1-compiler artifact instead of forcing a second dev-profile compile. ci_release_features now carries interp_test_witness and test_hooks so the release build and the test crate share one effective feature set. Affected-set admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with src/v1/tests/**, src/v1/stage0/**, and the Cargo/toolchain build config; disjoint diffs skip with a typed CompileContractAdmissionReceipt (decision=Skip). Diff observation failure / empty diff / departed closure paths RUN unconditionally (fail-closed, never skip on unknown). push-to-main and scheduled controls run the gate unconditionally. Operation shape: v2.workflow.ci_v1_compiler_tests_compile_gate_emit (extdeps.cargo_build cargo.Build.Test)." fn ci_retry_body_run(command: String) -> Run { Run { diff --git a/src/v2/workflow/ci_v1_compiler_tests_compile_gate_emit.dag b/src/v2/workflow/ci_v1_compiler_tests_compile_gate_emit.dag index 1bb76438825..0174deb2dd4 100644 --- a/src/v2/workflow/ci_v1_compiler_tests_compile_gate_emit.dag +++ b/src/v2/workflow/ci_v1_compiler_tests_compile_gate_emit.dag @@ -22,17 +22,18 @@ import v2.workflow.effect_plan_bash_materialize { data ci_v1_compiler_tests_compile_gate_extra_args: List = [ "-p", "v1-compiler-tests", - "--tests" + "--release", + "--no-run" ] data ci_v1_compiler_tests_compile_gate_cargo_path: String = "dag/extdeps/rust/cargo_build.dag" data ci_v1_compiler_tests_compile_gate_cargo_service: String = "cargo.Build" -data ci_v1_compiler_tests_compile_gate_cargo_operation: String = "Check" +data ci_v1_compiler_tests_compile_gate_cargo_operation: String = "Test" data ci_v1_compiler_tests_compile_gate_cargo_bin_env_var: String = "CARGO_BIN" data ci_v1_compiler_tests_compile_gate_refusal_prefix: String = "__GUNBC_EFFECT_PLAN_BASH_REFUSED__ v1-compiler-tests compile gate: " -data ci_v1_compiler_tests_compile_gate_authority_note: String = "Build-job compile gate for the v1-compiler-tests workspace crate. Wave B typed carrier: one extdeps.cargo_build cargo.Build.Check invocation bound by name; Bash realization supplies HostEnvVar for ci_v1_compiler_tests_compile_gate_cargo_bin_env_var so the pin-rustup prelude env var renders through bash_build_word_var in effect_plan_bash_materialize — not a post-emission string substitution and not fused into the agnostic BoundOperationInvocation substrate. argv tail tokens remain declaration-derived; GitHub Actions run: is still a foreign-executor shell transport scaffold awaiting full orchestration emit." +data ci_v1_compiler_tests_compile_gate_authority_note: String = "Build-job compile-contract gate for the v1-compiler-tests workspace crate. Wave B typed carrier: one extdeps.cargo_build cargo.Build.Test invocation (--release --no-run) bound by name; runs after the release build so v1-compiler is compiled once in release with the same feature set as the test crate. Bash realization supplies HostEnvVar for ci_v1_compiler_tests_compile_gate_cargo_bin_env_var so the pin-rustup prelude env var renders through bash_build_word_var in effect_plan_bash_materialize — not a post-emission string substitution and not fused into the agnostic BoundOperationInvocation substrate. argv tail tokens remain declaration-derived; GitHub Actions run: is still a foreign-executor shell transport scaffold awaiting full orchestration emit." data ci_v1_compiler_tests_compile_gate_shell_emit_scaffold: Disposition = Scaffold { dissolves_to: SingleAuthority, @@ -43,7 +44,7 @@ data ci_v1_compiler_tests_compile_gate_shell_emit_scaffold: Disposition = Scaffo } } -data ci_v1_compiler_tests_compile_gate_shell_emit_dissolution_trigger: String = "🟡 dissolve-on: ci_v1_compiler_tests_compile_gate_script — foreign-executor (GitHub Actions run:) shell transport for extdeps.cargo_build cargo.Build.Check(extra_args: ci_v1_compiler_tests_compile_gate_extra_args); DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) binds the build-job step to orchestration emit over the typed cargo operation — the same de-fork ci_fmt_gate_line and ci_release_build_script await" +data ci_v1_compiler_tests_compile_gate_shell_emit_dissolution_trigger: String = "🟡 dissolve-on: ci_v1_compiler_tests_compile_gate_script — foreign-executor (GitHub Actions run:) shell transport for extdeps.cargo_build cargo.Build.Test(extra_args: ci_v1_compiler_tests_compile_gate_extra_args); DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) binds the build-job step to orchestration emit over the typed cargo operation — the same de-fork ci_fmt_gate_line and ci_release_build_script await" fn ci_v1_compiler_tests_compile_gate_check_step() -> BashBoundOperationInvocation { bash_bind_operation_invocation_host_env_executable( From aaca4e1ae77e0aa8ab27656f39772b9be4c41fd9 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 5 Aug 2026 20:28:58 +0000 Subject: [PATCH 02/11] PR A: one release v1-compiler build + compile-contract admission. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorder build job to fmt → release build → cargo test --release --no-run, align ci_release_features with v1-compiler-tests deps, and add fail-closed change-sensitive admission with typed CompileContractAdmissionReceipt. Regenerate ci.yml and falsifier.yml so workflow drift no longer blocks heal. Co-authored-by: Cursor --- .github/workflows/ci.yml | 46 +++-- .github/workflows/falsifier.yml | 10 +- dag/gunbc/ci_release_bins.dag | 3 +- dag/gunbc/ci_spec.dag | 81 +++++++++ dag/gunbc/ci_workflow.dag | 11 +- ...mpiler_tests_compile_gate_witness_test.dag | 54 ++++-- src/v1/stage0/Cargo.toml | 8 + .../bin/compile_contract_admission_witness.rs | 48 ++++++ src/v1/stage0/src/cli_run.rs | 158 ++++++++++++++++++ ..._compiler_tests_compile_gate_emit_test.dag | 8 +- 10 files changed, 387 insertions(+), 40 deletions(-) create mode 100644 src/v1/stage0/src/bin/compile_contract_admission_witness.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77cfa1ac666..e772854eed2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,11 +98,6 @@ jobs: - name: cargo fmt --all --check (fast gate; fails in seconds, before the release build) run: "\"$CARGO_BIN\" fmt --all --check" timeout-minutes: 5 - - name: cargo check -p v1-compiler-tests --tests (compile gate; no test execution) - run: | - # 🟡 dissolve-on: ci_v1_compiler_tests_compile_gate_script — foreign-executor (GitHub Actions run:) shell transport for extdeps.cargo_build cargo.Build.Check(extra_args: ci_v1_compiler_tests_compile_gate_extra_args); DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) binds the build-job step to orchestration emit over the typed cargo operation — the same de-fork ci_fmt_gate_line and ci_release_build_script await - "$CARGO_BIN" 'check' '-p' 'v1-compiler-tests' '--tests' - timeout-minutes: 15 - name: Build release bins (claim_executor + gunbc) id: release_build run: | @@ -110,23 +105,48 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then + if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" - CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey + CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey else exit 1 fi fi rm -f "$BUILD_LOG" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" sccache --show-stats 2>/dev/null || true timeout-minutes: 45 + - name: cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; reuses release v1-compiler) + run: | + set -e + ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) + # Affected-set-scoped compile-contract admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with the gate's exact input closure (src/v1/tests/**, src/v1/stage0/**, Cargo.toml, Cargo.lock, rust-toolchain.toml, path-dependency manifests, .cargo config). A PR diff touching none of those cannot change the v1-compiler-tests compile contract, so the gate exits 0 immediately with CompileContractAdmissionReceipt decision=Skip. Empty diff / diff observation failure / departed closure paths RUN the gate (fail-closed — unknown state never skips). COLD CONTROL: the skip is gated to pull_request via GITHUB_EVENT_NAME, so push-to-main and scheduled runs execute the gate UNCONDITIONALLY. + if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then + _ci_compile_contract_decision=$("$ROOT/target/release/compile_contract_admission_witness" 2>/dev/null || echo run_compile_contract) + if [ "$_ci_compile_contract_decision" = "compile_contract_not_affected_skip" ]; then + printf '%s\n' "CompileContractAdmissionReceipt: decision=Skip base=${GITHUB_BASE_SHA:-unknown} head=${GITHUB_SHA:-unknown} reason=diff_disjoint_from_input_closure" + exit 0 + fi + fi + _compile_contract_sccache_hits_before=$(sccache --show-stats 2>/dev/null | awk '/Cache hits/ {print $NF}' | head -1 || echo 0) + _compile_contract_sccache_misses_before=$(sccache --show-stats 2>/dev/null | awk '/Cache misses/ {print $NF}' | head -1 || echo 0) + _compile_contract_start_ms=$(date +%s%3N 2>/dev/null || python3 -c 'import time; print(int(time.time()*1000))') + # 🟡 dissolve-on: ci_v1_compiler_tests_compile_gate_script — foreign-executor (GitHub Actions run:) shell transport for extdeps.cargo_build cargo.Build.Test(extra_args: ci_v1_compiler_tests_compile_gate_extra_args); DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) binds the build-job step to orchestration emit over the typed cargo operation — the same de-fork ci_fmt_gate_line and ci_release_build_script await + "$CARGO_BIN" 'test' '-p' 'v1-compiler-tests' '--release' '--no-run' + _compile_contract_end_ms=$(date +%s%3N 2>/dev/null || python3 -c 'import time; print(int(time.time()*1000))') + _compile_contract_wall_ms=$((_compile_contract_end_ms - _compile_contract_start_ms)) + _compile_contract_sccache_hits_after=$(sccache --show-stats 2>/dev/null | awk '/Cache hits/ {print $NF}' | head -1 || echo 0) + _compile_contract_sccache_misses_after=$(sccache --show-stats 2>/dev/null | awk '/Cache misses/ {print $NF}' | head -1 || echo 0) + _compile_contract_sccache_hit_delta=$((_compile_contract_sccache_hits_after - _compile_contract_sccache_hits_before)) + _compile_contract_sccache_miss_delta=$((_compile_contract_sccache_misses_after - _compile_contract_sccache_misses_before)) + printf '%s\n' "CompileContractAdmissionReceipt: decision=Run base=${GITHUB_BASE_SHA:-unknown} head=${GITHUB_SHA:-unknown} compile_wall_ms=${_compile_contract_wall_ms} sccache_hit_delta=${_compile_contract_sccache_hit_delta} sccache_miss_delta=${_compile_contract_sccache_miss_delta} reason=compile_contract_executed" + timeout-minutes: 15 - name: Pack release bins for cross-job handoff (tar keeps exec bits) run: | # 🟡 dissolve-on: ci_release_bins_pack_script — concat-built foreign-executor (GitHub Actions run:) release-bins tar pack runner; membership of archived bin names is derived from gunbc.ci_release_bins, but the pack transport itself remains hand-shell; DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) realizes the pack runner through orchestration emit or typed host_effect_apply without a medium-as-string concat scaffold ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) - tar -czf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" "claim_executor" "gunbc" "regen_floor_skip_witness" "floor_skip_discovery_witness" "selection_control_skip_witness" "discover_source_root_ingest" "claim_batch" "regen_stage0" "interp_recorded_fixture_witness" "v1_src_dag_parse" "auth_declared_but_unwired_witness" "bootstrap_witness" "dag_collect_fingerprint_witness" "diagnostics_witness" "effects_rest_transport_witness" "infer_semantics_witness" "parse_witness" "resolution_divergence_census" "cssl_assemble" "frontier_probe_survey" + tar -czf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" "claim_executor" "gunbc" "regen_floor_skip_witness" "floor_skip_discovery_witness" "selection_control_skip_witness" "compile_contract_admission_witness" "discover_source_root_ingest" "claim_batch" "regen_stage0" "interp_recorded_fixture_witness" "v1_src_dag_parse" "auth_declared_but_unwired_witness" "bootstrap_witness" "dag_collect_fingerprint_witness" "diagnostics_witness" "effects_rest_transport_witness" "infer_semantics_witness" "parse_witness" "resolution_divergence_census" "cssl_assemble" "frontier_probe_survey" timeout-minutes: 5 - name: Upload release-bins artifact uses: actions/upload-artifact@v4 @@ -182,7 +202,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: gunbc ci regen (self-host fixed-point — required) run: | @@ -259,7 +279,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: Floor cgroup peak pre-read (calibration; reset if permitted) run: | @@ -336,7 +356,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: Deploy dashboard to srv1 (live_deploy_apply_srv1_wet) run: | @@ -369,7 +389,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: Converge repository-local Git integration bindings (repo_local_git_config converge) run: | diff --git a/.github/workflows/falsifier.yml b/.github/workflows/falsifier.yml index 9eb1616d431..3fc15d9f0a2 100644 --- a/.github/workflows/falsifier.yml +++ b/.github/workflows/falsifier.yml @@ -74,16 +74,16 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then + if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" - CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey + CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey else exit 1 fi fi rm -f "$BUILD_LOG" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" sccache --show-stats 2>/dev/null || true timeout-minutes: 45 - name: Affected-set selection control (floor_skip_discovery_witness) @@ -103,7 +103,7 @@ jobs: run: | # 🟡 dissolve-on: ci_release_bins_pack_script — concat-built foreign-executor (GitHub Actions run:) release-bins tar pack runner; membership of archived bin names is derived from gunbc.ci_release_bins, but the pack transport itself remains hand-shell; DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) realizes the pack runner through orchestration emit or typed host_effect_apply without a medium-as-string concat scaffold ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) - tar -czf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" "claim_executor" "gunbc" "regen_floor_skip_witness" "floor_skip_discovery_witness" "selection_control_skip_witness" "discover_source_root_ingest" "claim_batch" "regen_stage0" "interp_recorded_fixture_witness" "v1_src_dag_parse" "auth_declared_but_unwired_witness" "bootstrap_witness" "dag_collect_fingerprint_witness" "diagnostics_witness" "effects_rest_transport_witness" "infer_semantics_witness" "parse_witness" "resolution_divergence_census" "cssl_assemble" "frontier_probe_survey" + tar -czf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" "claim_executor" "gunbc" "regen_floor_skip_witness" "floor_skip_discovery_witness" "selection_control_skip_witness" "compile_contract_admission_witness" "discover_source_root_ingest" "claim_batch" "regen_stage0" "interp_recorded_fixture_witness" "v1_src_dag_parse" "auth_declared_but_unwired_witness" "bootstrap_witness" "dag_collect_fingerprint_witness" "diagnostics_witness" "effects_rest_transport_witness" "infer_semantics_witness" "parse_witness" "resolution_divergence_census" "cssl_assemble" "frontier_probe_survey" timeout-minutes: 5 - name: Upload release-bins artifact uses: actions/upload-artifact@v4 @@ -159,7 +159,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: Floor cgroup peak pre-read (calibration; reset if permitted) run: | diff --git a/dag/gunbc/ci_release_bins.dag b/dag/gunbc/ci_release_bins.dag index ea598a69b00..70fa41f4774 100644 --- a/dag/gunbc/ci_release_bins.dag +++ b/dag/gunbc/ci_release_bins.dag @@ -23,7 +23,8 @@ data ci_floor_invoked_bins: List = [ "gunbc", "regen_floor_skip_witness", "floor_skip_discovery_witness", - "selection_control_skip_witness" + "selection_control_skip_witness", + "compile_contract_admission_witness" ] data witness_declared_release_bins: List = [ diff --git a/dag/gunbc/ci_spec.dag b/dag/gunbc/ci_spec.dag index c3f9f860fa6..a82fea07a47 100644 --- a/dag/gunbc/ci_spec.dag +++ b/dag/gunbc/ci_spec.dag @@ -50,6 +50,9 @@ import gunbc.merge_admission_produce { import v2.workflow.ci_regen_rustfmt_path_emit { ci_regen_ensure_rustfmt_path_script, } +import v2.workflow.ci_v1_compiler_tests_compile_gate_emit { + ci_v1_compiler_tests_compile_gate_script, +} import v2.workflow.ci_heal_skew_guard_emit { ci_heal_binary_source_skew_guard_script, } @@ -436,6 +439,84 @@ fn ci_regen_floor_skip_shortcut_script() -> String { ) } +data compile_contract_admission_witness_bin: String = "compile_contract_admission_witness" + +data ci_compile_contract_admission_policy_note: String = "Affected-set-scoped compile-contract admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with the gate's exact input closure (src/v1/tests/**, src/v1/stage0/**, Cargo.toml, Cargo.lock, rust-toolchain.toml, path-dependency manifests, .cargo config). A PR diff touching none of those cannot change the v1-compiler-tests compile contract, so the gate exits 0 immediately with CompileContractAdmissionReceipt decision=Skip. Empty diff / diff observation failure / departed closure paths RUN the gate (fail-closed — unknown state never skips). COLD CONTROL: the skip is gated to pull_request via GITHUB_EVENT_NAME, so push-to-main and scheduled runs execute the gate UNCONDITIONALLY." + +fn ci_compile_contract_sccache_hit_count_shell() -> String { + "sccache --show-stats 2>/dev/null | awk '/Cache hits/ \{print $NF}' | head -1 || echo 0" +} + +fn ci_compile_contract_sccache_miss_count_shell() -> String { + "sccache --show-stats 2>/dev/null | awk '/Cache misses/ \{print $NF}' | head -1 || echo 0" +} + +fn ci_compile_contract_admission_shortcut_script() -> String { + concat( + concat("# ", concat(ci_compile_contract_admission_policy_note, "\n")), + concat( + "if [ \"$GITHUB_EVENT_NAME\" = \"pull_request\" ]; then\n", + concat( + concat( + concat(" _ci_compile_contract_decision=$(", concat(artifact_shell_path(name: compile_contract_admission_witness_bin), " 2>/dev/null || echo run_compile_contract)")), + "\n if [ \"$_ci_compile_contract_decision\" = \"compile_contract_not_affected_skip\" ]; then\n" + ), + concat( + " printf '%s\\n' \"CompileContractAdmissionReceipt: decision=Skip base=$\{GITHUB_BASE_SHA:-unknown} head=$\{GITHUB_SHA:-unknown} reason=diff_disjoint_from_input_closure\"\n", + concat(" exit 0\n", concat(" fi\n", "fi\n")) + ) + ) + ) + ) +} + +fn ci_compile_contract_run_and_receipt_script() -> String { + concat( + concat("_compile_contract_sccache_hits_before=$(", concat(ci_compile_contract_sccache_hit_count_shell(), ")\n")), + concat( + concat("_compile_contract_sccache_misses_before=$(", concat(ci_compile_contract_sccache_miss_count_shell(), ")\n")), + concat( + "_compile_contract_start_ms=$(date +%s%3N 2>/dev/null || python3 -c 'import time; print(int(time.time()*1000))')\n", + concat( + ci_v1_compiler_tests_compile_gate_script(), + concat( + "_compile_contract_end_ms=$(date +%s%3N 2>/dev/null || python3 -c 'import time; print(int(time.time()*1000))')\n", + concat( + "_compile_contract_wall_ms=$((_compile_contract_end_ms - _compile_contract_start_ms))\n", + concat( + concat("_compile_contract_sccache_hits_after=$(", concat(ci_compile_contract_sccache_hit_count_shell(), ")\n")), + concat( + concat("_compile_contract_sccache_misses_after=$(", concat(ci_compile_contract_sccache_miss_count_shell(), ")\n")), + concat( + "_compile_contract_sccache_hit_delta=$((_compile_contract_sccache_hits_after - _compile_contract_sccache_hits_before))\n", + concat( + "_compile_contract_sccache_miss_delta=$((_compile_contract_sccache_misses_after - _compile_contract_sccache_misses_before))\n", + "printf '%s\\n' \"CompileContractAdmissionReceipt: decision=Run base=$\{GITHUB_BASE_SHA:-unknown} head=$\{GITHUB_SHA:-unknown} compile_wall_ms=$\{_compile_contract_wall_ms} sccache_hit_delta=$\{_compile_contract_sccache_hit_delta} sccache_miss_delta=$\{_compile_contract_sccache_miss_delta} reason=compile_contract_executed\"\n" + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) +} + +fn ci_v1_compiler_tests_compile_gate_run_script() -> String { + concat( + "set -e\n", + concat( + concat("ROOT=", ci_repo_root_shell(), "\n"), + concat( + ci_compile_contract_admission_shortcut_script(), + ci_compile_contract_run_and_receipt_script() + ) + ) + ) +} + fn gunbc_ci_regen_floor_only_script(spec: CiSpec) -> String { concat( concat(ci_regen_ensure_rustfmt_path_script(), "\n"), diff --git a/dag/gunbc/ci_workflow.dag b/dag/gunbc/ci_workflow.dag index 90c9ac90b9d..8b4f3a8511d 100644 --- a/dag/gunbc/ci_workflow.dag +++ b/dag/gunbc/ci_workflow.dag @@ -17,6 +17,8 @@ import gunbc.ci_spec { gunbc_ci_workflow_wrapper_budget_minutes, ci_heal_author_commit_artifact_dir, ci_heal_author_commit_artifact_name, gunbc_ci_heal_repo_local_git_config_invoke, + ci_fmt_gate_line, + ci_v1_compiler_tests_compile_gate_run_script, } import v2.workflow.ci_heal_revalidation_preflight_emit { ci_heal_revalidation_preflight_script, @@ -40,7 +42,6 @@ import v2.workflow.ci_workflow_run_emit { ci_selection_control_script } import v2.workflow.ci_release_build_emit { ci_release_build_script } -import v2.workflow.ci_v1_compiler_tests_compile_gate_emit { ci_v1_compiler_tests_compile_gate_script } import std.disposition { Disposition, RealizationDispatch, Scaffold, SingleAuthority, Terminal } import std.decl_ref { DeclarationRef, WholeDeclaration } import std.types { Duration } @@ -298,9 +299,9 @@ fn ci_fmt_gate_step() -> Step { fn ci_v1_compiler_tests_compile_gate_step() -> Step { RunStep { - name: Present { value: "cargo check -p v1-compiler-tests --tests (compile gate; no test execution)" }, + name: Present { value: "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; reuses release v1-compiler)" }, id: none, - run: ci_v1_compiler_tests_compile_gate_script(), + run: ci_v1_compiler_tests_compile_gate_run_script(), shell: none, env: none, working_directory: none, @@ -485,7 +486,7 @@ data gunbc_ci_aux_step_timeout_minutes: Int = 5 data gunbc_ci_v1_compiler_tests_compile_gate_timeout_minutes: Duration = 15 -data gunbc_ci_v1_compiler_tests_compile_gate_timeout_note: String = "v1-compiler-tests compile gate step budget (operator ruling 2026-08-01, PR #7533 receipt): cargo check -p v1-compiler-tests --tests exceeded the 5m aux cap on cold native-cache hosts (run 30692671758 @ 6f20329: srv1-05, step killed at 5m00s while still compiling deps; warm-cache runs complete in ~50s). Raised 10m -> 15m after run 30719671973 @ 6945446401 (srv1-01, cache hit): step killed at 10m00s while Checking v1-compiler-tests — deps consumed the full prior budget. 15m is the cold-host envelope after that receipt — not RustMonolithGate re-enrollment." +data gunbc_ci_v1_compiler_tests_compile_gate_timeout_note: String = "v1-compiler-tests compile-contract gate step budget (operator ruling 2026-08-05, PR A / fierce-heron-177): reordered after the release build and switched to cargo test --release --no-run so v1-compiler compiles once per job. Warm runs should complete in seconds once the release artifact is warm; 15m retains the prior cold-host envelope without raising the cap." data gunbc_ci_artifact_transfer_step_timeout_minutes: Int = 10 @@ -671,7 +672,7 @@ fn ci_build_job() -> Job { id: "build", name: none, runner: gunbc_ci_selected_runner_spec(), - steps: concat(ci_heal_revalidation_prelude_steps(), [ci_fmt_gate_step(), ci_v1_compiler_tests_compile_gate_step(), ci_release_build_step(), ci_release_bins_pack_step(), ci_release_bins_upload_step()]), + steps: concat(ci_heal_revalidation_prelude_steps(), [ci_fmt_gate_step(), ci_release_build_step(), ci_v1_compiler_tests_compile_gate_step(), ci_release_bins_pack_step(), ci_release_bins_upload_step()]), needs: [], env: none, outputs: none, diff --git a/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag b/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag index 4be8f2805a4..d9078c37248 100644 --- a/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag +++ b/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag @@ -4,31 +4,50 @@ import v2.workflow.ci_v1_compiler_tests_compile_gate_emit { ci_v1_compiler_tests_compile_gate_script, ci_v1_compiler_tests_compile_gate_shell_emit_scaffold, } +import gunbc.ci_spec { + ci_v1_compiler_tests_compile_gate_run_script, + ci_release_features, +} import gunbc.ci_workflow { ci_build_job } +import gunbc.ci_materialization { step_display_name } import extdeps.github.actions { Step, RunStep, UsesStep } import std.disposition { Scaffold } -fn build_job_has_v1_compiler_tests_compile_gate_step() -> Bool { - fold(ci_build_job().steps, init: false, f: (acc, step) => { - acc || match step { - RunStep { name: _, id: _, run: cmd, shell: _, env: _, working_directory: _, if_condition: _, continue_on_error: _, timeout_minutes: _ } => - string_contains(s: cmd, pattern: "'check'") - && string_contains(s: cmd, pattern: "'v1-compiler-tests'") - && string_contains(s: cmd, pattern: "🟡 dissolve-on: ci_v1_compiler_tests_compile_gate_script") - UsesStep { name: _, id: _, uses: _, with: _, env: _, if_condition: _, continue_on_error: _, timeout_minutes: _ } => false +data compile_gate_step_name: String = "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; reuses release v1-compiler)" +data release_build_step_name: String = "Build release bins (claim_executor + gunbc)" + +fn step_index_of(steps: List, name: String) -> Int { + let seen = fold(steps, init: { idx: 0, hit: 0 - 1 }, f: fn(acc, s) { + if step_display_name(s: s) == name { + if acc.hit >= 0 { { idx: acc.idx + 1, hit: acc.hit } } else { { idx: acc.idx + 1, hit: acc.idx } } + } else { + { idx: acc.idx + 1, hit: acc.hit } } }) + seen.hit } -test fn w_gate_script_names_compile_only_command() -> Bool { +test fn w_gate_script_names_release_test_no_run_command() -> Bool { let script = ci_v1_compiler_tests_compile_gate_script() - string_contains(s: script, pattern: "'check'") + string_contains(s: script, pattern: "'test'") && string_contains(s: script, pattern: "'v1-compiler-tests'") - && string_contains(s: script, pattern: "'--tests'") + && string_contains(s: script, pattern: "'--release'") + && string_contains(s: script, pattern: "'--no-run'") && string_contains(s: script, pattern: "\"$CARGO_BIN\"") + && !string_contains(s: script, pattern: "'check'") && !string_contains(s: script, pattern: "nextest") } +test fn w_gate_run_script_enrolls_admission_and_receipt() -> Bool { + let script = ci_v1_compiler_tests_compile_gate_run_script() + string_contains(s: script, pattern: "compile_contract_admission_witness") + && string_contains(s: script, pattern: "CompileContractAdmissionReceipt") + && string_contains(s: script, pattern: "decision=Skip") + && string_contains(s: script, pattern: "decision=Run") + && string_contains(s: script, pattern: "compile_wall_ms=") + && string_contains(s: script, pattern: "sccache_hit_delta=") +} + test fn w_gate_carrier_is_scaffold() -> Bool { match ci_v1_compiler_tests_compile_gate_shell_emit_scaffold { Scaffold { dissolves_to: _, bind: _ } => true @@ -36,6 +55,15 @@ test fn w_gate_carrier_is_scaffold() -> Bool { } } -test fn w_build_job_enrolls_compile_gate_before_release_build() -> Bool { - build_job_has_v1_compiler_tests_compile_gate_step() +test fn w_build_job_enrolls_compile_gate_after_release_build() -> Bool { + let steps = ci_build_job().steps + let build = step_index_of(steps: steps, name: release_build_step_name) + let gate = step_index_of(steps: steps, name: compile_gate_step_name) + (build >= 0) && (gate >= 0) && (build < gate) +} + +test fn w_release_features_cover_test_crate_deps() -> Bool { + string_contains(s: ci_release_features, pattern: "text_lookup_work_counter") + && string_contains(s: ci_release_features, pattern: "interp_test_witness") + && string_contains(s: ci_release_features, pattern: "test_hooks") } diff --git a/src/v1/stage0/Cargo.toml b/src/v1/stage0/Cargo.toml index 4a31e43ed37..629add04f70 100644 --- a/src/v1/stage0/Cargo.toml +++ b/src/v1/stage0/Cargo.toml @@ -214,6 +214,14 @@ path = "src/bin/regen_floor_skip_witness.rs" name = "selection_control_skip_witness" path = "src/bin/selection_control_skip_witness.rs" +# Host-physics CI witness: v1-compiler-tests compile-contract affected-set skip. Prints +# compile_contract_not_affected_skip | run_compile_contract for the build-job compile gate +# by intersecting the merge-base diff with the gate's input closure. Diff failure / empty diff +# / departed paths → run_compile_contract (fail-closed; main + scheduled runs execute cold). +[[bin]] +name = "compile_contract_admission_witness" +path = "src/bin/compile_contract_admission_witness.rs" + # Host-physics floor witness for the v1 interpreter recorded-fixture record -> # hermetic-replay -> fail-closed lifecycle (DESIGN §5 determinism). Drives the real # claim_batch binary with --record/--hermetic/--fixture-store + mutates fixtures on diff --git a/src/v1/stage0/src/bin/compile_contract_admission_witness.rs b/src/v1/stage0/src/bin/compile_contract_admission_witness.rs new file mode 100644 index 00000000000..6a0f2705c92 --- /dev/null +++ b/src/v1/stage0/src/bin/compile_contract_admission_witness.rs @@ -0,0 +1,48 @@ +#![allow(clippy::disallowed_macros)] + +//! Affected-set compile-contract admission witness (host fast path). +//! +//! Prints `compile_contract_not_affected_skip` when the merge-base diff touches no input +//! of the v1-compiler-tests compile-contract gate (`src/v1/tests/**`, `src/v1/stage0/**`, +//! Cargo/toolchain build config), else `run_compile_contract`. +//! +//! Fail-closed by RUNNING on uncertainty, never by skipping: diff-observation failure, +//! empty diff, and departed closure paths all answer `run_compile_contract` so unknown +//! state never narrows coverage. Deliberately UNLIKE `selection_control_skip_witness`, +//! which refuses on observation failure — here the gate must still compile when the +//! affected set is unknown. +//! +//! The whole decision lives in `cli_run::compile_contract_admission_label_for_ci`; this bin +//! is just the transport. + +use std::process::ExitCode; + +use v1_compiler::cli_run::{compile_contract_admission_label_for_ci, workspace_root}; + +fn main() -> ExitCode { + std::env::set_current_dir(workspace_root()).expect("chdir to workspace root"); + println!("{}", compile_contract_admission_label_for_ci()); + ExitCode::SUCCESS +} + +#[cfg(test)] +mod tests { + use v1_compiler::cli_run::{ + compile_contract_admission_label_for_ci, COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL, + RUN_COMPILE_CONTRACT_LABEL, + }; + + #[test] + fn labels_are_distinct() { + assert_ne!( + COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL, + RUN_COMPILE_CONTRACT_LABEL + ); + let label = compile_contract_admission_label_for_ci(); + assert!( + label == COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL + || label == RUN_COMPILE_CONTRACT_LABEL, + "unexpected label: {label}" + ); + } +} diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index 4ae096caa66..c6131bcd125 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -3873,6 +3873,81 @@ pub fn selection_control_skip_label_for_ci() -> Result bool { + let p = normalize_repo_path(changed); + if p.starts_with("src/v1/tests/") || p.starts_with("src/v1/stage0/") { + return true; + } + if p == "Cargo.lock" + || p == "Cargo.toml" + || p.ends_with("/Cargo.toml") + || p == "rust-toolchain.toml" + || p == "rust-toolchain" + || p == ".cargo/config.toml" + || p == ".cargo/config" + { + return true; + } + false +} + +/// CI label for the build-job compile-contract gate's affected-set skip arm. +/// `compile_contract_not_affected_skip` iff the merge-base diff touches no compile-contract +/// input; `run_compile_contract` on any intersection, empty diff, departed closure path, +/// or observation failure (fail-closed — unknown state runs, never skips). The CI shell +/// gates the skip to pull_request events; push-to-main and scheduled controls run the gate +/// unconditionally. +pub fn compile_contract_admission_label_for_ci() -> String { + let (changed_paths, departed_paths) = match floor_git_diff_name_status_range() { + Ok(v) => v, + Err(msg) => { + eprintln!( + "compile-contract admission: diff observation failed ({msg}) — run the gate (fail-closed)" + ); + return RUN_COMPILE_CONTRACT_LABEL.to_string(); + } + }; + if changed_paths.is_empty() { + eprintln!( + "compile-contract admission: empty diff — run the gate (degenerate observation for pull_request)" + ); + return RUN_COMPILE_CONTRACT_LABEL.to_string(); + } + if let Some(gone) = departed_paths.iter().min() { + eprintln!( + "compile-contract admission: departed path in diff ({}) — run the gate (current-tree closure cannot see deletions)", + normalize_repo_path(gone) + ); + return RUN_COMPILE_CONTRACT_LABEL.to_string(); + } + let matched: Vec = changed_paths + .iter() + .filter(|p| compile_contract_path_affects_gate(p)) + .map(|p| normalize_repo_path(p)) + .collect(); + if matched.is_empty() { + eprintln!( + "compile-contract admission: {} changed path(s), none intersect the compile-contract input closure (src/v1/tests/**, src/v1/stage0/**, Cargo/toolchain config) — skip the gate (push-to-main runs it unconditionally as the cold control)", + changed_paths.len() + ); + COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL.to_string() + } else { + eprintln!( + "compile-contract admission: diff intersects the compile-contract input closure (e.g. {}) — run the gate", + matched.iter().min().unwrap_or(&String::new()) + ); + RUN_COMPILE_CONTRACT_LABEL.to_string() + } +} + fn compile_clean_scope_plan_for_ci() -> CompileCleanScopePlan { // Falsifier cold-control arm: force the whole-tree compile before any diff observation. // Widen-to-more-checking only — this env can never skip or narrow the gate, so it is a @@ -34624,6 +34699,89 @@ mod witness_layer_roots_compile_clean_tests { ); } + /// Compile-contract admission SKIP arm: a docs-only diff cannot change the gate verdict. + #[test] + fn compile_contract_admission_skips_on_docs_only_diff() { + with_env_test_lock(|| { + with_workspace_cwd(|| { + let _ns = EnvGuard::set( + "GUNBC_CI_DIFF_NAME_STATUS", + "M\\000docs/plans/example.md\\000", + ); + assert_eq!( + compile_contract_admission_label_for_ci(), + COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL + ); + }); + }); + } + + /// RUN arm — a changed v1 integration-test file must compile the gate. + #[test] + fn compile_contract_admission_runs_on_changed_v1_test_file() { + with_env_test_lock(|| { + with_workspace_cwd(|| { + let _ns = EnvGuard::set( + "GUNBC_CI_DIFF_NAME_STATUS", + "M\\000src/v1/tests/src/helpers.rs\\000", + ); + assert_eq!( + compile_contract_admission_label_for_ci(), + RUN_COMPILE_CONTRACT_LABEL + ); + }); + }); + } + + /// RUN arm — a changed public v1-compiler surface must compile the gate. + #[test] + fn compile_contract_admission_runs_on_changed_stage0_signature() { + with_env_test_lock(|| { + with_workspace_cwd(|| { + let _ns = EnvGuard::set( + "GUNBC_CI_DIFF_NAME_STATUS", + "M\\000src/v1/stage0/src/cli_run.rs\\000", + ); + assert_eq!( + compile_contract_admission_label_for_ci(), + RUN_COMPILE_CONTRACT_LABEL + ); + }); + }); + } + + /// RUN arm — departed paths are invisible to the current-tree closure. + #[test] + fn compile_contract_admission_runs_on_departed_path() { + with_env_test_lock(|| { + with_workspace_cwd(|| { + let _ns = EnvGuard::set( + "GUNBC_CI_DIFF_NAME_STATUS", + "D\\000src/v1/tests/src/helpers.rs\\000", + ); + assert_eq!( + compile_contract_admission_label_for_ci(), + RUN_COMPILE_CONTRACT_LABEL + ); + }); + }); + } + + /// Fail-closed RUN arm — an unobservable diff must RUN, never skip. + #[test] + fn compile_contract_admission_runs_when_diff_observation_fails() { + with_env_test_lock(|| { + with_workspace_cwd(|| { + let _ns = + EnvGuard::set("GUNBC_CI_DIFF_NAME_STATUS", "Z\\000src/v1/whatever.rs\\000"); + assert_eq!( + compile_contract_admission_label_for_ci(), + RUN_COMPILE_CONTRACT_LABEL + ); + }); + }); + } + /// The unblocked scoped arm, by execution: a single touched dag entry selects at least /// itself through the import-closure grain (the discriminating RED for this arm is /// `floor_fast_plan_whole_tree_on_mixed_rs_and_dag_touch` — same touch set plus an `.rs` diff --git a/src/v2/workflow/ci_v1_compiler_tests_compile_gate_emit_test.dag b/src/v2/workflow/ci_v1_compiler_tests_compile_gate_emit_test.dag index 9efe7d59b32..95448b4ed64 100644 --- a/src/v2/workflow/ci_v1_compiler_tests_compile_gate_emit_test.dag +++ b/src/v2/workflow/ci_v1_compiler_tests_compile_gate_emit_test.dag @@ -64,13 +64,15 @@ test fn ci_v1_compiler_tests_compile_gate_script_is_typed_plan_plus_marker() -> ci_v1_compiler_tests_compile_gate_script() == expected } -test fn ci_v1_compiler_tests_compile_gate_uses_cargo_bin_and_check_args() -> Bool { +test fn ci_v1_compiler_tests_compile_gate_uses_cargo_bin_and_test_args() -> Bool { let script = ci_v1_compiler_tests_compile_gate_script() string_contains(s: script, pattern: "\"$CARGO_BIN\"") - && string_contains(s: script, pattern: "'check'") + && string_contains(s: script, pattern: "'test'") && string_contains(s: script, pattern: "'-p'") && string_contains(s: script, pattern: "'v1-compiler-tests'") - && string_contains(s: script, pattern: "'--tests'") + && string_contains(s: script, pattern: "'--release'") + && string_contains(s: script, pattern: "'--no-run'") + && !string_contains(s: script, pattern: "'check'") && !string_contains(s: script, pattern: "nextest") } From 4174906b86436d489d7b0af3e46877ea999e2e1d Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 5 Aug 2026 20:41:33 +0000 Subject: [PATCH 03/11] WIP: PR A: reuse one v1-compiler build across release bins and the compile-co --- src/v1/tests/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/v1/tests/src/lib.rs b/src/v1/tests/src/lib.rs index ff544402b76..2e035937888 100644 --- a/src/v1/tests/src/lib.rs +++ b/src/v1/tests/src/lib.rs @@ -116,6 +116,7 @@ mod measure_periphery_emit_test; mod measure_value_arg_unit_collapse_test; #[cfg(test)] mod module_authority_resolution_test; +#[cfg(test)] mod namespace_alias_decl_test; #[cfg(test)] mod namespace_unique_on_chain_policy_test; From b50d6ce5ffd97e602dee3dfb3c07e090ce740e75 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 5 Aug 2026 20:45:46 +0000 Subject: [PATCH 04/11] Gate-found inherited defects: #[cfg(test)] on three v1-compiler-tests modules. namespace_alias_decl_test (from #7094) lacked #[cfg(test)], so the lib target compiled it without #[test] bodies and failed under RUSTFLAGS=-D warnings when the compile-contract gate first built v1-compiler-tests. Same class fixed on import_visibility_pool_coincidence_test and nested_list_alias_emit_test. Co-authored-by: Cursor --- src/v1/tests/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/v1/tests/src/lib.rs b/src/v1/tests/src/lib.rs index 2e035937888..d35a1f7dad3 100644 --- a/src/v1/tests/src/lib.rs +++ b/src/v1/tests/src/lib.rs @@ -79,6 +79,7 @@ mod group_completion_construction_test; mod gunbhub_serve_program_test; #[cfg(test)] mod html_markup_smoke_test; +#[cfg(test)] mod import_visibility_pool_coincidence_test; #[cfg(test)] mod int_pow_bounded_test; @@ -122,6 +123,7 @@ mod namespace_alias_decl_test; mod namespace_unique_on_chain_policy_test; #[cfg(test)] mod nested_fold_generic_param_emit_test; +#[cfg(test)] mod nested_list_alias_emit_test; #[cfg(test)] mod node_keyed_graph_artifact_codec_test; From 4c8ab445c124f14caec68fee96845e1b24992de5 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 5 Aug 2026 22:39:53 +0000 Subject: [PATCH 05/11] WIP: PR A: reuse one v1-compiler build across release bins and the compile-co --- src/v1/stage0/Cargo.toml | 3 ++ src/v1/stage0/src/cli_run.rs | 30 +++++++------- src/v1/stage0/src/v1_interpreter.rs | 64 +++++++++++++++++++++++++---- src/v1/tests/Cargo.toml | 2 +- 4 files changed, 75 insertions(+), 24 deletions(-) diff --git a/src/v1/stage0/Cargo.toml b/src/v1/stage0/Cargo.toml index 629add04f70..49d16a4a099 100644 --- a/src/v1/stage0/Cargo.toml +++ b/src/v1/stage0/Cargo.toml @@ -6,6 +6,9 @@ edition = "2021" [features] default = [] text_lookup_work_counter = [] +# Test-callable surface without per-call interpreter instrumentation (compile-contract / v1-compiler-tests). +compile_contract_surface = [] +# Runtime call-env depth instrumentation (record_call_env_depth on every eval_call). Never on CI release bins. interp_test_witness = [] test_hooks = [] diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index c6131bcd125..d6e97e0aa62 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -7356,7 +7356,7 @@ pub fn build_multi_entry_index_with_shared_caches( } /// Test-only: whether `parse_cache` holds a path (pool census must not pre-fill it). -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn parse_cache_contains_path_for_test(index: &MultiEntryIndex, path: &str) -> bool { index .parse_cache @@ -7365,12 +7365,12 @@ pub fn parse_cache_contains_path_for_test(index: &MultiEntryIndex, path: &str) - .any(|k| k == path || same_canonical_file(k, path)) } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn parse_cache_paths_for_test(index: &MultiEntryIndex) -> Vec { index.parse_cache.borrow().keys().cloned().collect() } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn typed_module_cache_len_for_test(index: &MultiEntryIndex) -> usize { index.typed_module_cache.borrow().len() } @@ -7378,14 +7378,14 @@ pub fn typed_module_cache_len_for_test(index: &MultiEntryIndex) -> usize { /// Test-only projection of the durable typed-cache authority: the content keys whose /// computations populated this private index. A fresh, non-evicting test index makes /// this exactly the distinct-computation set without retaining request attribution. -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn typed_module_cache_content_keys_for_test( index: &MultiEntryIndex, ) -> std::collections::BTreeSet { index.typed_module_cache.borrow().keys().cloned().collect() } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn typed_cache_evictions_for_test(index: &MultiEntryIndex) -> u64 { index.typed_cache_evictions.get() } @@ -7394,12 +7394,12 @@ pub fn typed_cache_evictions_for_test(index: &MultiEntryIndex) -> u64 { /// call sites use, so a test can observe that repeated calls against one /// `index` return the identical value even as the underlying signal moves — /// the property the 2026-07-21 fleet OOM fix depends on. -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn typed_module_cache_cap_for_test(index: &MultiEntryIndex) -> usize { typed_module_cache_cap(index) } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn entry_closure_sources_len_for_test(index: &MultiEntryIndex) -> usize { index.entry_closure_sources.borrow().len() } @@ -7409,7 +7409,7 @@ pub fn entry_closure_sources_len_for_test(index: &MultiEntryIndex) -> usize { /// gate warms the shared index Ephemerally (D0.1): modules cached, no per-entry graph /// pin — so the next per-entry resolve misses the memo and takes reconcile's ALL-HITS /// probe, the path D0.2's schedule-key registration lives on. -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn clear_resolved_graph_memo_for_test(index: &MultiEntryIndex) { index.resolved_graph_memo.borrow_mut().clear(); } @@ -7418,7 +7418,7 @@ pub fn clear_resolved_graph_memo_for_test(index: &MultiEntryIndex) { /// bypassing the process-global `GUNBC_SCHEDULE_RETENTION_EVICT` env — so the D0.4 /// retain-all (`evict_enabled=false`) baseline can be exercised on a real index without /// racing that env against concurrently-running tests. -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn install_schedule_retention_for_test( index: &MultiEntryIndex, per_entry: Vec<(String, Vec)>, @@ -7428,12 +7428,12 @@ pub fn install_schedule_retention_for_test( Some(ScheduleRetention::armed(per_entry, evict_enabled)); } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn both_closure_edges_initialized_for_test(index: &MultiEntryIndex) -> bool { index.both_closure_edges.borrow().is_some() } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn both_closure_bare_edge_rows_for_test(index: &MultiEntryIndex) -> usize { index .both_closure_edges @@ -7443,12 +7443,12 @@ pub fn both_closure_bare_edge_rows_for_test(index: &MultiEntryIndex) -> usize { .unwrap_or(0) } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn pool_qualified_fill_initialized_for_test(index: &MultiEntryIndex) -> bool { index.pool_qualified_fill.borrow().is_some() } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn reset_pool_qualified_fill_for_test(index: &MultiEntryIndex) { *index.pool_qualified_fill.borrow_mut() = None; } @@ -7555,12 +7555,12 @@ pub fn census_heads_body_traversal_refusal(node: &Rc) -> Option { } } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn census_heads_fn_stand_in_for_test() -> Rc { stripped_fn_body_marker() } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn census_heads_module_node_for_test(module: Rc) -> Rc { census_heads_module_node(module) } diff --git a/src/v1/stage0/src/v1_interpreter.rs b/src/v1/stage0/src/v1_interpreter.rs index ab6031e363e..98d2d54b8c2 100644 --- a/src/v1/stage0/src/v1_interpreter.rs +++ b/src/v1/stage0/src/v1_interpreter.rs @@ -133,11 +133,43 @@ thread_local! { const { std::cell::RefCell::new(None) }; } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] thread_local! { static CALL_ENV_DEPTH_PEAK: std::cell::Cell = const { std::cell::Cell::new(0) }; } +/// Default-off arming for `compile_contract_surface`: release bins never set this; integration +/// tests call `arm_call_env_depth_witness_for_test` before depth assertions. `interp_test_witness` +/// keeps the legacy always-on behavior. +#[cfg(all(feature = "compile_contract_surface", not(feature = "interp_test_witness")))] +static CALL_ENV_DEPTH_WITNESS_ARMED: std::sync::atomic::AtomicBool = + std::sync::atomic::AtomicBool::new(false); + +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +fn call_env_depth_witness_enabled() -> bool { + #[cfg(feature = "interp_test_witness")] + { + return true; + } + #[cfg(all(feature = "compile_contract_surface", not(feature = "interp_test_witness")))] + { + return CALL_ENV_DEPTH_WITNESS_ARMED.load(std::sync::atomic::Ordering::Relaxed); + } + #[cfg(all( + test, + not(any(feature = "interp_test_witness", feature = "compile_contract_surface")) + ))] + { + return true; + } + false +} + +#[cfg(feature = "compile_contract_surface")] +pub fn arm_call_env_depth_witness_for_test() { + CALL_ENV_DEPTH_WITNESS_ARMED.store(true, std::sync::atomic::Ordering::Relaxed); +} + fn with_lexical_base_env(base: &Rc, f: impl FnOnce() -> R) -> R { LEXICAL_BASE_ENV.with(|cell| { let prev = cell.borrow_mut().take(); @@ -153,8 +185,10 @@ fn with_lexical_base_env(base: &Rc, f: impl FnOnce() -> R) -> R { } } let _guard = LexicalBaseGuard { prev }; - #[cfg(any(test, feature = "interp_test_witness"))] - CALL_ENV_DEPTH_PEAK.with(|peak| peak.set(0)); + #[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] + if call_env_depth_witness_enabled() { + CALL_ENV_DEPTH_PEAK.with(|peak| peak.set(0)); + } f() }) } @@ -167,8 +201,11 @@ fn lexical_base_env(caller_env: &Rc) -> Rc { }) } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] fn record_call_env_depth(env: &Env) { + if !call_env_depth_witness_enabled() { + return; + } let depth = env.chain_depth(); CALL_ENV_DEPTH_PEAK.with(|peak| { let current = peak.get(); @@ -1818,9 +1855,20 @@ pub fn run_in_context_with_args( /// Peak parent-chain depth observed across `call_function` frames in the last /// `run_in_context*` invocation (test witness for lexical-base scoping). -#[cfg(any(test, feature = "interp_test_witness"))] +/// With `compile_contract_surface` alone the instrumentation is absent and this reads 0. +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn call_env_depth_peak_snapshot() -> usize { - CALL_ENV_DEPTH_PEAK.with(|peak| peak.get()) + #[cfg(feature = "interp_test_witness")] + { + return CALL_ENV_DEPTH_PEAK.with(|peak| peak.get()); + } + #[cfg(all( + feature = "compile_contract_surface", + not(feature = "interp_test_witness") + ))] + { + 0 + } } fn build_initial_env(ctx: &InterpContext) -> InterpResult> { @@ -2697,7 +2745,7 @@ fn cross_family_content_hash_straddle(a: &Value, b: &Value) -> Option { } } -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn cross_family_content_hash_straddle_for_witness(a: &Value, b: &Value) -> Option { cross_family_content_hash_straddle(a, b) } @@ -7946,7 +7994,7 @@ fn fnv1a64_structural_value(digest: String, ctx: &InterpContext) -> Value { /// `==`-equal to a dag-authored `RestAuthenticated { scheme, digest: content_hash_atom(…) }`, /// so a drift on either side of the seam (mint shape, hash family, or preimage layout) goes /// red instead of silently failing every authenticated fixture match. -#[cfg(any(test, feature = "interp_test_witness"))] +#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] pub fn rest_authenticated_identity_for_witness(token: &str, ctx: &InterpContext) -> Value { rest_auth_identity_value( &AuthResolution::Resolved { diff --git a/src/v1/tests/Cargo.toml b/src/v1/tests/Cargo.toml index 136578e6de8..1f5994149c3 100644 --- a/src/v1/tests/Cargo.toml +++ b/src/v1/tests/Cargo.toml @@ -8,7 +8,7 @@ description = "Integration tests for the v2 self-hosted compiler" [dependencies] im = { version = "15.1", features = ["serde"] } -v1-compiler = { path = "../stage0", features = ["text_lookup_work_counter", "interp_test_witness", "test_hooks"] } +v1-compiler = { path = "../stage0", features = ["text_lookup_work_counter", "compile_contract_surface", "test_hooks"] } [dev-dependencies] serde = { workspace = true } From 52c748cbf23d8f86cf5e3545aae6e357f4ba314f Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 5 Aug 2026 23:18:40 +0000 Subject: [PATCH 06/11] Drop interp_test_witness from CI release bins; default-off depth hook. ci_release_features is text_lookup_work_counter only so claim_executor/gunbc carry no per-call record_call_env_depth instrumentation. Tests arm the hook explicitly before depth assertions. Regenerated workflow feature strings. Fixes fmt failure on 4c8ab445c (WIP compile_contract_surface path abandoned per operator: guarded default-off is the cheaper fix). Co-authored-by: Cursor --- .github/workflows/ci.yml | 4 +- .github/workflows/falsifier.yml | 4 +- dag/gunbc/ci_spec.dag | 4 +- ...mpiler_tests_compile_gate_witness_test.dag | 5 +- src/v1/stage0/Cargo.toml | 4 +- src/v1/stage0/src/cli_run.rs | 30 +++++----- src/v1/stage0/src/v1_interpreter.rs | 56 ++++++------------- src/v1/tests/Cargo.toml | 2 +- src/v1/tests/src/lexical_base_env_test.rs | 2 + 9 files changed, 43 insertions(+), 68 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e772854eed2..2a7b0532529 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,10 +105,10 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then + if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" - CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey + CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey else exit 1 fi diff --git a/.github/workflows/falsifier.yml b/.github/workflows/falsifier.yml index 3fc15d9f0a2..f480bb5fea2 100644 --- a/.github/workflows/falsifier.yml +++ b/.github/workflows/falsifier.yml @@ -74,10 +74,10 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then + if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" - CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey + CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey else exit 1 fi diff --git a/dag/gunbc/ci_spec.dag b/dag/gunbc/ci_spec.dag index a82fea07a47..740ed757653 100644 --- a/dag/gunbc/ci_spec.dag +++ b/dag/gunbc/ci_spec.dag @@ -230,7 +230,7 @@ data gunbc_ci_compile_clean_clamp_note: String = "COMPILE-CLEAN LEG CLAMP (prelu data gunbc_ci_compile_clean_clamp: RunnableBatchClamp = RunnableBatchClamp { overhead: second(count: 60), per_unit: millisecond(count: 320) } -data ci_release_features: String = "text_lookup_work_counter,interp_test_witness,test_hooks" +data ci_release_features: String = "text_lookup_work_counter" fn ci_release_build_line() -> String { concat( @@ -252,7 +252,7 @@ fn ci_fmt_gate_line() -> String { "\"$CARGO_BIN\" fmt --all --check" } -data ci_v1_compiler_tests_compile_gate_note: String = "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; no test execution), RE-ORDERED 2026-08-05 (operator ruling, PR A / fierce-heron-177): runs AFTER the release build so the gate reuses the release-profile v1-compiler artifact instead of forcing a second dev-profile compile. ci_release_features now carries interp_test_witness and test_hooks so the release build and the test crate share one effective feature set. Affected-set admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with src/v1/tests/**, src/v1/stage0/**, and the Cargo/toolchain build config; disjoint diffs skip with a typed CompileContractAdmissionReceipt (decision=Skip). Diff observation failure / empty diff / departed closure paths RUN unconditionally (fail-closed, never skip on unknown). push-to-main and scheduled controls run the gate unconditionally. Operation shape: v2.workflow.ci_v1_compiler_tests_compile_gate_emit (extdeps.cargo_build cargo.Build.Test)." +data ci_v1_compiler_tests_compile_gate_note: String = "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; no test execution), RE-ORDERED 2026-08-05 (operator ruling, PR A / fierce-heron-177): runs AFTER the release build so the gate reuses the release-profile v1-compiler artifact instead of forcing a second dev-profile compile. ci_release_features carries text_lookup_work_counter only on release bins (no interp_test_witness — depth instrumentation is default-off and armed only in tests that execute it). The test crate's Cargo.toml declares its own v1-compiler feature deps for compile-contract linkage. Affected-set admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with src/v1/tests/**, src/v1/stage0/**, and the Cargo/toolchain build config; disjoint diffs skip with a typed CompileContractAdmissionReceipt (decision=Skip). Diff observation failure / empty diff / departed closure paths RUN unconditionally (fail-closed, never skip on unknown). push-to-main and scheduled controls run the gate unconditionally. Operation shape: v2.workflow.ci_v1_compiler_tests_compile_gate_emit (extdeps.cargo_build cargo.Build.Test)." fn ci_retry_body_run(command: String) -> Run { Run { diff --git a/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag b/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag index d9078c37248..02a4fde0e1e 100644 --- a/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag +++ b/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag @@ -62,8 +62,7 @@ test fn w_build_job_enrolls_compile_gate_after_release_build() -> Bool { (build >= 0) && (gate >= 0) && (build < gate) } -test fn w_release_features_cover_test_crate_deps() -> Bool { +test fn w_release_features_exclude_interp_test_witness_on_bins() -> Bool { string_contains(s: ci_release_features, pattern: "text_lookup_work_counter") - && string_contains(s: ci_release_features, pattern: "interp_test_witness") - && string_contains(s: ci_release_features, pattern: "test_hooks") + && !string_contains(s: ci_release_features, pattern: "interp_test_witness") } diff --git a/src/v1/stage0/Cargo.toml b/src/v1/stage0/Cargo.toml index 49d16a4a099..13ef7fdf956 100644 --- a/src/v1/stage0/Cargo.toml +++ b/src/v1/stage0/Cargo.toml @@ -6,9 +6,7 @@ edition = "2021" [features] default = [] text_lookup_work_counter = [] -# Test-callable surface without per-call interpreter instrumentation (compile-contract / v1-compiler-tests). -compile_contract_surface = [] -# Runtime call-env depth instrumentation (record_call_env_depth on every eval_call). Never on CI release bins. +# Test-only interpreter instrumentation (default-off until armed). Not enabled on CI release bins. interp_test_witness = [] test_hooks = [] diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index d6e97e0aa62..c6131bcd125 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -7356,7 +7356,7 @@ pub fn build_multi_entry_index_with_shared_caches( } /// Test-only: whether `parse_cache` holds a path (pool census must not pre-fill it). -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn parse_cache_contains_path_for_test(index: &MultiEntryIndex, path: &str) -> bool { index .parse_cache @@ -7365,12 +7365,12 @@ pub fn parse_cache_contains_path_for_test(index: &MultiEntryIndex, path: &str) - .any(|k| k == path || same_canonical_file(k, path)) } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn parse_cache_paths_for_test(index: &MultiEntryIndex) -> Vec { index.parse_cache.borrow().keys().cloned().collect() } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn typed_module_cache_len_for_test(index: &MultiEntryIndex) -> usize { index.typed_module_cache.borrow().len() } @@ -7378,14 +7378,14 @@ pub fn typed_module_cache_len_for_test(index: &MultiEntryIndex) -> usize { /// Test-only projection of the durable typed-cache authority: the content keys whose /// computations populated this private index. A fresh, non-evicting test index makes /// this exactly the distinct-computation set without retaining request attribution. -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn typed_module_cache_content_keys_for_test( index: &MultiEntryIndex, ) -> std::collections::BTreeSet { index.typed_module_cache.borrow().keys().cloned().collect() } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn typed_cache_evictions_for_test(index: &MultiEntryIndex) -> u64 { index.typed_cache_evictions.get() } @@ -7394,12 +7394,12 @@ pub fn typed_cache_evictions_for_test(index: &MultiEntryIndex) -> u64 { /// call sites use, so a test can observe that repeated calls against one /// `index` return the identical value even as the underlying signal moves — /// the property the 2026-07-21 fleet OOM fix depends on. -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn typed_module_cache_cap_for_test(index: &MultiEntryIndex) -> usize { typed_module_cache_cap(index) } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn entry_closure_sources_len_for_test(index: &MultiEntryIndex) -> usize { index.entry_closure_sources.borrow().len() } @@ -7409,7 +7409,7 @@ pub fn entry_closure_sources_len_for_test(index: &MultiEntryIndex) -> usize { /// gate warms the shared index Ephemerally (D0.1): modules cached, no per-entry graph /// pin — so the next per-entry resolve misses the memo and takes reconcile's ALL-HITS /// probe, the path D0.2's schedule-key registration lives on. -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn clear_resolved_graph_memo_for_test(index: &MultiEntryIndex) { index.resolved_graph_memo.borrow_mut().clear(); } @@ -7418,7 +7418,7 @@ pub fn clear_resolved_graph_memo_for_test(index: &MultiEntryIndex) { /// bypassing the process-global `GUNBC_SCHEDULE_RETENTION_EVICT` env — so the D0.4 /// retain-all (`evict_enabled=false`) baseline can be exercised on a real index without /// racing that env against concurrently-running tests. -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn install_schedule_retention_for_test( index: &MultiEntryIndex, per_entry: Vec<(String, Vec)>, @@ -7428,12 +7428,12 @@ pub fn install_schedule_retention_for_test( Some(ScheduleRetention::armed(per_entry, evict_enabled)); } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn both_closure_edges_initialized_for_test(index: &MultiEntryIndex) -> bool { index.both_closure_edges.borrow().is_some() } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn both_closure_bare_edge_rows_for_test(index: &MultiEntryIndex) -> usize { index .both_closure_edges @@ -7443,12 +7443,12 @@ pub fn both_closure_bare_edge_rows_for_test(index: &MultiEntryIndex) -> usize { .unwrap_or(0) } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn pool_qualified_fill_initialized_for_test(index: &MultiEntryIndex) -> bool { index.pool_qualified_fill.borrow().is_some() } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn reset_pool_qualified_fill_for_test(index: &MultiEntryIndex) { *index.pool_qualified_fill.borrow_mut() = None; } @@ -7555,12 +7555,12 @@ pub fn census_heads_body_traversal_refusal(node: &Rc) -> Option { } } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn census_heads_fn_stand_in_for_test() -> Rc { stripped_fn_body_marker() } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn census_heads_module_node_for_test(module: Rc) -> Rc { census_heads_module_node(module) } diff --git a/src/v1/stage0/src/v1_interpreter.rs b/src/v1/stage0/src/v1_interpreter.rs index 98d2d54b8c2..870e3a30fd2 100644 --- a/src/v1/stage0/src/v1_interpreter.rs +++ b/src/v1/stage0/src/v1_interpreter.rs @@ -133,39 +133,23 @@ thread_local! { const { std::cell::RefCell::new(None) }; } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] thread_local! { static CALL_ENV_DEPTH_PEAK: std::cell::Cell = const { std::cell::Cell::new(0) }; } -/// Default-off arming for `compile_contract_surface`: release bins never set this; integration -/// tests call `arm_call_env_depth_witness_for_test` before depth assertions. `interp_test_witness` -/// keeps the legacy always-on behavior. -#[cfg(all(feature = "compile_contract_surface", not(feature = "interp_test_witness")))] +/// Default-off: release bins omit `interp_test_witness`; when the feature is present the hook +/// is a guarded no-op until a test arms it. +#[cfg(any(test, feature = "interp_test_witness"))] static CALL_ENV_DEPTH_WITNESS_ARMED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false); -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] fn call_env_depth_witness_enabled() -> bool { - #[cfg(feature = "interp_test_witness")] - { - return true; - } - #[cfg(all(feature = "compile_contract_surface", not(feature = "interp_test_witness")))] - { - return CALL_ENV_DEPTH_WITNESS_ARMED.load(std::sync::atomic::Ordering::Relaxed); - } - #[cfg(all( - test, - not(any(feature = "interp_test_witness", feature = "compile_contract_surface")) - ))] - { - return true; - } - false + CALL_ENV_DEPTH_WITNESS_ARMED.load(std::sync::atomic::Ordering::Relaxed) } -#[cfg(feature = "compile_contract_surface")] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn arm_call_env_depth_witness_for_test() { CALL_ENV_DEPTH_WITNESS_ARMED.store(true, std::sync::atomic::Ordering::Relaxed); } @@ -185,7 +169,7 @@ fn with_lexical_base_env(base: &Rc, f: impl FnOnce() -> R) -> R { } } let _guard = LexicalBaseGuard { prev }; - #[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] + #[cfg(any(test, feature = "interp_test_witness"))] if call_env_depth_witness_enabled() { CALL_ENV_DEPTH_PEAK.with(|peak| peak.set(0)); } @@ -201,7 +185,7 @@ fn lexical_base_env(caller_env: &Rc) -> Rc { }) } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] fn record_call_env_depth(env: &Env) { if !call_env_depth_witness_enabled() { return; @@ -1854,21 +1838,13 @@ pub fn run_in_context_with_args( } /// Peak parent-chain depth observed across `call_function` frames in the last -/// `run_in_context*` invocation (test witness for lexical-base scoping). -/// With `compile_contract_surface` alone the instrumentation is absent and this reads 0. -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +/// `run_in_context*` invocation (test witness for lexical-base scoping; default-off until armed). +#[cfg(any(test, feature = "interp_test_witness"))] pub fn call_env_depth_peak_snapshot() -> usize { - #[cfg(feature = "interp_test_witness")] - { - return CALL_ENV_DEPTH_PEAK.with(|peak| peak.get()); - } - #[cfg(all( - feature = "compile_contract_surface", - not(feature = "interp_test_witness") - ))] - { - 0 + if !call_env_depth_witness_enabled() { + return 0; } + CALL_ENV_DEPTH_PEAK.with(|peak| peak.get()) } fn build_initial_env(ctx: &InterpContext) -> InterpResult> { @@ -2745,7 +2721,7 @@ fn cross_family_content_hash_straddle(a: &Value, b: &Value) -> Option { } } -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn cross_family_content_hash_straddle_for_witness(a: &Value, b: &Value) -> Option { cross_family_content_hash_straddle(a, b) } @@ -7994,7 +7970,7 @@ fn fnv1a64_structural_value(digest: String, ctx: &InterpContext) -> Value { /// `==`-equal to a dag-authored `RestAuthenticated { scheme, digest: content_hash_atom(…) }`, /// so a drift on either side of the seam (mint shape, hash family, or preimage layout) goes /// red instead of silently failing every authenticated fixture match. -#[cfg(any(test, feature = "interp_test_witness", feature = "compile_contract_surface"))] +#[cfg(any(test, feature = "interp_test_witness"))] pub fn rest_authenticated_identity_for_witness(token: &str, ctx: &InterpContext) -> Value { rest_auth_identity_value( &AuthResolution::Resolved { diff --git a/src/v1/tests/Cargo.toml b/src/v1/tests/Cargo.toml index 1f5994149c3..136578e6de8 100644 --- a/src/v1/tests/Cargo.toml +++ b/src/v1/tests/Cargo.toml @@ -8,7 +8,7 @@ description = "Integration tests for the v2 self-hosted compiler" [dependencies] im = { version = "15.1", features = ["serde"] } -v1-compiler = { path = "../stage0", features = ["text_lookup_work_counter", "compile_contract_surface", "test_hooks"] } +v1-compiler = { path = "../stage0", features = ["text_lookup_work_counter", "interp_test_witness", "test_hooks"] } [dev-dependencies] serde = { workspace = true } diff --git a/src/v1/tests/src/lexical_base_env_test.rs b/src/v1/tests/src/lexical_base_env_test.rs index 4332e0ed32d..b16fcf9ee97 100644 --- a/src/v1/tests/src/lexical_base_env_test.rs +++ b/src/v1/tests/src/lexical_base_env_test.rs @@ -69,6 +69,7 @@ fn run() -> Int { countdown(n: 200) } let ctx = cli_run::make_eval_context(graph, resolved.source_indices.clone(), ExecutionMode::Wet); + v1_interpreter::arm_call_env_depth_witness_for_test(); match v1_interpreter::run_in_context(&ctx, "run", false) { Ok(Value::Int(0)) => {} other => panic!("expected Int(0), got {other:?}"), @@ -134,6 +135,7 @@ fn run() -> Int { countdown(n: 5) } let ctx = cli_run::make_eval_context(graph, resolved.source_indices.clone(), ExecutionMode::Wet); + v1_interpreter::arm_call_env_depth_witness_for_test(); match v1_interpreter::run_in_context(&ctx, "run", true) { Ok(Value::Int(0)) => {} other => panic!("expected Int(0), got {other:?}"), From 33e1a1eb6beae9d08af975cdc6e1584395e5d205 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 5 Aug 2026 23:25:09 +0000 Subject: [PATCH 07/11] WIP: PR A: reuse one v1-compiler build across release bins and the compile-co --- .github/workflows/ci.yml | 4 ++-- .github/workflows/falsifier.yml | 4 ++-- dag/gunbc/ci_spec.dag | 4 ++-- .../claim/ci_v1_compiler_tests_compile_gate_witness_test.dag | 5 +++-- src/v1/stage0/Cargo.toml | 2 +- src/v1/stage0/src/v1_interpreter.rs | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a7b0532529..e772854eed2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,10 +105,10 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then + if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" - CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey + CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey else exit 1 fi diff --git a/.github/workflows/falsifier.yml b/.github/workflows/falsifier.yml index f480bb5fea2..3fc15d9f0a2 100644 --- a/.github/workflows/falsifier.yml +++ b/.github/workflows/falsifier.yml @@ -74,10 +74,10 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then + if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" - CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey + CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey else exit 1 fi diff --git a/dag/gunbc/ci_spec.dag b/dag/gunbc/ci_spec.dag index 740ed757653..1693df9f7ab 100644 --- a/dag/gunbc/ci_spec.dag +++ b/dag/gunbc/ci_spec.dag @@ -230,7 +230,7 @@ data gunbc_ci_compile_clean_clamp_note: String = "COMPILE-CLEAN LEG CLAMP (prelu data gunbc_ci_compile_clean_clamp: RunnableBatchClamp = RunnableBatchClamp { overhead: second(count: 60), per_unit: millisecond(count: 320) } -data ci_release_features: String = "text_lookup_work_counter" +data ci_release_features: String = "text_lookup_work_counter,interp_test_witness,test_hooks" fn ci_release_build_line() -> String { concat( @@ -252,7 +252,7 @@ fn ci_fmt_gate_line() -> String { "\"$CARGO_BIN\" fmt --all --check" } -data ci_v1_compiler_tests_compile_gate_note: String = "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; no test execution), RE-ORDERED 2026-08-05 (operator ruling, PR A / fierce-heron-177): runs AFTER the release build so the gate reuses the release-profile v1-compiler artifact instead of forcing a second dev-profile compile. ci_release_features carries text_lookup_work_counter only on release bins (no interp_test_witness — depth instrumentation is default-off and armed only in tests that execute it). The test crate's Cargo.toml declares its own v1-compiler feature deps for compile-contract linkage. Affected-set admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with src/v1/tests/**, src/v1/stage0/**, and the Cargo/toolchain build config; disjoint diffs skip with a typed CompileContractAdmissionReceipt (decision=Skip). Diff observation failure / empty diff / departed closure paths RUN unconditionally (fail-closed, never skip on unknown). push-to-main and scheduled controls run the gate unconditionally. Operation shape: v2.workflow.ci_v1_compiler_tests_compile_gate_emit (extdeps.cargo_build cargo.Build.Test)." +data ci_v1_compiler_tests_compile_gate_note: String = "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; no test execution), RE-ORDERED 2026-08-05 (operator ruling, PR A / fierce-heron-177): runs AFTER the release build so the gate reuses the release-profile v1-compiler artifact instead of forcing a second dev-profile compile. ci_release_features carries text_lookup_work_counter,interp_test_witness,test_hooks so release bins and the test crate share ONE release-profile v1-compiler artifact (feature-set union). Per-call depth instrumentation is default-off armed (record_call_env_depth is a relaxed-load guard until a test calls arm_call_env_depth_witness_for_test) — not removed by dropping features. Affected-set admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with src/v1/tests/**, src/v1/stage0/**, and the Cargo/toolchain build config; disjoint diffs skip with a typed CompileContractAdmissionReceipt (decision=Skip). Diff observation failure / empty diff / departed closure paths RUN unconditionally (fail-closed, never skip on unknown). push-to-main and scheduled controls run the gate unconditionally. Operation shape: v2.workflow.ci_v1_compiler_tests_compile_gate_emit (extdeps.cargo_build cargo.Build.Test)." fn ci_retry_body_run(command: String) -> Run { Run { diff --git a/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag b/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag index 02a4fde0e1e..e778b95f4ac 100644 --- a/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag +++ b/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag @@ -62,7 +62,8 @@ test fn w_build_job_enrolls_compile_gate_after_release_build() -> Bool { (build >= 0) && (gate >= 0) && (build < gate) } -test fn w_release_features_exclude_interp_test_witness_on_bins() -> Bool { +test fn w_release_features_align_test_crate_deps() -> Bool { string_contains(s: ci_release_features, pattern: "text_lookup_work_counter") - && !string_contains(s: ci_release_features, pattern: "interp_test_witness") + && string_contains(s: ci_release_features, pattern: "interp_test_witness") + && string_contains(s: ci_release_features, pattern: "test_hooks") } diff --git a/src/v1/stage0/Cargo.toml b/src/v1/stage0/Cargo.toml index 13ef7fdf956..93ff3b2587a 100644 --- a/src/v1/stage0/Cargo.toml +++ b/src/v1/stage0/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [features] default = [] text_lookup_work_counter = [] -# Test-only interpreter instrumentation (default-off until armed). Not enabled on CI release bins. +# Test-only interpreter instrumentation (default-off until armed). Compiled into shared release artifact; inert at runtime until armed. interp_test_witness = [] test_hooks = [] diff --git a/src/v1/stage0/src/v1_interpreter.rs b/src/v1/stage0/src/v1_interpreter.rs index 870e3a30fd2..e015c3c10d4 100644 --- a/src/v1/stage0/src/v1_interpreter.rs +++ b/src/v1/stage0/src/v1_interpreter.rs @@ -138,8 +138,8 @@ thread_local! { static CALL_ENV_DEPTH_PEAK: std::cell::Cell = const { std::cell::Cell::new(0) }; } -/// Default-off: release bins omit `interp_test_witness`; when the feature is present the hook -/// is a guarded no-op until a test arms it. +/// Default-off: when `interp_test_witness` is compiled in, the hook is a guarded no-op (one +/// relaxed atomic load per `eval_call`) until a test arms it. #[cfg(any(test, feature = "interp_test_witness"))] static CALL_ENV_DEPTH_WITNESS_ARMED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false); From e39cee938242192aac2137667880ae91630739a0 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 00:58:23 +0000 Subject: [PATCH 08/11] WIP: PR A: reuse one v1-compiler build across release bins and the compile-co --- dag/gunbc/ci_release_bins.dag | 3 +- dag/gunbc/ci_spec.dag | 72 +------- ...mpiler_tests_compile_gate_witness_test.dag | 14 +- src/v1/stage0/Cargo.toml | 8 - .../bin/compile_contract_admission_witness.rs | 48 ------ src/v1/stage0/src/cli_run.rs | 160 +----------------- 6 files changed, 11 insertions(+), 294 deletions(-) delete mode 100644 src/v1/stage0/src/bin/compile_contract_admission_witness.rs diff --git a/dag/gunbc/ci_release_bins.dag b/dag/gunbc/ci_release_bins.dag index 70fa41f4774..ea598a69b00 100644 --- a/dag/gunbc/ci_release_bins.dag +++ b/dag/gunbc/ci_release_bins.dag @@ -23,8 +23,7 @@ data ci_floor_invoked_bins: List = [ "gunbc", "regen_floor_skip_witness", "floor_skip_discovery_witness", - "selection_control_skip_witness", - "compile_contract_admission_witness" + "selection_control_skip_witness" ] data witness_declared_release_bins: List = [ diff --git a/dag/gunbc/ci_spec.dag b/dag/gunbc/ci_spec.dag index 1693df9f7ab..7f19f054e9a 100644 --- a/dag/gunbc/ci_spec.dag +++ b/dag/gunbc/ci_spec.dag @@ -252,7 +252,7 @@ fn ci_fmt_gate_line() -> String { "\"$CARGO_BIN\" fmt --all --check" } -data ci_v1_compiler_tests_compile_gate_note: String = "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; no test execution), RE-ORDERED 2026-08-05 (operator ruling, PR A / fierce-heron-177): runs AFTER the release build so the gate reuses the release-profile v1-compiler artifact instead of forcing a second dev-profile compile. ci_release_features carries text_lookup_work_counter,interp_test_witness,test_hooks so release bins and the test crate share ONE release-profile v1-compiler artifact (feature-set union). Per-call depth instrumentation is default-off armed (record_call_env_depth is a relaxed-load guard until a test calls arm_call_env_depth_witness_for_test) — not removed by dropping features. Affected-set admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with src/v1/tests/**, src/v1/stage0/**, and the Cargo/toolchain build config; disjoint diffs skip with a typed CompileContractAdmissionReceipt (decision=Skip). Diff observation failure / empty diff / departed closure paths RUN unconditionally (fail-closed, never skip on unknown). push-to-main and scheduled controls run the gate unconditionally. Operation shape: v2.workflow.ci_v1_compiler_tests_compile_gate_emit (extdeps.cargo_build cargo.Build.Test)." +data ci_v1_compiler_tests_compile_gate_note: String = "cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; no test execution), RE-ORDERED 2026-08-05 (operator ruling, PR A / fierce-heron-177): runs AFTER the release build so the gate reuses the release-profile v1-compiler artifact instead of forcing a second dev-profile compile. ci_release_features carries text_lookup_work_counter,interp_test_witness,test_hooks so release bins and the test crate share ONE release-profile v1-compiler artifact (feature-set union). Per-call depth instrumentation is default-off armed (record_call_env_depth is a relaxed-load guard until a test calls arm_call_env_depth_witness_for_test). Affected-set admission (compile_contract_admission_witness + CompileContractAdmissionReceipt) was built per lane brief step 3, measured at 84-133s to skip an 18s compile (resolve_entry_graph_shared for one git diff), and REMOVED 2026-08-06 — the gate runs unconditionally on every build job. Operation shape: v2.workflow.ci_v1_compiler_tests_compile_gate_emit (extdeps.cargo_build cargo.Build.Test)." fn ci_retry_body_run(command: String) -> Run { Run { @@ -439,80 +439,12 @@ fn ci_regen_floor_skip_shortcut_script() -> String { ) } -data compile_contract_admission_witness_bin: String = "compile_contract_admission_witness" - -data ci_compile_contract_admission_policy_note: String = "Affected-set-scoped compile-contract admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with the gate's exact input closure (src/v1/tests/**, src/v1/stage0/**, Cargo.toml, Cargo.lock, rust-toolchain.toml, path-dependency manifests, .cargo config). A PR diff touching none of those cannot change the v1-compiler-tests compile contract, so the gate exits 0 immediately with CompileContractAdmissionReceipt decision=Skip. Empty diff / diff observation failure / departed closure paths RUN the gate (fail-closed — unknown state never skips). COLD CONTROL: the skip is gated to pull_request via GITHUB_EVENT_NAME, so push-to-main and scheduled runs execute the gate UNCONDITIONALLY." - -fn ci_compile_contract_sccache_hit_count_shell() -> String { - "sccache --show-stats 2>/dev/null | awk '/Cache hits/ \{print $NF}' | head -1 || echo 0" -} - -fn ci_compile_contract_sccache_miss_count_shell() -> String { - "sccache --show-stats 2>/dev/null | awk '/Cache misses/ \{print $NF}' | head -1 || echo 0" -} - -fn ci_compile_contract_admission_shortcut_script() -> String { - concat( - concat("# ", concat(ci_compile_contract_admission_policy_note, "\n")), - concat( - "if [ \"$GITHUB_EVENT_NAME\" = \"pull_request\" ]; then\n", - concat( - concat( - concat(" _ci_compile_contract_decision=$(", concat(artifact_shell_path(name: compile_contract_admission_witness_bin), " 2>/dev/null || echo run_compile_contract)")), - "\n if [ \"$_ci_compile_contract_decision\" = \"compile_contract_not_affected_skip\" ]; then\n" - ), - concat( - " printf '%s\\n' \"CompileContractAdmissionReceipt: decision=Skip base=$\{GITHUB_BASE_SHA:-unknown} head=$\{GITHUB_SHA:-unknown} reason=diff_disjoint_from_input_closure\"\n", - concat(" exit 0\n", concat(" fi\n", "fi\n")) - ) - ) - ) - ) -} - -fn ci_compile_contract_run_and_receipt_script() -> String { - concat( - concat("_compile_contract_sccache_hits_before=$(", concat(ci_compile_contract_sccache_hit_count_shell(), ")\n")), - concat( - concat("_compile_contract_sccache_misses_before=$(", concat(ci_compile_contract_sccache_miss_count_shell(), ")\n")), - concat( - "_compile_contract_start_ms=$(date +%s%3N 2>/dev/null || python3 -c 'import time; print(int(time.time()*1000))')\n", - concat( - ci_v1_compiler_tests_compile_gate_script(), - concat( - "_compile_contract_end_ms=$(date +%s%3N 2>/dev/null || python3 -c 'import time; print(int(time.time()*1000))')\n", - concat( - "_compile_contract_wall_ms=$((_compile_contract_end_ms - _compile_contract_start_ms))\n", - concat( - concat("_compile_contract_sccache_hits_after=$(", concat(ci_compile_contract_sccache_hit_count_shell(), ")\n")), - concat( - concat("_compile_contract_sccache_misses_after=$(", concat(ci_compile_contract_sccache_miss_count_shell(), ")\n")), - concat( - "_compile_contract_sccache_hit_delta=$((_compile_contract_sccache_hits_after - _compile_contract_sccache_hits_before))\n", - concat( - "_compile_contract_sccache_miss_delta=$((_compile_contract_sccache_misses_after - _compile_contract_sccache_misses_before))\n", - "printf '%s\\n' \"CompileContractAdmissionReceipt: decision=Run base=$\{GITHUB_BASE_SHA:-unknown} head=$\{GITHUB_SHA:-unknown} compile_wall_ms=$\{_compile_contract_wall_ms} sccache_hit_delta=$\{_compile_contract_sccache_hit_delta} sccache_miss_delta=$\{_compile_contract_sccache_miss_delta} reason=compile_contract_executed\"\n" - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) -} - fn ci_v1_compiler_tests_compile_gate_run_script() -> String { concat( "set -e\n", concat( concat("ROOT=", ci_repo_root_shell(), "\n"), - concat( - ci_compile_contract_admission_shortcut_script(), - ci_compile_contract_run_and_receipt_script() - ) + ci_v1_compiler_tests_compile_gate_script() ) ) } diff --git a/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag b/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag index e778b95f4ac..a36341625ff 100644 --- a/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag +++ b/dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag @@ -38,14 +38,14 @@ test fn w_gate_script_names_release_test_no_run_command() -> Bool { && !string_contains(s: script, pattern: "nextest") } -test fn w_gate_run_script_enrolls_admission_and_receipt() -> Bool { +test fn w_gate_run_script_is_cargo_test_no_run_only() -> Bool { let script = ci_v1_compiler_tests_compile_gate_run_script() - string_contains(s: script, pattern: "compile_contract_admission_witness") - && string_contains(s: script, pattern: "CompileContractAdmissionReceipt") - && string_contains(s: script, pattern: "decision=Skip") - && string_contains(s: script, pattern: "decision=Run") - && string_contains(s: script, pattern: "compile_wall_ms=") - && string_contains(s: script, pattern: "sccache_hit_delta=") + string_contains(s: script, pattern: "'test'") + && string_contains(s: script, pattern: "'v1-compiler-tests'") + && string_contains(s: script, pattern: "'--release'") + && string_contains(s: script, pattern: "'--no-run'") + && !string_contains(s: script, pattern: "compile_contract_admission_witness") + && !string_contains(s: script, pattern: "CompileContractAdmissionReceipt") } test fn w_gate_carrier_is_scaffold() -> Bool { diff --git a/src/v1/stage0/Cargo.toml b/src/v1/stage0/Cargo.toml index 93ff3b2587a..0a2bba789de 100644 --- a/src/v1/stage0/Cargo.toml +++ b/src/v1/stage0/Cargo.toml @@ -215,14 +215,6 @@ path = "src/bin/regen_floor_skip_witness.rs" name = "selection_control_skip_witness" path = "src/bin/selection_control_skip_witness.rs" -# Host-physics CI witness: v1-compiler-tests compile-contract affected-set skip. Prints -# compile_contract_not_affected_skip | run_compile_contract for the build-job compile gate -# by intersecting the merge-base diff with the gate's input closure. Diff failure / empty diff -# / departed paths → run_compile_contract (fail-closed; main + scheduled runs execute cold). -[[bin]] -name = "compile_contract_admission_witness" -path = "src/bin/compile_contract_admission_witness.rs" - # Host-physics floor witness for the v1 interpreter recorded-fixture record -> # hermetic-replay -> fail-closed lifecycle (DESIGN §5 determinism). Drives the real # claim_batch binary with --record/--hermetic/--fixture-store + mutates fixtures on diff --git a/src/v1/stage0/src/bin/compile_contract_admission_witness.rs b/src/v1/stage0/src/bin/compile_contract_admission_witness.rs deleted file mode 100644 index 6a0f2705c92..00000000000 --- a/src/v1/stage0/src/bin/compile_contract_admission_witness.rs +++ /dev/null @@ -1,48 +0,0 @@ -#![allow(clippy::disallowed_macros)] - -//! Affected-set compile-contract admission witness (host fast path). -//! -//! Prints `compile_contract_not_affected_skip` when the merge-base diff touches no input -//! of the v1-compiler-tests compile-contract gate (`src/v1/tests/**`, `src/v1/stage0/**`, -//! Cargo/toolchain build config), else `run_compile_contract`. -//! -//! Fail-closed by RUNNING on uncertainty, never by skipping: diff-observation failure, -//! empty diff, and departed closure paths all answer `run_compile_contract` so unknown -//! state never narrows coverage. Deliberately UNLIKE `selection_control_skip_witness`, -//! which refuses on observation failure — here the gate must still compile when the -//! affected set is unknown. -//! -//! The whole decision lives in `cli_run::compile_contract_admission_label_for_ci`; this bin -//! is just the transport. - -use std::process::ExitCode; - -use v1_compiler::cli_run::{compile_contract_admission_label_for_ci, workspace_root}; - -fn main() -> ExitCode { - std::env::set_current_dir(workspace_root()).expect("chdir to workspace root"); - println!("{}", compile_contract_admission_label_for_ci()); - ExitCode::SUCCESS -} - -#[cfg(test)] -mod tests { - use v1_compiler::cli_run::{ - compile_contract_admission_label_for_ci, COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL, - RUN_COMPILE_CONTRACT_LABEL, - }; - - #[test] - fn labels_are_distinct() { - assert_ne!( - COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL, - RUN_COMPILE_CONTRACT_LABEL - ); - let label = compile_contract_admission_label_for_ci(); - assert!( - label == COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL - || label == RUN_COMPILE_CONTRACT_LABEL, - "unexpected label: {label}" - ); - } -} diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index c6131bcd125..a92d244e507 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -3873,81 +3873,6 @@ pub fn selection_control_skip_label_for_ci() -> Result bool { - let p = normalize_repo_path(changed); - if p.starts_with("src/v1/tests/") || p.starts_with("src/v1/stage0/") { - return true; - } - if p == "Cargo.lock" - || p == "Cargo.toml" - || p.ends_with("/Cargo.toml") - || p == "rust-toolchain.toml" - || p == "rust-toolchain" - || p == ".cargo/config.toml" - || p == ".cargo/config" - { - return true; - } - false -} - -/// CI label for the build-job compile-contract gate's affected-set skip arm. -/// `compile_contract_not_affected_skip` iff the merge-base diff touches no compile-contract -/// input; `run_compile_contract` on any intersection, empty diff, departed closure path, -/// or observation failure (fail-closed — unknown state runs, never skips). The CI shell -/// gates the skip to pull_request events; push-to-main and scheduled controls run the gate -/// unconditionally. -pub fn compile_contract_admission_label_for_ci() -> String { - let (changed_paths, departed_paths) = match floor_git_diff_name_status_range() { - Ok(v) => v, - Err(msg) => { - eprintln!( - "compile-contract admission: diff observation failed ({msg}) — run the gate (fail-closed)" - ); - return RUN_COMPILE_CONTRACT_LABEL.to_string(); - } - }; - if changed_paths.is_empty() { - eprintln!( - "compile-contract admission: empty diff — run the gate (degenerate observation for pull_request)" - ); - return RUN_COMPILE_CONTRACT_LABEL.to_string(); - } - if let Some(gone) = departed_paths.iter().min() { - eprintln!( - "compile-contract admission: departed path in diff ({}) — run the gate (current-tree closure cannot see deletions)", - normalize_repo_path(gone) - ); - return RUN_COMPILE_CONTRACT_LABEL.to_string(); - } - let matched: Vec = changed_paths - .iter() - .filter(|p| compile_contract_path_affects_gate(p)) - .map(|p| normalize_repo_path(p)) - .collect(); - if matched.is_empty() { - eprintln!( - "compile-contract admission: {} changed path(s), none intersect the compile-contract input closure (src/v1/tests/**, src/v1/stage0/**, Cargo/toolchain config) — skip the gate (push-to-main runs it unconditionally as the cold control)", - changed_paths.len() - ); - COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL.to_string() - } else { - eprintln!( - "compile-contract admission: diff intersects the compile-contract input closure (e.g. {}) — run the gate", - matched.iter().min().unwrap_or(&String::new()) - ); - RUN_COMPILE_CONTRACT_LABEL.to_string() - } -} - fn compile_clean_scope_plan_for_ci() -> CompileCleanScopePlan { // Falsifier cold-control arm: force the whole-tree compile before any diff observation. // Widen-to-more-checking only — this env can never skip or narrow the gate, so it is a @@ -34699,90 +34624,7 @@ mod witness_layer_roots_compile_clean_tests { ); } - /// Compile-contract admission SKIP arm: a docs-only diff cannot change the gate verdict. - #[test] - fn compile_contract_admission_skips_on_docs_only_diff() { - with_env_test_lock(|| { - with_workspace_cwd(|| { - let _ns = EnvGuard::set( - "GUNBC_CI_DIFF_NAME_STATUS", - "M\\000docs/plans/example.md\\000", - ); - assert_eq!( - compile_contract_admission_label_for_ci(), - COMPILE_CONTRACT_NOT_AFFECTED_SKIP_LABEL - ); - }); - }); - } - - /// RUN arm — a changed v1 integration-test file must compile the gate. - #[test] - fn compile_contract_admission_runs_on_changed_v1_test_file() { - with_env_test_lock(|| { - with_workspace_cwd(|| { - let _ns = EnvGuard::set( - "GUNBC_CI_DIFF_NAME_STATUS", - "M\\000src/v1/tests/src/helpers.rs\\000", - ); - assert_eq!( - compile_contract_admission_label_for_ci(), - RUN_COMPILE_CONTRACT_LABEL - ); - }); - }); - } - - /// RUN arm — a changed public v1-compiler surface must compile the gate. - #[test] - fn compile_contract_admission_runs_on_changed_stage0_signature() { - with_env_test_lock(|| { - with_workspace_cwd(|| { - let _ns = EnvGuard::set( - "GUNBC_CI_DIFF_NAME_STATUS", - "M\\000src/v1/stage0/src/cli_run.rs\\000", - ); - assert_eq!( - compile_contract_admission_label_for_ci(), - RUN_COMPILE_CONTRACT_LABEL - ); - }); - }); - } - - /// RUN arm — departed paths are invisible to the current-tree closure. - #[test] - fn compile_contract_admission_runs_on_departed_path() { - with_env_test_lock(|| { - with_workspace_cwd(|| { - let _ns = EnvGuard::set( - "GUNBC_CI_DIFF_NAME_STATUS", - "D\\000src/v1/tests/src/helpers.rs\\000", - ); - assert_eq!( - compile_contract_admission_label_for_ci(), - RUN_COMPILE_CONTRACT_LABEL - ); - }); - }); - } - - /// Fail-closed RUN arm — an unobservable diff must RUN, never skip. - #[test] - fn compile_contract_admission_runs_when_diff_observation_fails() { - with_env_test_lock(|| { - with_workspace_cwd(|| { - let _ns = - EnvGuard::set("GUNBC_CI_DIFF_NAME_STATUS", "Z\\000src/v1/whatever.rs\\000"); - assert_eq!( - compile_contract_admission_label_for_ci(), - RUN_COMPILE_CONTRACT_LABEL - ); - }); - }); - } - - /// The unblocked scoped arm, by execution: a single touched dag entry selects at least + fn selection_control_refusal_causes_are_distinct_and_countable() { /// itself through the import-closure grain (the discriminating RED for this arm is /// `floor_fast_plan_whole_tree_on_mixed_rs_and_dag_touch` — same touch set plus an `.rs` /// path flips the disposition to whole-tree). From 98339ed19eba2d2388c123ad9ca5064554df4ff2 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 00:59:04 +0000 Subject: [PATCH 09/11] Remove compile-contract admission from CI workflows. The witness cost 84-133s to skip an 18s gate compile; drop it from build/verify/pack and run the gate unconditionally. Co-authored-by: Cursor --- .github/workflows/ci.yml | 34 ++++++++------------------------- .github/workflows/falsifier.yml | 10 +++++----- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e772854eed2..ebb678a3a79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,48 +105,30 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then + if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" - CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey + CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey else exit 1 fi fi rm -f "$BUILD_LOG" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" sccache --show-stats 2>/dev/null || true timeout-minutes: 45 - name: cargo test -p v1-compiler-tests --release --no-run (compile-contract gate; reuses release v1-compiler) run: | set -e ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) - # Affected-set-scoped compile-contract admission (pull_request only): compile_contract_admission_witness intersects the merge-base diff with the gate's exact input closure (src/v1/tests/**, src/v1/stage0/**, Cargo.toml, Cargo.lock, rust-toolchain.toml, path-dependency manifests, .cargo config). A PR diff touching none of those cannot change the v1-compiler-tests compile contract, so the gate exits 0 immediately with CompileContractAdmissionReceipt decision=Skip. Empty diff / diff observation failure / departed closure paths RUN the gate (fail-closed — unknown state never skips). COLD CONTROL: the skip is gated to pull_request via GITHUB_EVENT_NAME, so push-to-main and scheduled runs execute the gate UNCONDITIONALLY. - if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then - _ci_compile_contract_decision=$("$ROOT/target/release/compile_contract_admission_witness" 2>/dev/null || echo run_compile_contract) - if [ "$_ci_compile_contract_decision" = "compile_contract_not_affected_skip" ]; then - printf '%s\n' "CompileContractAdmissionReceipt: decision=Skip base=${GITHUB_BASE_SHA:-unknown} head=${GITHUB_SHA:-unknown} reason=diff_disjoint_from_input_closure" - exit 0 - fi - fi - _compile_contract_sccache_hits_before=$(sccache --show-stats 2>/dev/null | awk '/Cache hits/ {print $NF}' | head -1 || echo 0) - _compile_contract_sccache_misses_before=$(sccache --show-stats 2>/dev/null | awk '/Cache misses/ {print $NF}' | head -1 || echo 0) - _compile_contract_start_ms=$(date +%s%3N 2>/dev/null || python3 -c 'import time; print(int(time.time()*1000))') # 🟡 dissolve-on: ci_v1_compiler_tests_compile_gate_script — foreign-executor (GitHub Actions run:) shell transport for extdeps.cargo_build cargo.Build.Test(extra_args: ci_v1_compiler_tests_compile_gate_extra_args); DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) binds the build-job step to orchestration emit over the typed cargo operation — the same de-fork ci_fmt_gate_line and ci_release_build_script await "$CARGO_BIN" 'test' '-p' 'v1-compiler-tests' '--release' '--no-run' - _compile_contract_end_ms=$(date +%s%3N 2>/dev/null || python3 -c 'import time; print(int(time.time()*1000))') - _compile_contract_wall_ms=$((_compile_contract_end_ms - _compile_contract_start_ms)) - _compile_contract_sccache_hits_after=$(sccache --show-stats 2>/dev/null | awk '/Cache hits/ {print $NF}' | head -1 || echo 0) - _compile_contract_sccache_misses_after=$(sccache --show-stats 2>/dev/null | awk '/Cache misses/ {print $NF}' | head -1 || echo 0) - _compile_contract_sccache_hit_delta=$((_compile_contract_sccache_hits_after - _compile_contract_sccache_hits_before)) - _compile_contract_sccache_miss_delta=$((_compile_contract_sccache_misses_after - _compile_contract_sccache_misses_before)) - printf '%s\n' "CompileContractAdmissionReceipt: decision=Run base=${GITHUB_BASE_SHA:-unknown} head=${GITHUB_SHA:-unknown} compile_wall_ms=${_compile_contract_wall_ms} sccache_hit_delta=${_compile_contract_sccache_hit_delta} sccache_miss_delta=${_compile_contract_sccache_miss_delta} reason=compile_contract_executed" timeout-minutes: 15 - name: Pack release bins for cross-job handoff (tar keeps exec bits) run: | # 🟡 dissolve-on: ci_release_bins_pack_script — concat-built foreign-executor (GitHub Actions run:) release-bins tar pack runner; membership of archived bin names is derived from gunbc.ci_release_bins, but the pack transport itself remains hand-shell; DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) realizes the pack runner through orchestration emit or typed host_effect_apply without a medium-as-string concat scaffold ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) - tar -czf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" "claim_executor" "gunbc" "regen_floor_skip_witness" "floor_skip_discovery_witness" "selection_control_skip_witness" "compile_contract_admission_witness" "discover_source_root_ingest" "claim_batch" "regen_stage0" "interp_recorded_fixture_witness" "v1_src_dag_parse" "auth_declared_but_unwired_witness" "bootstrap_witness" "dag_collect_fingerprint_witness" "diagnostics_witness" "effects_rest_transport_witness" "infer_semantics_witness" "parse_witness" "resolution_divergence_census" "cssl_assemble" "frontier_probe_survey" + tar -czf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" "claim_executor" "gunbc" "regen_floor_skip_witness" "floor_skip_discovery_witness" "selection_control_skip_witness" "discover_source_root_ingest" "claim_batch" "regen_stage0" "interp_recorded_fixture_witness" "v1_src_dag_parse" "auth_declared_but_unwired_witness" "bootstrap_witness" "dag_collect_fingerprint_witness" "diagnostics_witness" "effects_rest_transport_witness" "infer_semantics_witness" "parse_witness" "resolution_divergence_census" "cssl_assemble" "frontier_probe_survey" timeout-minutes: 5 - name: Upload release-bins artifact uses: actions/upload-artifact@v4 @@ -202,7 +184,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: gunbc ci regen (self-host fixed-point — required) run: | @@ -279,7 +261,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: Floor cgroup peak pre-read (calibration; reset if permitted) run: | @@ -356,7 +338,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: Deploy dashboard to srv1 (live_deploy_apply_srv1_wet) run: | @@ -389,7 +371,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: Converge repository-local Git integration bindings (repo_local_git_config converge) run: | diff --git a/.github/workflows/falsifier.yml b/.github/workflows/falsifier.yml index 3fc15d9f0a2..b28d70c1a72 100644 --- a/.github/workflows/falsifier.yml +++ b/.github/workflows/falsifier.yml @@ -74,16 +74,16 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then + if ! ("$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" - CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin compile_contract_admission_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey + CARGO_BUILD_JOBS=1 "$CARGO_BIN" build -p v1-compiler --release --features text_lookup_work_counter,interp_test_witness,test_hooks --bin claim_executor --bin gunbc --bin regen_floor_skip_witness --bin floor_skip_discovery_witness --bin selection_control_skip_witness --bin discover_source_root_ingest --bin claim_batch --bin regen_stage0 --bin interp_recorded_fixture_witness --bin v1_src_dag_parse --bin auth_declared_but_unwired_witness --bin bootstrap_witness --bin dag_collect_fingerprint_witness --bin diagnostics_witness --bin effects_rest_transport_witness --bin infer_semantics_witness --bin parse_witness --bin resolution_divergence_census --bin cssl_assemble --bin frontier_probe_survey else exit 1 fi fi rm -f "$BUILD_LOG" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" sccache --show-stats 2>/dev/null || true timeout-minutes: 45 - name: Affected-set selection control (floor_skip_discovery_witness) @@ -103,7 +103,7 @@ jobs: run: | # 🟡 dissolve-on: ci_release_bins_pack_script — concat-built foreign-executor (GitHub Actions run:) release-bins tar pack runner; membership of archived bin names is derived from gunbc.ci_release_bins, but the pack transport itself remains hand-shell; DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell→intent Phase 2) realizes the pack runner through orchestration emit or typed host_effect_apply without a medium-as-string concat scaffold ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) - tar -czf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" "claim_executor" "gunbc" "regen_floor_skip_witness" "floor_skip_discovery_witness" "selection_control_skip_witness" "compile_contract_admission_witness" "discover_source_root_ingest" "claim_batch" "regen_stage0" "interp_recorded_fixture_witness" "v1_src_dag_parse" "auth_declared_but_unwired_witness" "bootstrap_witness" "dag_collect_fingerprint_witness" "diagnostics_witness" "effects_rest_transport_witness" "infer_semantics_witness" "parse_witness" "resolution_divergence_census" "cssl_assemble" "frontier_probe_survey" + tar -czf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" "claim_executor" "gunbc" "regen_floor_skip_witness" "floor_skip_discovery_witness" "selection_control_skip_witness" "discover_source_root_ingest" "claim_batch" "regen_stage0" "interp_recorded_fixture_witness" "v1_src_dag_parse" "auth_declared_but_unwired_witness" "bootstrap_witness" "dag_collect_fingerprint_witness" "diagnostics_witness" "effects_rest_transport_witness" "infer_semantics_witness" "parse_witness" "resolution_divergence_census" "cssl_assemble" "frontier_probe_survey" timeout-minutes: 5 - name: Upload release-bins artifact uses: actions/upload-artifact@v4 @@ -159,7 +159,7 @@ jobs: mkdir -p "$ROOT/target/release" tar -xzf "$ROOT/release-bins.tgz" -C "$ROOT/target/release" rm -f "$ROOT/release-bins.tgz" - "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/compile_contract_admission_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" + "$ROOT/target/release/claim_executor" --verify-build-artifacts "$ROOT/target/release/claim_executor" "$ROOT/target/release/gunbc" "$ROOT/target/release/regen_floor_skip_witness" "$ROOT/target/release/floor_skip_discovery_witness" "$ROOT/target/release/selection_control_skip_witness" "$ROOT/target/release/discover_source_root_ingest" "$ROOT/target/release/claim_batch" "$ROOT/target/release/regen_stage0" "$ROOT/target/release/interp_recorded_fixture_witness" "$ROOT/target/release/v1_src_dag_parse" "$ROOT/target/release/auth_declared_but_unwired_witness" "$ROOT/target/release/bootstrap_witness" "$ROOT/target/release/dag_collect_fingerprint_witness" "$ROOT/target/release/diagnostics_witness" "$ROOT/target/release/effects_rest_transport_witness" "$ROOT/target/release/infer_semantics_witness" "$ROOT/target/release/parse_witness" "$ROOT/target/release/resolution_divergence_census" "$ROOT/target/release/cssl_assemble" "$ROOT/target/release/frontier_probe_survey" timeout-minutes: 5 - name: Floor cgroup peak pre-read (calibration; reset if permitted) run: | From ab51d47a1fcb8233b628d1c94870f2ad85d224f8 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 00:59:33 +0000 Subject: [PATCH 10/11] Fix cli_run test module after admission test removal. Restore the doc comment and test boundary broken when deleting the compile-contract admission unit tests. Co-authored-by: Cursor --- src/v1/stage0/src/cli_run.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index a92d244e507..4ae096caa66 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -34624,7 +34624,7 @@ mod witness_layer_roots_compile_clean_tests { ); } - fn selection_control_refusal_causes_are_distinct_and_countable() { + /// The unblocked scoped arm, by execution: a single touched dag entry selects at least /// itself through the import-closure grain (the discriminating RED for this arm is /// `floor_fast_plan_whole_tree_on_mixed_rs_and_dag_touch` — same touch set plus an `.rs` /// path flips the disposition to whole-tree). From a59429214d5655febf603f2cafaba5d9e35c38b6 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 01:19:59 +0000 Subject: [PATCH 11/11] Align hand-Rust scaffold receipt with release compile gate. Update the dissolve trigger to cite cargo test --release --no-run after the release build, matching ci_v1_compiler_tests_compile_gate_emit. Co-authored-by: Cursor --- .../v1_compiler_tests_typecheck_module_callers_scaffold.dag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dag/gunbc/v1_compiler_tests_typecheck_module_callers_scaffold.dag b/dag/gunbc/v1_compiler_tests_typecheck_module_callers_scaffold.dag index c0f8bbcb96d..94874e943d4 100644 --- a/dag/gunbc/v1_compiler_tests_typecheck_module_callers_scaffold.dag +++ b/dag/gunbc/v1_compiler_tests_typecheck_module_callers_scaffold.dag @@ -13,7 +13,7 @@ data v1_compiler_tests_typecheck_module_callers_hand_rust_scaffold: Disposition } } -data v1_compiler_tests_typecheck_module_callers_hand_rust_dissolve_trigger: String = "🟡 dissolve-on: the four src/v1/tests/src/* integration-test typecheck_module call sites wired for #7490's global_variant_base seventh argument — counted interim HAND-Rust growth, NOT a census shrink (review 45400). The checkable receipt is NOT a marker grep in the test files: cargo check -p v1-compiler-tests --tests enrolled on the build job (v2.workflow.ci_v1_compiler_tests_compile_gate_emit / dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag) proves every direct caller compiles after each signature migration. DISSOLVES WHEN the v1-compiler-tests crate crosses the emitted-crate partition / v1-zero-hand-maintained-rust frontier and these seed integration tests delete with the crate — authority dag/gunbc/v1_deletion_plan.dag, ROADMAP v1-zero-hand-maintained-rust." +data v1_compiler_tests_typecheck_module_callers_hand_rust_dissolve_trigger: String = "🟡 dissolve-on: the four src/v1/tests/src/* integration-test typecheck_module call sites wired for #7490's global_variant_base seventh argument — counted interim HAND-Rust growth, NOT a census shrink (review 45400). The checkable receipt is NOT a marker grep in the test files: cargo test -p v1-compiler-tests --release --no-run enrolled on the build job after the release build (v2.workflow.ci_v1_compiler_tests_compile_gate_emit / dag/test/claim/ci_v1_compiler_tests_compile_gate_witness_test.dag) proves every direct caller compiles after each signature migration. DISSOLVES WHEN the v1-compiler-tests crate crosses the emitted-crate partition / v1-zero-hand-maintained-rust frontier and these seed integration tests delete with the crate — authority dag/gunbc/v1_deletion_plan.dag, ROADMAP v1-zero-hand-maintained-rust." data v1_compiler_tests_typecheck_module_callers_hand_rust_loc_delta_net: Int = 4