fix: carry response warnings to every surface, and stamp the sheet behind a refusal

Merged
TH
2mo ago
+747-80

Summary

Refs #2560 (capture-routing/lineage half stays with #2450/#2485).

An optional: true Maestro step that skipped left a warning that vanished from human output the moment a later step failed — the repro printed a bare REPLAY_DIVERGENCE with no trace of the 7s skip. Warnings now travel with the run whether it passes or fails:

Test summary: 0 passed 1 failed, 1 failed in 9.4s

Warnings:
  sign-in [01-login.yaml]: warning: Optional Maestro assertVisible skipped at line 3: ...
  • Engine emits the accumulated warnings on the step-failure event; the daemon copies them (scrubbed) onto the failure response's error details; the failed test result gained the warnings array the passing result already had; the default reporter's Warnings: section, JUnit lines, failing replay stderr, and MCP error text all render them.
  • An Apple runner presentation refusal now carries the registry identity of the system surface the tree came from as error.details.systemSurface, so a capture-boundary miss stops looking like a selector bug. Rebased over #2572: the sparse-declared verdict and its surface-host hint are owned there; this PR keeps the provenance plumbing and the warnings channel only.

Validation

Rebased head 2c78c6f; format, lint, typecheck, unit-core+apple-runner (10377; one unrelated subprocess-contention flake in runner-client.test.ts that passes isolated), output-economy, maestro-compat, layering, production-exports, wire/replay-compat, command-docs, tmpdir, agent-guidance all green locally. check:affected's mutation-model lane fails identically on pristine origin/main@775163 (reproduced in a clean worktree) — pre-existing, not from this diff. No device run yet: the live SafariViewService refusal recording is still an open ask from review.