Repository navigation
Emit-compile probe: force plain cargo diagnostics for attributed mutation evidence - #12091
Conversation
|
Pushed 0c02388. With the E0573 gone, the emitted compiler built clean ( — sent from fierce-seal-607 |
briansrls
left a comment
There was a problem hiding this comment.
HOLD at 0c023886f9e60801606dcc2ca0835ebe60c37e0a.
Two findings:
-
The E0573 repair in the first commit is already on main through #12089 and must not land again as a second authority. #12089 merged the same
PointerWidthdepth-two defect from the same base, repairing the shared type-surface walk inv1.compiler.infer_emit_info::collect_type_node_import_surface_occurrences(authored child plus__applied_type_args) and carrying its nested/direct controls. Rebase onto current main and dropc146f875'sv1.compiler.emit_rust::collect_authored_applied_argument_occurrences, its stage0 mirror, and the now-redundant E0573 framing/witness. Keeping both creates two walks answering one import-surface question. -
The color-attribution repair is real and should survive, but its new Rust test leaves the seed-growth authority stale.
gunbc.emitted_closure_compile_seed_growthclaims an exact declaration roster and explicitly includes every member under#[cfg(test)] mod tests; this diff addsa_colored_header_is_not_attributable_which_is_why_the_spawn_disables_colorwithout updating that roster. Prefer folding the colored/plain assertions into the already-rostered adjacentthe_attributed_diagnostic_is_the_header_governing_the_attributed_line; otherwise update the roster and its exact count.
The cargo build --color never change itself is the right producer-bound repair: the attribution reader requires plain error[...] headers, the argv outranks ambient CARGO_TERM_COLOR=always, and the invocation receipt carries the choice.
Please return this as a current-main, color-only PR (retitled/reworded accordingly), with the declaration census honest and exact-head compiler/clippy/emit-build/floor evidence.
…tion evidence attributed_diagnostic matches a trimmed line starting with `error`. Under the CI job's CARGO_TERM_COLOR=always the header is ESC[1mESC[91merror[E0308], so no faulted arm was attributable and emit-build answered EmittedBuildNotDiscriminating once main's E0573 was repaired (#12089). The spawn now passes `--color never` on its argv, which outranks the ambient variable and is the receipt (ProbeCargoInvocation.argv). The colored and plain header arms are folded into the rostered the_attributed_diagnostic_is_the_header_governing_the_attributed_line, and the spawn test asserts the argv flag, so the hand-Rust test population does not grow. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0c02388 to
028e054
Compare
briansrls
left a comment
There was a problem hiding this comment.
APPROVE at exact head 028e054bfe3d925243eefd336ff8e6319c30851a.
The rewrite fully discharges both prior findings:
- the superseded E0573 implementation and duplicate witness are gone; #12089 remains the sole nested-applied-argument authority;
- the PR is now one-file, color-only: the cargo probe binds
--color neveron the spawned/receipted argv; - colored and plain diagnostic shapes are exercised inside the already-rostered attribution test, and the existing spawn test pins the flag, so the hand-Rust declaration population does not grow.
Exact-head evidence is complete: compiler, clippy, floor, aggregate witnesses, and emit-build all pass. emit-build passed both //gunbc/instruments:self-host—including its mutation/attribution/restore cycle—and //gunbc/instruments:v2-native-cli.
No remaining findings. APPROVE-MERGE.
Superseded by the exact-head approval at 028e054. The rewritten PR fully removed the duplicated E0573 repair, retained only the color-attribution fix, kept the seed-growth declaration roster unchanged, and passed compiler, clippy, witnesses, floor, and emit-build.
emit-build's mutation arm appends a deliberate type error to the entry module. It then requires a cargo diagnostic that namesEMIT_COMPILE_MUTATION_PROBE.attributed_diagnosticmatches trimmed lines that start witherror. The CI job setsCARGO_TERM_COLOR: always, so the raw header isESC[1mESC[91merror[E0308]. No faulted arm could be attributed, and the lane answeredEmittedBuildNotDiscriminating. The E0573 on main had always stopped runs before this step. It was first observed on this PR's earlier head, whose emitted compiler built clean atexit_status=0 warning_count=0.Repair: the probe spawn passes
cargo build --color never. The flag is on the argv, which outranks the ambient variable, andProbeCargoInvocation.argvrecords it.Tests: the colored and plain header shapes are folded into the rostered
the_attributed_diagnostic_is_the_header_governing_the_attributed_line.the_probe_cargo_spawn_binds_flags_compiler_and_wrappers_and_the_receipt_names_that_spawnasserts the flag. No new test declaration is added, sogunbc.emitted_closure_compile_seed_growth's roster is unchanged. All 20 tests in the module pass locally.The earlier E0573 commit is dropped. #12089 owns that repair, in
v1.compiler.infer_emit_infocollect_type_node_import_surface_occurrences.🤖 Generated with Claude Code