Skip to content

Runner: capture per-case guest stderr into results (trap panic messages are uncorrelated) #38

Description

@lann

From the adversarial review (2026-08-04). For a panicking case, the one line that says why (the panic message with file:line) is not in the case result:

  • The runner builds stores with inherit_stderr (crates/component-test-runner/src/lib.rs), so guest panic payloads go to raw process stderr.
  • The recorded detail is only trap: wasm trap: wasm 'unreachable' instruction executed (trap_detail); in JSONL mode the panic message is absent from the stream entirely.
  • Under --jobs N, worker stderr interleaves arbitrarily — at conformance-suite scale (M1: ~8k cases) correlating a panic message to its case is impossible. Observed even at fixture scale: the panic line interleaved into a different case's output.

Proposed: per-case stderr capture (WasiCtxBuilder::stderr with an in-memory pipe), appended to the trapping case's diagnostics (or last-N-lines folded into detail, keeping the one-line convention for detail itself). This is runner policy (L3), not contract. Consider the same for the composed runner once it shares the results encoder (#34).

Note: expected/verify-embed-fixture.txt and the fixture JSONL golden will need regeneration when this lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    runnerComponents or hosts that execute suites

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions