Repository navigation
ci: batch node-frontier gate green pass (resolve-once-run-many, ~114s off the step) - #4614
Conversation
The v4 affected-set node-frontier CI gate runs 15 Bool witnesses (9 node-frontier + 6 affected-testgen) whose green pass re-resolved the entire src/v4 module closure once per witness. The witnesses in each sub-gate all share one --entry, so the resolve was pure redundancy: measured one affected-testgen witness via `gunbc run` = 13.2s; all six via batch = 13.4s — the resolve is the whole cost, the witness eval is free. Add a hand-written `claim_batch` bin (like regen_stage0) that resolves one shared --entry closure once and runs all --functions against it, reusing the same resolve/run primitives the `gunbc run --claim-run` path uses (new pub cli_run::resolve_entry_graph / run_claim / ClaimOutcome). Deliberately a separate bin, NOT a `gunbc run --functions` flag, so the capability touches no load-bearing emit stage (the CLI is cemented Rust inside 05_emit_rust.dag). Gate script: green pass now batches by shared entry (9->1 and 6->1 resolves). The perturb pass is UNCHANGED — still one mutated resolve per row, since each row mutates a different function — so the red-under-perturb discrimination contract is identical. Validated locally: full gate --perturb-check green (15/15 PASS via batch, all 15 perturb rows still red, exit 0). Green savings ~114s on the step (node-frontier ~48s + affected-testgen ~66s). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…espace)
The node-frontier gate (v4_lens_ci) now needs both gunbc and the new
claim_batch binary. The job previously cached only target/release/gunbc
under the shared 'gunbc-bin-' key (also used by ci_floor / ci_floor_emit,
which build gunbc only). On an exact-key cache hit the build step is
skipped, so v4_lens_ci could restore a gunbc-only cache and run the gate
with claim_batch absent -> gate fails its binary existence check.
Fix: give v4_lens_ci its own cache namespace ('gunbc-lens-bin-') whose
path includes both binaries. Both are produced by the same
`cargo build -p v2-compiler --release`, so they stay in sync and are
restored together. The distinct prefix also avoids restoring the
gunbc-only caches saved under 'gunbc-bin-'.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
4d4d5f7a· Trigger:schedule - Thinking:
244s wall
BLOCKING (1)
Root Cause
.github/workflows/ci.ymlbinary cache/build condition is keyed to gunbc alone → cache target/release/claim_batch too or make the build step run unless both required binaries exist.
|
Violations (could not place on specific lines):
|
…_lens_gate Merging main (#4612) split the old combined v4_lens job into v4_lens_gate (lens witnesses, gunbc only) and v4_lens_ci (node-frontier witnesses, needs claim_batch). My earlier cache fix (53bf3d4) auto-merged onto the v4_lens_gate half by text match, leaving the actual node-frontier job on the gunbc-only 'gunbc-bin-' cache — so it still skipped the build on a cache hit and ran the gate with claim_batch absent. Move the gunbc-lens-bin- namespace + claim_batch path onto v4_lens_ci (the node-frontier gate, scripts/v4-affected-set-node-frontier-gate.sh) and restore v4_lens_gate to the shared gunbc-only cache it needs. Validated locally: built both binaries and ran the node-frontier gate with --perturb-check against merged src/v4 -> exit 0 (all witnesses green, all perturb rows red). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed the BLOCKING finding (claim_batch availability in CI) — fix pushed, not a reply-only. Root cause was exactly as flagged: Fix (commits Validated locally: built both binaries and ran — sent from bold-ferret-385 |
What
The v4 affected-set node-frontier CI gate (
scripts/v4-affected-set-node-frontier-gate.sh, the single longest step in the CI run — ~253s on the arm64 runner, the wall-clock critical path) runs 15 Bool witnesses (9 node-frontier + 6 affected-testgen). Its green pass re-resolved the entiresrc/v4module closure once per witness, even though all witnesses in each sub-gate share one--entryand differ only in--function.Measured on this machine: one affected-testgen witness via
gunbc run= 13.2s; all six via the new batch = 13.4s. The resolve is the whole cost; witness eval is essentially free.How
claim_batchbin (src/v2/stage0/src/bin/claim_batch.rs, + Cargo[[bin]]): resolves one shared--entryclosure once, runs all--functionsagainst it, prints per-functionPASS/FAIL, fail-closed exit (1 on any red / non-Bool / runtime error / resolve failure).cli_run.rs(resolve_entry_graph,run_claim,ClaimOutcome): alternate orchestration over the same resolve/run primitives thegunbc run --claim-runpath uses — not a second copy of the resolve logic.handle_run_with_options(the critical-path single-run path) is untouched.Why a separate bin, not
gunbc run --functionsThe natural CLI form would enlarge cemented Rust string-literals inside
emit_main_rs(src/v2/05_emit_rust.dag) — the emit stage, load-bearing perSELF_HOSTING.md. A separate hand-written bin (like the existingregen_stage0) delivers the same win and touches no pipeline stage, no generatedmain.rs, and has no stage0-freshness impact.Validation (local)
claim_batchsmoke: 3 witnesses in one ~5.8s resolve, all PASS; bad function → exit 1.--perturb-check: green 15/15 PASS via batch, all 15 perturb rows still go red, exit 0.cargo fmt --all --checkclean;cargo clippy ... --bin claim_batch -D warningsclean.Green savings ≈ 114s on the step (node-frontier ~48s + affected-testgen ~66s). The lens gate is intentionally untouched (its rows have distinct entries — no shared resolve to amortize; it is being split into a parallel job separately in #4612).
🤖 Generated with Claude Code