Skip to content

feat: auto-persist WAA recordings to prevent data loss#62

Merged
abrichr merged 1 commit into
mainfrom
feat/recording-persistence
Mar 2, 2026
Merged

feat: auto-persist WAA recordings to prevent data loss#62
abrichr merged 1 commit into
mainfrom
feat/recording-persistence

Conversation

@abrichr
Copy link
Copy Markdown
Member

@abrichr abrichr commented Mar 2, 2026

Summary

  • Add waa_recordings/ to .gitignore — recordings are now immune to git stash -u and git clean -f
  • Add _backup_file() helper: hardlinks PNGs + meta.json to ~/oa/recordings/{task_id}/ (zero extra disk space, falls back to copy on cross-device, silent on failure)
  • Add _save_incremental_meta(): writes meta.json atomically (via .tmp rename) after each step with recording_complete field for partial recording detection
  • Wire helpers into the recording loop (before/after screenshots, step advances, done, restart cleanup)
  • Use systemd-first pattern for socat proxy in auto-infrastructure

Protection matrix

Threat Protected? Mechanism
git stash -u YES .gitignore
git clean -f YES .gitignore
git clean -fx YES External backup
Script crash mid-recording YES Incremental meta.json
Accidental rm -rf repo/ YES External backup

Test plan

  • Run python scripts/record_waa_demos.py record-waa — verify meta.json appears after first step, not just at end
  • Verify ~/oa/recordings/{task_id}/ has hardlinked copies of PNGs
  • Run git stash -u in repo — verify waa_recordings/ is NOT removed
  • Verify convert_recording_to_demo.py still parses the new meta.json with recording_complete field

🤖 Generated with Claude Code

- Add waa_recordings/ to .gitignore (immune to git stash -u, git clean -f)
- Add _backup_file() helper: hardlinks PNGs + meta.json to ~/oa/recordings/
  (zero extra disk, falls back to copy on cross-device, silent on failure)
- Add _save_incremental_meta(): writes meta.json atomically after each step
  via .tmp rename, with recording_complete field for partial detection
- Wire helpers into recording loop (before/after screenshots, step advances,
  done, restart cleanup)
- Use systemd-first pattern for socat proxy in auto-infrastructure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abrichr abrichr merged commit e64368e into main Mar 2, 2026
1 check passed
@abrichr abrichr deleted the feat/recording-persistence branch March 2, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant