Skip to content

emit-build: the probe's cargo spawn asks for plain text, so its discriminating red is attributable in CI - #12105

Closed
gunbai-bot[bot] wants to merge 3 commits into
mainfrom
session/smart-tern-891-probe
Closed

gunbai-bot[bot] wants to merge 3 commits into
mainfrom
session/smart-tern-891-probe

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

emit-build's discriminating red is attributable in CI: the probe's cargo spawn asks for plain text.

Symptom

With E0573 cleared by #12089, main's emit-build (merge_group runs 35808874746 and 35807367813) built the emitted v2 compile crate clean. It then refused EmittedBuildNotDiscriminating: "the faulted arm refused, but no diagnostic names EMIT_COMPILE_MUTATION_PROBE".

Cause, located by execution

  • Commit 1 made the refusal carry the faulted arm's own stderr (already captured as stderr_tail, but dropped). Run 35811281201 then showed that the fault WAS refused exactly as intended: error[E0308] at pub const EMIT_COMPILE_MUTATION_PROBE: u8 = ....
  • The raw log line is ^[[1m^[[91merror[E0308]. The witnesses workflow sets CARGO_TERM_COLOR: always and the probe's cargo inherited it, so every error header began with an ANSI escape. attributed_diagnostic recognises a header as a line starting error, so nothing was ever attributable in CI. Locally there is no colour, so the defect only appears in CI, and it stayed hidden while E0573 stopped every run one step earlier.

Repair: the earliest unjustified boundary is the spawn

The spawn already owns every channel cargo reads (RUSTFLAGS, the encoded flags, RUSTC, the wrappers), because the verdict is read from its output. The output encoding was the one channel it left ambient. The spawn now sets CARGO_TERM_COLOR=never (cargo term.color). The variable name is modeled in extdeps.rust.cargo CargoEnvironmentVariable (CargoTermColorEnv) beside the names the spawn already binds, and extdeps_cargo.rs is regenerated from it.

Evidence

  • Positive, on the real path: emit-build on 91cad1b logs discriminating red established — Discriminated for BOTH v2_compiler_compile and v2_cli_compile_cli, each attributing the injected line. All five checks pass.
  • Discriminating unit pair: a_coloured_refusal_is_unattributable_and_a_plain_one_is_attributed feeds CI's verbatim refusal to the parser in both renderings. Plain is attributed; coloured is not.
  • Spawn control: the_probe_cargo_spawn_binds_flags_compiler_and_wrappers_and_the_receipt_names_that_spawn now asserts CARGO_TERM_COLOR=never on the Command's own environment table.
  • Mirror: the regenerated extdeps_cargo.rs reaches a fixed point on a second regen, and the diff is exactly the variant, its name arm and its marker. Other drift the regen reports is main's own stale mirrors (the Use-line planner sees a unit variant two applications deep, so its import binds the marker type (E0573 PointerWidth) #12089 import-surface widening, owned separately) and is not installed here.

Rung (DESIGN §4b)

This is rung 2, mechanically preventable. The attribution still depends on the spawn setting the variable and on the unit pair staying enrolled. The refusal also now carries the faulted arm's stderr, so any future unattributed red is located rather than only named.

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 3 commits September 23, 2026 02:39
…err, so its cause is located

EmittedBuildNotDiscriminating said only that no diagnostic named EMIT_COMPILE_MUTATION_PROBE;
the faulted cargo run's own output, already captured as stderr_tail, was dropped, so the refusal
named the class without locating the cause.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ed fault's refusal is attributable in CI

The witnesses workflow sets CARGO_TERM_COLOR=always; the probe's cargo inherited it, every error
header began with an ANSI escape, attributed_diagnostic (a line starting 'error') matched nothing,
and every CI emit-build refused EmittedBuildNotDiscriminating although the fault was refused
exactly as intended (E0308 at EMIT_COMPILE_MUTATION_PROBE, located by the previous commit).
CARGO_TERM_COLOR is modeled in extdeps.rust.cargo beside the names the spawn already binds.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Installed from the regen candidate and at a fixed point on a second regen; the only mirror this
change names. Other drift the regen reports is main's own stale mirrors (the #12089 import-surface
widening, owned separately) and is not installed here.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title emit-build EmittedBuildNotDiscriminating: locate the faulted arm's refusal (investigation, step 1) emit-build: the probe's cargo spawn asks for plain text, so its discriminating red is attributable in CI Sep 23, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review September 23, 2026 04:51
@gunbai-bot

gunbai-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #12091, already merged, which fixes the same EmittedBuildNotDiscriminating through the probe's own argv (--color never), with a paired colored/plain control. This PR's CARGO_TERM_COLOR env route would be a second authority for the same fact, so it is withdrawn and extdeps.rust.cargo does not gain CargoTermColorEnv.

The one thing this PR carried that #12091 does not: the unattributed-refusal message includes the faulted cargo run's own stderr tail (already captured in stderr_tail, currently dropped). That is how this cause was located (run 35811281201). It is offered separately if wanted, not bundled here.

— sent from smart-tern-891

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.

0 participants