Skip to content

Restore cargo check --all-targets: drop the test importing a deleted module - #8532

Merged
briansrls merged 1 commit into
mainfrom
fix/test-targets-compile
Aug 19, 2026
Merged

briansrls merged 1 commit into
mainfrom
fix/test-targets-compile

Conversation

@briansrls

@briansrls briansrls commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

cargo check -p v1-compiler --all-targets has not compiled since #8486, which deleted the .dag witness v1_tests_claim_caret_parse_smoke_test and its generated module but left caret_parse_smoke_native_compile_emit_witnesses importing it:

error[E0432]: unresolved import `crate::v1_tests_claim_caret_parse_smoke_test`

Only --bin was still compiling, so -D warnings covered one target while dead code accumulated unobserved in the other — #8517 removes 18 such functions found this way.

The part worth reviewing

The orphaned test had three homes, not two:

  1. src/v1/compiler_tests_rust.dag — the authority
  2. src/v1/stage0/src/v1_compiler_compiler_tests_rust.rs — its generated projection
  3. src/v1/stage0/src/compiler_tests.rs — output of running (2)

compiler_tests.rs is produced by running the generator, not by emitting from the .dag. So editing (1) and (3) alone leaves (2) stale, with the authority silently disagreeing with its projection — and --all-targets still goes green in that state. My first attempt did exactly that; I caught it only because regenerated output still contained a test I thought I had deleted.

Verified by regeneration rather than by a green check: compiler_tests.rs is byte-identical to generator output (diff exit 0).

Coverage, stated exactly

dag/test/claim/caret_syntax_witness_test.dag covers the 3 endpoint claims (compile-clean, symbol-literal emit, discriminant-sugar emit). The 7 tokenize/parse intermediate claims have no .dag equivalent and have not executed since #8486 deleted the module; the Rust suite left CI in July. This deletes unbuildable code, not live coverage — but those 7 are a real gap, not parity.

Two findings NOT fixed here

Found while verifying; both need their own disposition:

  1. --required-regen refuses unconditionally on any tree. generated_basenames_from_emit inserts the full emit key (src/foo.rs) while committed_generated_basenames inserts a basename (foo.rs), so the sets can never intersect. It refuses before writing a candidate or comparing content.
  2. Real drift behind that bug. With the prefix noise patched locally, 127 files clear and a genuine residue remains: 9 committed-but-never-emitted (required_regen_host.rs, v2_compiler_compile.rs, expected_red_roster_join.rs, +6) and 1 emitted-but-not-committed (v1_compiler_trait_bound_witness.rs).

DESIGN.md names --required-regen-fixed-point as the sole answer to the self-host fixed point, and that flag only reads a receipt this producer writes — so the authority is currently answering nothing, and (1) has been concealing (2). No fix for either is included here; (2) needs a per-file disposition rather than a patch.

🤖 Generated with Claude Code

…d module

`cargo check -p v1-compiler --all-targets` has not compiled since #8486,
which deleted the `.dag` witness `v1_tests_claim_caret_parse_smoke_test`
and its generated Rust module but left
`caret_parse_smoke_native_compile_emit_witnesses` importing it:

    error[E0432]: unresolved import `crate::v1_tests_claim_caret_parse_smoke_test`

