Skip to content

feat: unified Recorder API with config overrides and runtime properties#10

Merged
abrichr merged 1 commit intomainfrom
feat/unified-recorder-api
Feb 17, 2026
Merged

feat: unified Recorder API with config overrides and runtime properties#10
abrichr merged 1 commit intomainfrom
feat/unified-recorder-api

Conversation

@abrichr
Copy link
Member

@abrichr abrichr commented Feb 17, 2026

Summary

  • Restore the clean Python API from the pre-legacy design on top of the proven legacy multi-process recording internals
  • Recorder constructor now accepts capture_video, capture_audio, and other recording options as keyword params
  • Adds event_count, is_recording, stats, wait_for_ready(), and capture properties
  • Fixes compatibility with record_waa_demos.py (openadapt-evals) which was broken by the legacy migration

Test plan

  • 129 tests pass (uv run pytest tests/ -v --ignore=tests/test_browser_bridge.py -m "not slow")
  • Lint clean (uv run ruff check openadapt_capture/)
  • Verified Recorder(path, capture_video=True, capture_audio=False) works
  • Verified recorder.event_count, recorder.stats, recorder.is_recording all accessible
  • CI passes (lint + tests on Python 3.10, 3.11, 3.12)

🤖 Generated with Claude Code

Restore the clean Python API from the pre-legacy design on top of the
proven legacy multi-process recording internals.

Recorder constructor now accepts capture_video, capture_audio, and other
recording options as keyword params that override config defaults. Adds
event_count, is_recording, stats, wait_for_ready(), and capture
properties for runtime introspection.

Changes:
- config.py: Add RecordingConfig dataclass + config_override() context
  manager for temporary config patching
- recorder.py: Add shared counter params to record(), fix module-level
  config reads (STOP_SEQUENCES, PLOT_PERFORMANCE), rewrite Recorder
  class with full API (~120 lines replacing ~36)
- cli.py: Forward --video/--audio/--images flags to Recorder
- __init__.py: Export RecordingConfig
- tests: 11 new tests (Recorder API + config_override)

Fixes compatibility with record_waa_demos.py which passes
capture_video/capture_audio and reads recorder.event_count.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abrichr abrichr merged commit d840e81 into main Feb 17, 2026
4 checks passed
@abrichr abrichr deleted the feat/unified-recorder-api branch February 17, 2026 16:15
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