fix(record): replay the finished export from a retried record stop
Summary
record stop against a remote daemon can run out of its 90 s client window while the daemon is still exporting. The manifest then reaches completed, but a repeated record stop read it as no active recording, and the stored completion carried no caller-side output path — the recording existed on the daemon host with no CLI way to collect it (#2281).
A repeated record stop now serves that export from the durable manifest: session and device guards still apply, the file must still exist, and the caller gets the ordinary stop response, including the caller-side paths that make it downloadable. The manifest stores the finished response as the one object record stop returned, under a single key, so a replay cannot lose a field, and recovery refuses a response whose served or caller-side paths are not whole. The replay records no second session stop action, and a remote timeout now names that retry.
agent-device record stop --session demo --out ./capture.mp4 # client window expired
agent-device record stop --session demo --out ./capture.mp4 # returns the completed recording
16 files touched. No new command, flag, or timeout change; the 90 s envelope is untouched. Addresses #2281 — its needs-info request for customer evidence is still open.
Validation
pnpm check:affected --run passed at 0cb272ae553a9b48c2189a8b8ce2dda8d63e9bcd (format, lint, typecheck, layering, fallow, build, related vitest, daemon wire compat, command docs), and all PR checks including Coverage pass on that head.
Regression proof: removing the completed-manifest replay fails record stop returns the export whose response never reached the caller and its downloadable-path sibling in src/daemon/handlers/__tests__/record-runtime-stop-recovery.test.ts.
Two gates shaped the code: session teardown's eager-closure budget keeps the completion writers inside the resource definition, and the test-size ratchet moved hint assertions to src/daemon-client/__tests__/daemon-client-timeout.test.ts.
Live evidence for the readiness case is in a comment on this PR, captured at 8139aeb1ea; the reuse commits after it declare no behavior change. On an iPhone 16 Pro simulator behind agent-device proxy, record stop timed out at 90 s, the manifest turned completed 97 s later, and the retried record stop returned in under a second and downloaded a recording whose SHA-256 matches the host file, with one export in the host log.