Repository navigation
Compile v1-compiler's test targets in CI: the population no gate compiled - #8191
Conversation
…iled MEASURED HOLE. v1-compiler carries 24 files with cfg(test) modules and nothing in CI compiled any of them, so a test module referencing helpers it cannot see sits on main with every gate green. Today's specimen, still live on main at b33a9c0: cargo check -p v1-compiler --all-targets -> exit 101 error[E0425]: cannot find function `with_env_test_lock` error[E0433]: unresolved module or unlinked crate `floor_discovery_snapshot` error[E0433]: undeclared type `EnvGuard` error[E0425]: cannot find value `FLOOR_DISCOVERY_CONSUMER_ENV` error: could not compile `v1-compiler` (lib test) due to 4 previous errors Why the three existing gates structurally cannot see it: the release build compiles binaries, not test targets; ci_stage0_partition_compile_gate checks the seven generated partition crates without test targets (and all seven carry zero cfg(test) files, measured); and the v1-compiler-tests gate compiles and runs a DIFFERENT workspace crate. NOT a nextest re-enrollment. gunbc.commit_workflow commit_gate_rust_suite_removed_disposition rejects that, and every rationale in it is a fact about EXECUTION -- ~37 GiB, red on main, seed runtime, ~42min. This is cargo.Build.Check, compile-only, and runs no test. Same separable-fact argument that re-enrolled fmt (2026-07-15) and the v1-compiler-tests compile half (2026-07-31). Scoped to -p v1-compiler, not --workspace: partition crates are already Check-ed and have no test targets to miss, and v1-compiler-tests has its own gate, so a workspace-wide check would re-check covered lib targets for no gain (DESIGN 2). --all-targets is supplied by the WORKFLOW layer through extra_args, exactly as ci_stage0_partition_compile_gate_extra_args supplies -p. DESIGN 3 names a bare --all-targets in an extdeps argv as the policy-leak tell and v2.lens.extdeps_shape_transport_policy reds on it; that reading is respected rather than evaded -- extdeps.cargo_build keeps the agnostic shape. Cost: 99s measured (b33a9c0, cargo check --workspace --all-targets, cold, remote), an upper bound for this single-package step. Budget 10m, deliberately below the 15m the sibling gates carry on an unmeasured cold envelope. Placed after the release build so it reuses the release-profile v1-compiler artifact. Evidence: emitted -> ci.yml:142, "$CARGO_BIN" 'check' '-p' 'v1-compiler' '--all-targets' witness -> PASS ci_build_job_backstop_is_step_sum_plus_prelude red ctrl -> the gate's exact argv reproduces all 4 errors on main WHAT THIS DOES NOT DO: it does not execute those tests. Compiling a test module proves its references resolve, never that its assertions hold. The 24 files still have no executing consumer on any CI path -- including the five union_dedup_import_facts_law tests gunbc#8162 added to the very file this specimen came from. Execution cost is left UNMEASURED on purpose: main's lib test target does not currently compile, so the number can only be taken on a green tree. SEQUENCING: this cannot go green until the 4 errors are fixed by #8167 / #8173, which carry that repair. Merge those first; this gate then prevents the recurrence. The fix is deliberately not duplicated here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxLzhuMisV3GAPpP2mBtSG
Review on gunbc#8191 (cursor/composer-2.5, review 51383) was right: the PR enrolled a new gate while pinning only the backstop sum. Arithmetic over timeouts establishes nothing about what the gate EMITS, which is DESIGN 5 specification-without-execution for an enrolled gate. Seven witnesses, mirroring test.claim.ci_stage0_partition_compile_gate_witness: emitted argv, extra_args equality, scaffold disposition, dissolve marker, the exact plan-plus-marker composition, build-job enrollment, and a RED refusal through a bogus operation name. The argv is pinned TOKEN-BY-TOKEN rather than as one string because the three tokens rot independently. `check` -> `test` would silently convert this into the execution gate the standing nextest ruling rejects. Widening `-p v1-compiler` would re-check what the partition gate already covers. And dropping `--all-targets` is the quiet one: the step still passes, still looks enrolled, and covers exactly the population that was uncovered before this gate existed -- the case a single-string assertion would miss most easily. Green by execution, all seven: PASS w_v1_compiler_test_targets_gate_script_carries_check_scope_and_all_targets PASS w_v1_compiler_test_targets_gate_extra_args_are_exactly_scope_then_all_targets PASS w_v1_compiler_test_targets_gate_shell_emit_is_scaffold_holds PASS w_v1_compiler_test_targets_gate_emit_carries_dissolve_marker_holds PASS w_v1_compiler_test_targets_gate_script_is_typed_plan_plus_marker PASS w_build_job_enrolls_v1_compiler_test_targets_compile_gate_holds PASS w_v1_compiler_test_targets_gate_RED_missing_operation_refuses The review's other finding — that merging reds the build job on the current tree — is factually correct and now enforced rather than described: #8167 and #8173 are still open, cli_run.rs:29991 still calls with_env_test_lock without the import, so the PR is converted to DRAFT until that repair lands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxLzhuMisV3GAPpP2mBtSG
Both findings addressedFinding 2 — no witness pinned the emitted script. Accepted; fixed in You were right that updating the backstop sum establishes arithmetic over timeouts and nothing about what the gate emits. The argv is pinned token-by-token rather than as one string, because the three tokens rot independently: Finding 1 — merging reds the build job. Factually correct; now enforced instead of described. I verified it rather than taking it on trust: #8167 and #8173 are both still open, and On this PR's own red CI, which is the gate workingThat is the designed behaviour on first execution, not a defect to repair. The step caught the live 4-error defect in I am deliberately not pushing a compile fix here. #8167/#8173 own that repair, and duplicating it into this PR would fork work already done. Merge those first; this gate then prevents the recurrence. One correction to the reviewThe emit module is — sent from gentle-dove-143 |
…43-rust-test-compile
…h controls The blocker landed: gunbc#8167 (2d68b63) and gunbc#8173 (865d8f6) merged 2026-08-12T15:24Z, repairing v1-compiler's lib-test compile errors. main is integrated here by merge commit, and the gate now has both directions on the REAL specimen rather than one direction plus an argument: pre-fix main b33a9c0 -> exit 101, 4 errors (E0425/E0433) post-fix (this tree) -> exit 0, 0 errors, 67s cold The green half is deliberately taken from the landed repair rather than from a locally reimplemented one, so it is evidence about the tree CI will see. Cost notes corrected. Both carried 99s, which was cargo check --workspace --all-targets -- an upper BOUND measured while main's lib test target did not compile, because that was all a broken tree allowed. This step's exact argv is 67s. The bound is SUPERSEDED, not kept beside the measurement: a note carrying a looser figure than the available evidence is the stale-citation shape, and this one is load-bearing for the 10m budget. Verified on the merged tree, not assumed from the merge: ci.yml regenerates with NO drift, and the step is still emitted all 7 gate witnesses PASS, including build-job enrollment Enrollment is checked separately from the check passing, because main advanced by many commits and a reordered steps list would leave a gate that compiles cleanly and guards nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxLzhuMisV3GAPpP2mBtSG
The gate's first CI execution redded, and it was right both times. Neither
defect is in a test module -- they are in target classes nothing compiled:
p1_cohort_probe (a BIN): function item cast straight to integer, x2.
The release build builds only claim_executor and gunbc, so this bin had
no compiling consumer at all. Fixed with the compiler's own suggestion,
`as *const () as usize`.
serve_budget_e2e (an INTEGRATION TEST): ServeProcess.port never read.
Deleted the field and its initializer -- it has zero read sites, so it is
dead data. Deliberately NOT #[allow(dead_code)]: annotating it would keep
the thing the lint correctly found and hide the finding.
MY GREEN CONTROL WAS MEASURED IN THE WRONG ENVIRONMENT, which is why this
surfaced in CI rather than before the push. CI sets RUSTFLAGS=-D warnings at
the job level; my earlier remote check did not, so it exercised a laxer
compiler than the one that decides and produced a green that could not
transfer. Both errors are LINTS promoted to errors, not compile failures --
invisible without the flag. The control now replicates CI's env.
WHY -D warnings IS KEPT RATHER THAN CARVED OUT FOR THIS STEP: the population
was measured before deciding, not fixed one error at a time. With
--keep-going the entire -D warnings population across every v1-compiler
target is ONE target with ONE lint, so there is no sprawl to scope around.
Overriding RUSTFLAGS here would have smuggled a lint-policy carve-out into a
compile gate and left the step inconsistent with its own job env; a
32-target population would have justified separating the two facts, and one
does not.
Green control, CI env exactly, --keep-going so nothing hides behind a first
failure: exit 0, 0 errors, 1m10s.
Three uncovered categories found by this gate so far, none visible to any
gate that ran before it: a test module that did not compile (repaired by
gunbc#8167 / gunbc#8173), a bin that did not compile, and an integration test
carrying dead code.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XxLzhuMisV3GAPpP2mBtSG
…ng measurement The note said execution cost was "UNMEASURED and is now measurable, since the compile fix landed", which reads as though enrolling execution is one measurement away. That misreads the repository, and the request this gate answers was "compile + test", so the reason the test half is absent has to be the real one rather than a softer one. MEASURED 2026-08-13: cargo test -p v1-compiler --lib -- --list reports 537 tests, and test.retirement.model retained_legacy_rust_test_modules governs src/v1/tests/src ONLY -- every row is a bare filename in the v1-compiler-tests crate and ZERO rows name src/v1/stage0/src. Those 537 are outside the retirement program: not retained, not deleted, not classified. So execution is not a gap for this gate to close. That model's declared direction is that a Rust test module may REMAIN only when explicitly retained and the complement disappears with the seed; the kernel was deliberately cut to 9 modules / 30 tests from 98 / 740; and nextest was removed precisely to stop executing seed tests. Enrolling execution would run the population the DESIGN 7 burn-down exists to delete and partially undo that cutover -- an operator decision, not a step I should add quietly. ALSO RECORDED, because it is a hole in the retention wall and it is mine: the model reds a new Rust test FILE added without a retention row, but discovers only src/v1/tests/src, so cfg(test) tests added INLINE to an existing src/v1/stage0/src file bypass it. gunbc#8162's five union_dedup_import_facts_law tests in cli_run.rs entered the unclassified 537 exactly that way -- no retention row, no executing consumer, slated to vanish with the seed. They belonged in the retained crate or should have been accepted as throwaway. Verified after the edit rather than assumed: ci.yml regenerates with no drift and the four emission/enrollment witnesses still PASS -- the note shares a module with the emit, and the plan-plus-marker witness compares exact strings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxLzhuMisV3GAPpP2mBtSG
The test half of "compile + test": measured, and declined with a reasonThe compile half is done and proven — this gate went red on three real defects and green once they were fixed. The execution half I am deliberately not adding, and the reason is a standing program rather than a missing measurement, so the note claiming otherwise is corrected in Measured 2026-08-13: So those 537 are outside the retirement program: not retained, not deleted, not classified. Enrolling execution for them would:
That is an operator decision, not a step to slip into a compile-gate PR. A hole in the retention wall, and it is mineThe model reds a new Rust test file added without a retention row — but it discovers only That is exactly how #8162's five Three ways forward, none chosen here
Verified after the note edit, not assumed
— sent from gentle-dove-143 |
The hole
v1-compilercarries 24 files with#[cfg(test)]modules and nothing in CI compiled any of them. So a test module referencing helpers it cannot see sits on main with every gate green — which is exactly what happened today, and is still live on main atb33a9c03d:Why the three existing gates structurally cannot see it — measured, not assumed:
ci_stage0_partition_compile_gateCheckcfg(test)filescargo test -p v1-compiler-tests --releasev1-compiler's own test modulesThis is not a nextest re-enrollment
gunbc.commit_workflowcommit_gate_rust_suite_removed_dispositionrejects that, and every rationale in it is a fact about execution — ~37 GiB, red on main, seed runtime, ~42min. This iscargo.Build.Check, compile-only, and runs no test. It is the same separable-fact argument that re-enrolled fmt (2026-07-15) and thev1-compiler-testscompile half (2026-07-31); it closes the third and last uncovered target class.Design choices, each of which could have gone the other way
Scoped to
-p v1-compiler, not--workspace. Partition crates are alreadyCheck-ed and have no test targets to miss;v1-compiler-testshas its own gate. A workspace-wide check would re-check covered lib targets for no gain (§2).--all-targetsis supplied by the workflow layer throughextra_args, exactly asci_stage0_partition_compile_gate_extra_argssupplies-p. DESIGN §3 names a bare--all-targetsin an extdeps argv as the policy-leak tell, andv2.lens.extdeps_shape_transport_policyreds on it; that reading is respected rather than evaded —extdeps.cargo_buildkeeps the agnostic operation shape.Cost: 99s measured (
b33a9c03d,cargo check --workspace --all-targets, cold, remote) — an upper bound for this single-package step. Budget 10m, deliberately below the 15m the sibling gates carry, because those inherited a cold-host envelope with no dedicated receipt and copying an unmeasured number is how it becomes precedent. Placed after the release build so it reuses the release-profile artifact.Evidence
ci.yml:142—"$CARGO_BIN" 'check' '-p' 'v1-compiler' '--all-targets'PASS ci_build_job_backstop_is_step_sum_plus_preludeThe red control uses the gate's literal command, so it is validated against the real inherited defect rather than a synthetic fixture.
What this does not do
It does not execute those tests. Compiling a test module proves its references resolve, never that its assertions hold. The 24 files still have no executing consumer on any CI path — including the five
union_dedup_import_facts_lawtests #8162 added to the very file this specimen came from. Execution cost is left unmeasured on purpose: main's lib test target does not currently compile, so that number can only be taken on a green tree, and the module says so rather than implying tests will follow.Sequencing — read before merging
This cannot go green until the 4 errors are fixed, and #8167 / #8173 carry that repair. Merge those first; this gate then prevents the recurrence. The fix is deliberately not duplicated here.
So a red CI on this PR is the gate working on its first execution, not a defect in it.
Separate finding, not in this PR
Cargo.lockon main is stale: it listsserde/serde_jsonunderv1-compiler-testswhile that crate'sCargo.tomlno longer depends on them. Anycargoinvocation syncs it, so anyone building locally gets a spurious modified file and a--lockedbuild would refuse. One line, someone else's crate.