Skip to content

fix(testing): capture compiler-fixture child output so the Windows nightly summarizer can attribute rows - #13434

Merged
EffortlessSteven merged 1 commit into
mainfrom
fix/compiler-fixture-child-stdio-9272
Nov 6, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
fix/compiler-fixture-child-stdio-9272

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #3922 (release_required row: windows-test-verdict #3922, blocked by #9272)

Acceptance delta (one sentence): The nightly Windows advisory regains a terminal summarizer verdict on current main because the #13288 compiler-fixture children no longer print their own libtest harness output into the parent suite's log.

Observed failure (hosted, workflow_dispatch on main e4f5ff0)

Run 42164175174 (dispatched 2026-11-06T04:43Z for #9272's row verification, job 127716637770): all five cargo steps completed inside their deadlines, but the summarizer refused both runs:

- Run 2 provenance: owning harness announced 17914 subjects but observed 3323 rows
- Run 2 provenance: harness announcement without an admitted target
- Run 2 provenance: completion summary without an announced owning harness
- Run 2: 14617 additional provenance errors omitted (14637 total).
xtask: windows-advisory-summary could not produce trustworthy evidence: run 1 is incomplete_evidence; run 2 is incomplete_evidence

Root cause: #13288 (crates/ripr/src/testing/compiler_environment.rs) re-executes the crate's own libtest harness per compiler fixture — run_child spawns current_exe() --exact <selector> --nocapture and, by its own comment, "Stdout/stderr remain inherited". Each fixture child therefore prints its running 1 test / test ... ok / test result: ok. 1 passed; ... 13447 filtered out block into the parent suite's stdout (134 such blocks in this one run). Inside the parent's target context the fail-closed summarizer reads them as nested harnesses with unattributable rows and refuses the run. The summarizer is right to refuse: its own nested-harness rule says nonempty child output "has no trustworthy attribution in this interleaved text format" (xtask/src/windows_advisory.rs).

Fix

run_child redirects the child's stdout and stderr into files inside the existing scratch directory. The parent only needs the child's exit status and the acknowledgement file, so no pipe can fill and the single-writer try_wait loop is unchanged. On a failed status or a failed acknowledgement the scratch is retained (the existing scratch.retain pattern) and the error names both child-output paths, so the fixture's own --nocapture diagnostics stay retrievable. Production behavior is unchanged: this helper is test-only (#[cfg(test)] consumers in analysis::facts::quickcheck_generator_tests).

Evidence

  • Red: run 42164175174's job log shows the interleaved child blocks (for example at 2026-11-06T05:05:57.963Z: running 1 test followed by test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 13447 filtered out between ripr-lib rows) and the summarizer refusal.
  • Green (this machine, rustc 1.95.0, Windows): cargo test -p ripr --lib quickcheck_generator — all fixture tests pass and the captured console contains no running 1 test row (the proof script greps the console and reports CONSOLE-CLEAN).

Non-goals

  • No summarizer change: the fail-closed refusal and its nested-harness rule are untouched.
  • No fixture test removed, skipped, or weakened: every compiler fixture still runs its plain control and wrapper case; the acknowledgement contract is unchanged.

Residual

  • The same inherited-child-stdout shape exists in other deliberate raw-stdout fixtures (git.rs flood/hang re-exec probes; Linux/macOS-only bounded_read.rs FIFO child and agent/artifact.rs unlinked-exe child). None of those spawn full libtest harnesses on the Windows nightly lanes today; if one ever does, it will fail closed at the summarizer the same way and get the same treatment.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 155 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: bf623631-ae6a-4dea-8b26-1714e224571a
Commits

Reviewing files that changed from the base of the PR and between be4b8b6 and 1957fb3.

Files selected for processing: 1

  • crates/ripr/src/testing/compiler_environment.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

SOURCE_REVIEW_READY

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request redirects the stdout and stderr of the child compiler process to log files in the scratch directory instead of inheriting them, preventing child logs from cluttering the parent test suite's output. If the process fails or verification fails, the scratch directory is retained and the log paths are included in the error. The reviewer suggests improving debuggability by reading and embedding the actual contents of these log files directly into the error message.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

ripr static exposure check

Commit 1957fb359bc6 · run · advisory, static evidence only (not a mutation run).

#ripr agent static-advisory base=be4b8b6d73cf21e5c1e356f0078f33b89ce1b43a findings=33 gaps=0 infection_unknown=2 static_unknown=21 weakly_exposed=10
open=a static limit leaves reach unconfirmed, but a related test asserts too weakly to notice the change; not a confirmed gap, and tests may still help
weakly_exposed|crates/ripr/src/testing/compiler_environment.rs:123|.map_err(\|error\| format!("create compiler fixture stdout capture: {error}"))?;|missing=-|test=t1|id=probe:crates_ripr_src_testing_compiler_environment.rs:error_path:14168e69
weakly_exposed|crates/ripr/src/testing/compiler_environment.rs:125|.map_err(\|error\| format!("create compiler fixture stderr capture: {error}"))?;|missing=-|test=t1|id=probe:crates_ripr_src_testing_compiler_environment.rs:error_path:b5b0371e
weakly_exposed|crates/ripr/src/testing/compiler_environment.rs:137|return Err(format!( "compiler fixture {selector} failed: {status}; child stdout:…|missing=-|test=t1|id=probe:crates_ripr_src_testing_compiler_environment.rs:error_path:6c5ee17a
weakly_exposed|crates/ripr/src/testing/compiler_environment.rs:137|Err(format!( "compiler fixture {selector} failed: {status}; child stdout: {}; ch…|missing=-|test=t1|id=probe:crates_ripr_src_testing_compiler_environment.rs:error_path:039058d6
weakly_exposed|crates/ripr/src/testing/compiler_environment.rs:147|return Err(format!( "{error}; child stdout: {}; child stderr: {}; captured stdou…|missing=-|test=t1|id=probe:crates_ripr_src_testing_compiler_environment.rs:error_path:31cb619e
t1=crates/ripr/src/testing/compiler_environment.rs:263 zero_selected_tests_cannot_acknowledge_fixture_assertions relational_check `assert!(error.contains("acknowledgement"), "{error}");` miss=weak_assertion
+1 more open findings not shown; `--format json` lists all
limits=infection_unknown:2,static_unknown:21,weakly_exposed:10
next=ripr explain --root /home/runner/work/ripr-swarm/ripr-swarm/head --base be4b8b6d73cf21e5c1e356f0078f33b89ce1b43a --committed --mode draft --format agent probe:crates_ripr_src_testing_compiler_environment.rs:error_path:14168e69

Took 45s.

@EffortlessSteven
EffortlessSteven force-pushed the fix/compiler-fixture-child-stdio-9272 branch from 1c14125 to b562b95 Compare November 6, 2026 10:12
…mmarizer can attribute rows

#13288's compiler-admission fixtures re-execute the crate's own libtest
harness (current_exe() --exact <selector> --nocapture) with inherited
stdout/stderr, so every fixture child prints its running-1-test / test
... ok / test result rows into the parent suite's log. On the nightly
Windows advisory (run 42164175174, main e4f5ff0) 134 such blocks
landed inside parent target contexts and the fail-closed summarizer
refused both workspace runs as incomplete_evidence with 14637
target-attribution provenance errors.

Redirect the child's stdout/stderr into files inside the existing
scratch dir: the parent only needs the exit status and the
acknowledgement file, so the single-writer try_wait loop keeps its
no-pipe-to-fill property. A failed status or acknowledgement now
retains the scratch and names both child-output paths, keeping the
fixture's --nocapture diagnostics retrievable. #9272
@EffortlessSteven
EffortlessSteven force-pushed the fix/compiler-fixture-child-stdio-9272 branch from b562b95 to 1957fb3 Compare November 6, 2026 10:24

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

SOURCE_REVIEW_READY

@github-actions github-actions Bot 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.

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm the diff contains no committed regression test that explicitly captures parent output and asserts nested libtest harness rows are absent, making the red/green distinction dependent on an external proof script described only in the PR body.
  • Confirm the strongest source-route claim that this fix covers every inherited-child-stdout fixture is not established by the available evidence.

Parked follow-ups

  • Failure diagnostics are both path-addressable and inline, but each error reads both files synchronously after child exit, potentially duplicating I/O for large outputs.

Evidence gaps

  • No successful cargo-test receipt is present in the supplied evidence despite cargo-test being required for the Rust behavior change.
  • The packet lacks a completed cargo-test receipt, so scheduled test execution is not independent proof of the current head.
  • Model proof intent was rejected by deterministic validation.
  • The central proof needed to validate the Windows attribution fix is not yet available: ripr failed and the scheduled cargo-test receipt is absent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant