Skip to content

build/wo: echo captured stderr into .wo action failures - #1035

Closed
ropoctl wants to merge 1 commit into
fix-windows-bundle-pcre2-stdiofrom
diag-wo-echo-stderr
Closed

ropoctl wants to merge 1 commit into
fix-windows-bundle-pcre2-stdiofrom
diag-wo-echo-stderr

Conversation

@ropoctl

@ropoctl ropoctl commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

What

.wo build actions capture each sub-tool's stdout/stderr into files under
out/command/<target>/. On failure, run_wo_bundle_build_action,
run_wo_drift_action, and wo_drift_run_harness report only the path of
that capture file:

bundle build failed with exit code 1; stderr: out/command/pcre2-wo-build/build.stderr

The capture file is not part of the CI log, so the actual compiler diagnostic
never travels with the failure. This is a No Silent Fallbacks gap: the lane
fails, names a file nobody can see, and the real error is invisible.

Fix

Add wo_captured_stderr(ctx, capture_path), which reads the capture file back
through the action's ToolFs and appends its content to the failure message.
An empty or unreadable capture (or a genuinely silent tool) folds to nothing, so
the message degrades to exactly today's behavior when there is nothing to show.
Wired into all five wo_fail sites that name a .stderr path.

Why now

The Windows pcre2-wo-build lane fails with exit 1 and swallows the compiler's
own error, making the native-runtime failure undiagnosable from CI logs alone.
This surfaces it.

Verification

  • with check build.w passes (typechecks the whole build module graph incl.
    build/wo.w).
  • Build-layer only — no codegen/ownership/ABI change (D14: batches freely, skips
    drop audits).

Stacked on the pcre2-wo stabilization stack so its own Windows CI lane reaches
pcre2-wo-build (post-Bug-A) and demonstrates the newly-surfaced diagnostic.

A .wo bundle build/check/harness failure emitted only the exit code and the
path to a capture file under out/command/, which never reaches the CI log —
so the real sub-compiler diagnostic was invisible (a No-Silent-Fallbacks
gap). The action already holds both captured streams in memory on the
ToolProcessResult it gets back from run_capture_with_env, so echo whichever
the tool wrote. stdout is surfaced alongside stderr because a failing
sub-compiler need not write to stderr; a tool silent on both folds to the
path-only message. Wired into all five wo_fail-with-capture sites (scratch
rebuild, harness build, harness run, bundle build, interface check).
@ehartford

Copy link
Copy Markdown
Contributor

Landed on main via cherry-pick under a new hash: 388decf (build/wo: echo captured output into .wo action failures). It was load-bearing for today's Windows diagnosis — echoing the .wo build's captured stderr is what surfaced the real #1081 panic behind the opaque 'bundle build failed' message. Closing as merged-by-content; original SHA differs because it was cherry-picked, not merged.

@ehartford ehartford closed this Sep 6, 2026
@ehartford
ehartford deleted the diag-wo-echo-stderr branch September 24, 2026 16:54
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.

2 participants