Only `--bin` was still compiling, so `-D warnings` covered one target and
dead code in the other accumulated unobserved (#8517 removes 18 such fns).

This removes the orphaned test at all three of its homes, which is the
part worth reviewing:

  1. `src/v1/compiler_tests_rust.dag`                       — the authority
  2. `src/v1/stage0/src/v1_compiler_compiler_tests_rust.rs` — its generated projection
  3. `src/v1/stage0/src/compiler_tests.rs`                  — output of running (2)

`compiler_tests.rs` is produced by RUNNING the generator, not by emitting
from the `.dag`, so editing (1) and (3) alone leaves (2) stale and the
authority silently disagreeing with its projection — `--all-targets` still
goes green in that state. Verified instead by regenerating and diffing:
`compiler_tests.rs` is byte-identical to generator output (diff exit 0).

Coverage, stated exactly: `dag/test/claim/caret_syntax_witness_test.dag`
covers the 3 endpoint claims (compile-clean, symbol-literal emit,
discriminant-sugar emit). The 7 tokenize/parse intermediates have no `.dag`
equivalent and have not executed since #8486 deleted the module; the Rust
suite left CI in July. This deletes unbuildable code, not live coverage,
but those 7 are a real gap rather than parity.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title delete cli_run governor Restore cargo check --all-targets: drop the test importing a deleted module Aug 19, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 19, 2026 07:01
@gunbai-bot

gunbai-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Thanks — approving read matches the change. One correction to the record, because it inverts the fact this PR is mostly about.

The review describes the three files as "the .dag source, the generated Rust, and the hand-authored twin." There is no hand-authored twin: all three are generated, in a chain.

src/v1/compiler_tests_rust.dag                       authority
  -> v1_compiler_compiler_tests_rust.rs              generated projection (committed, compiled in)
       -> compiler_tests.rs                          output of RUNNING the projection

compiler_tests.rs is not hand-maintained and is not emitted from the .dag either — it is produced by running the compiled-in generator. That coupling is the whole trap: edit the authority and the output, leave the middle file stale, and the authority silently disagrees with its projection while cargo check --all-targets still passes. That is exactly what my first attempt did, and a green check did not catch it — regenerating and diffing did (byte-identical, diff exit 0).

Flagging it because "hand-authored twin" would license editing compiler_tests.rs directly next time, which is the one thing that reintroduces this class silently.

— sent from fierce-ram-721

@briansrls
briansrls merged commit 9f25212 into main Aug 19, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the fix/test-targets-compile branch August 19, 2026 07:27
gunbai-bot Bot added a commit that referenced this pull request Sep 2, 2026
…le row standing in for an unrostered blob (#9976)

`test.claim.language_source_scaffold_index_test.compiler_tests_rust_blobs_are_all_rostered`
was RED on main and ENROLLED, not unenrolled: it sits in
`floor_expected_red_chunk_live_tree_admission` in `v2.workflow.floor_expected_red`,
and its entry declares `ReadsLiveTree`, which in
`entry_eligible_for_discovery_skip_before_resolve` means it never predict-skips.
So it genuinely executed and genuinely failed every required run.

THE GAP WAS NOT THE FOUR THE COUNTS SUGGESTED. The witness asserted
`declared_fn_count(ct_) == rostered_count_for(...)`, 44 against 40. Joined by
IDENTITY the residues are of two kinds: FIVE live blobs unrostered
(ct_fixture_closure_rustc_discrimination_test,
ct_import_lines_follow_resolved_binding_identity_test,
ct_witness_carrier_declines_non_witness_expected_type_test,
ct_generic_param_declines_fail_closed_unwrap_test,
ct_shell_service_output_projection_known_hole_probe_test) and ONE row that
outlived its blob -- ct_caret_parse_smoke_native_witness_tests, which #8532
deleted from the carrier while leaving the roster row standing.

Rostering four of the five would have balanced the counts at 44 and GREENED the
witness with one blob still unmarked and one row still naming a declaration that
does not exist. The count was never the claim; it was a necessary condition of
the claim being read as the claim. DESIGN section 5 already says this outright:
completeness is an identity join, not a count equality.

DISPOSITION. The five blobs are hand-authored Rust assertion blobs, the same
class as their rostered neighbours, and carry
`compiler_tests_rust_hand_assertion_scaffold_trigger`. The stale row is removed.

THE CLAIM MADE HONEST. The witness now names the two residues separately --
declared-not-rostered (a blob landed unmarked) and rostered-not-declared (a row
outlived its blob) -- and asserts each is empty, so the two directions red with
distinct meanings and neither can pay for the other. Cardinality survives as a
third conjunct answering the one question containment cannot, a DUPLICATE within
one side. The `rt_` arm gets the same treatment. `head_before`'s unreachable
Absent arm yields a spelling no roster row can carry rather than fabricating a
plausible name: the failure arm refuses, it does not widen.

THE EVIDENCE DOES NOT STOP AT THE REPAIRED TREE. A repaired population makes both
live arms permanently green and the join indistinguishable from the count it
replaced, so five discriminating controls run over authored fixtures, including
the equal-counts-different-identities case that is exactly what the old form
accepted.

Delisted from the expected-red roster, since that roster self-empties on pass.

Executed evidence, `gunbc run` against the live tree (BuildBuddy runners expose
no cgroup memory limit, so `gunbc run` refuses there under
`gunbc.host_budget_source`; this ran in the session container):
all ten witnesses in the file return `true`, including
compiler_tests_rust_blobs_are_all_rostered, and each of the four
`the_join_refuses_*` controls returns `true`, i.e. actively refuses.

DESIGN.md and docs/design-ledgers.md are regenerated through
`dag/gunbc/instruments/generated_artifact_gate.dag main_wet`, carrying the new
`compensating_errors_cancel_in_the_aggregate` recurring-failure-mode row.


Claude-Session: https://claude.ai/code/session_01P7mphvNU1JoCbrowqDM5Zg

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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