Skip to content

PR A: one release-profile v1-compiler build per CI build job (align features, gate after release) - #7868

Merged
briansrls merged 11 commits into
mainfrom
session/fierce-heron-177
Aug 6, 2026
Merged

briansrls merged 11 commits into
mainfrom
session/fierce-heron-177

Conversation

@briansrls

@briansrls briansrls commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

One release-profile v1-compiler build per CI build job: align ci_release_features with v1-compiler-tests (text_lookup_work_counter,interp_test_witness,test_hooks), run cargo test --release --no-run after the release build so the gate reuses the same artifact, and default-off interp_test_witness arming so release bins compile without per-call chain-walk instrumentation.

Admission removed: the lane brief step 3 asked for change-sensitive admission. We built it (compile_contract_admission_witness, receipt, five unit tests). Measurement showed it costs 84–133s (resolve_entry_graph_shared for one git diff; the diff itself is 16–18ms) to decide whether to skip an 18s gate compile — a net loss on every PR, including docs-only skips. Removed rather than kept because it was requested.

Structural claim (proven — log, not wall-clock)

One release-profile v1-compiler compile per build job. Release step logs Compiling v1-compiler once; the gate step compiles only v1-compiler-tests against that artifact. Feature union closes the artifact fork; default-off arming keeps the shared interp_test_witness feature inert in release bins (one relaxed load per eval_call until a test calls arm_call_env_depth_witness_for_test).

Gate command benefit (controlled local comparison)

CI wall-clock on this fleet is a per-slot workspace lottery: self-hosted runners keep _work/target/ between jobs, so the same gate command spans 18s–4m30 depending on which slot you draw — not on the change. actions/cache (~250 MB) is registry/index only; sccache deltas of hit 0 / miss 1 appeared on both fast and slow samples. No single CI run measures the PR; collecting more CI samples samples the lottery.

Controlled comparison on this worktree (RUSTC_WRAPPER= unset, CARGO_INCREMENTAL=0):

Command Wall time
old cold cargo check -p v1-compiler-tests --tests (dev profile; cleans v1-compiler + v1-compiler-tests) 63.6s
old warm same 0.31s
new cold cargo test -p v1-compiler-tests --release --no-run (release v1-compiler already built; clean v1-compiler-tests only) 18.2s
new warm same 0.33s

New-cold beats old-cold; warm paths tie. That is the gate-command claim this PR makes.

CI observations (illustrative only — slot-dependent)

Run Host Gate step Notes
31045643507 srv2-04 ~18s cargo warm slot
31062435170 srv2-01 2m41 gate step current head; admission gone
31056301056 srv1-04 ~4m30 gate cargo broken-host OOM / sccache placement (separate known defect)

Do not read any one row as steady-state CI cost.

Merge bar

Bar Status
Expensive v1-compiler compilations = 1 Proven (release-step log)
Build job materially faster Gate command: local controlled comparison above; CI wall: slot lottery — cannot certify from one sample
Floor wall non-regressing Default-off arming; depth tests arm explicitly

Open (operator): one shared artifact vs literally-zero per-call instructions vs full compile-coverage.

Test plan

  • Compile gate witness (ordering, feature alignment, unconditional cargo command)
  • Gate log artifact-reuse proof
  • Controlled local old-vs-new gate timing (four samples above)
  • Admission removal verified (zero compile_contract in cli_run.rs; witness bin gone)

Brian Searls and others added 2 commits August 5, 2026 19:49
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 <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 5, 2026 20:29
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Brian Searls and others added 3 commits August 5, 2026 20:45
… 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 <cursoragent@cursor.com>
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 4c8ab44 (WIP compile_contract_surface path abandoned
per operator: guarded default-off is the cheaper fix).

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Addressed review 49123 in 52c748cbf:

  • ci_release_features is now text_lookup_work_counter only; interp_test_witness and test_hooks are dropped from the release build line (ci.yml/falsifier.yml updated to match).
  • Default-off arming instead of compile_contract_surface: record_call_env_depth is behind interp_test_witness and returns immediately unless arm_call_env_depth_witness_for_test() was called. Release bins omit the feature, so claim_executor/gunbc do not contain the hook at all.
  • The WIP 4c8ab445c path (which introduced compile_contract_surface and failed cargo fmt) is reverted/superseded.

Warm compile-gate locally after cached test graph: ~0.27s (vs ~173s first compile). CI re-running on this head.

— sent from fierce-heron-177

Brian Searls and others added 3 commits August 5, 2026 23:25
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 <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot changed the title PR A: reuse one v1-compiler build across release bins and the compile-contract gate (align profile+features, change-sensitive admission, fail-closed) PR A: one release-profile v1-compiler build per CI build job (align features, gate after release) Aug 6, 2026
Brian Searls and others added 2 commits August 6, 2026 00:59
Restore the doc comment and test boundary broken when deleting the
compile-contract admission unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
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 <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

review 49198 (Composer REQUEST_CHANGES): Verified — v1_compiler_tests_typecheck_module_callers_hand_rust_dissolve_trigger still cited cargo check -p v1-compiler-tests --tests while the build job now enrolls cargo test -p v1-compiler-tests --release --no-run after the release build (ci_v1_compiler_tests_compile_gate_emit / ci_v1_compiler_tests_compile_gate_witness_test.dag). Updated the scaffold line to match (a594292).

— sent from fierce-heron-177

@briansrls
briansrls merged commit 92d2dc4 into main Aug 6, 2026
5 checks passed
@briansrls
briansrls deleted the session/fierce-heron-177 branch August 6, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant