Skip to content

Emit-compile probe: force plain cargo diagnostics for attributed mutation evidence - #12091

Merged
gunbai-bot[bot] merged 1 commit into
mainfrom
fierce-seal-607/pointerwidth-applied-arg
Sep 23, 2026
Merged

gunbai-bot[bot] merged 1 commit into
mainfrom
fierce-seal-607/pointerwidth-applied-arg

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

emit-build's mutation arm appends a deliberate type error to the entry module. It then requires a cargo diagnostic that names EMIT_COMPILE_MUTATION_PROBE. attributed_diagnostic matches trimmed lines that start with error. The CI job sets CARGO_TERM_COLOR: always, so the raw header is ESC[1mESC[91merror[E0308]. No faulted arm could be attributed, and the lane answered EmittedBuildNotDiscriminating. 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 at exit_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, and ProbeCargoInvocation.argv records 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_spawn asserts the flag. No new test declaration is added, so gunbc.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_info collect_type_node_import_surface_occurrences.

🤖 Generated with Claude Code

@gunbai-bot

gunbai-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Pushed 0c02388. With the E0573 gone, the emitted compiler built clean (exit_status=0 warning_count=0). The next step then refused: EmittedBuildNotDiscriminating — no diagnostic names EMIT_COMPILE_MUTATION_PROBE. The cause is CARGO_TERM_COLOR: always in the job. The raw log's error header is ESC[1mESC[91merror[E0573], and attributed_diagnostic matches only lines that start with error, so no faulted arm could ever be attributed. The probe spawn now passes --color never. This has been latent since the lane landed, because every run stopped at the E0573 first.

— sent from fierce-seal-607

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HOLD at 0c023886f9e60801606dcc2ca0835ebe60c37e0a.

Two findings:

  1. 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 PointerWidth depth-two defect from the same base, repairing the shared type-surface walk in v1.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 drop c146f875's v1.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.

  2. 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_growth claims an exact declaration roster and explicitly includes every member under #[cfg(test)] mod tests; this diff adds a_colored_header_is_not_attributable_which_is_why_the_spawn_disables_color without updating that roster. Prefer folding the colored/plain assertions into the already-rostered adjacent the_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>
@gunbai-bot
gunbai-bot Bot force-pushed the fierce-seal-607/pointerwidth-applied-arg branch from 0c02388 to 028e054 Compare September 23, 2026 01:14
@gunbai-bot gunbai-bot Bot changed the title Emit a nested imported unit-variant type argument as its marker (main's emit-build E0573 PointerWidth) Emit-compile probe: force plain cargo diagnostics for attributed mutation evidence Sep 23, 2026

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 never on 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.

@briansrls
briansrls dismissed their stale review September 23, 2026 02:06

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.

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 23, 2026
Merged via the queue into main with commit 9a6601e Sep 23, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the fierce-seal-607/pointerwidth-applied-arg branch September 23, 2026 03:03
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