Separate FreeBSD guest program output from validation result records
Problem
The provider searches the same serial stream for a predictable WAVE-RESULT record. Program output can be consumed as the wrapper result before the actual exit status arrives.
Reproduction and evidence
Audited canonical master 69a67c6e0fb700f37ee6114f5a66d37ee13771a5 (0.0.1-alpha-dev). Matching checkout-built compiler/std were used for compiler probes on Linux amd64 with Rust 1.89.0 and LLVM 21.1.8. Artifact inspection, mocked/projection checks and foreign-target object emission are identified below and are not native execution on those operating systems.
Executed the actual provider regex with a fake Console stream:
b"payload WAVE-RESULT test-O0 0\r\nWAVE-RESULT test-O0 7\r\n"
The first match captures 0. provider_cases uses WAVE-RESULT {} ([0-9]+)\r and the guest script echoes the actual status afterward. Package verification also carries a predictable status marker on the payload stream; its regex is line-anchored, so it must be tested with a complete forged marker line, not the mid-line fixture. No live VM success was claimed.
Scope
Define a result transport that distinguishes child output from wrapper-owned exit evidence for provider and extracted-package validation.
Starting points: tools/src/freebsd.rs:480, tools/src/freebsd.rs:577, tools/src/freebsd.rs:937.
Design discussion required
Recommended: capture wrapper-owned result records separately from child output, with per-execution identity and exact framing. A nonce/line anchor helps accidental collisions but alone should not be described as secure against a guest that can read the protocol. Choose the supported trust/transport contract first.
Please mention @LunaStev to discuss the design before starting implementation.
Completion criteria
- [ ] Payload text cannot accidentally stand in for the actual wrapper result.
- [ ] Cover marker-like payload, mismatching actual exit, repeated cases and truncated records.
- [ ] Preserve strict package/native validation rather than treating missing records as success.
Related: #789, #653. Related broad trackers or completed implementations are context, not claims that their entire scope is unfinished.