fix(recording): remove the iOS runner's device recording before reporting clean

TH
3h ago
+1448-126

Summary

Invariant: a physical iOS runner recording reports a completed stop or a confirmed cleanup only after the runner answers removed or absent for its exact file in its own container. A missing session, an acknowledged stop, or a record that names no container proves nothing.

  • recordDiscard deletes only the canonical name, in the named container. It refuses directories and files still recording.
  • Stop: stop, copy, journal export and proof, retire. A retry repeats only the removal.
  • Old runner, or a provider without retire: typed runner-update-required. The export is kept and the record stays cleanup-pending.
  • After a restart, a journaled export is restored, retired, and published to the original caller, with its window starting at that first registration.
  • A recording startup recovery settled before any stop gets recording-output-not-published with its daemon-side path.

Step 1 of the durable-capture split.

Before / after

iOS record stop: was completed with a retirable path and the file left behind. Now completed with retired, or runner-update-required with the export kept.

Validation

Head 6e787a7. Changed unit, transport and daemon HTTP tests pass locally; Swift needs CI. CI pending.

Open live ask, physical iPhone (device back 2026-12-02):

  • Container, then stop, copy, checkpoint, removed.
  • absent on retry.
  • Old-runner refusal.
  • Restart, then download as the original caller.
  • Foreign, active and second files untouched.

馃 Generated with Claude Code