chore: adopt openadapt-capture 0.5.4 and run the adapter tests in CI#139
Merged
Conversation
- Bump the `capture` extra floor to openadapt-capture>=0.5.4 (0.5.3/0.5.4 fixed the screenshot-at-import side effect and persist pixel_ratio on the recording model). uv.lock already resolved 0.5.4; specifier synced. - Replace the three stale "capture screenshots the display at import" comments (pyproject, tests/test_capture_adapter.py, the adapter's HiDPI caveat) with accurate 0.5.4 semantics. - CI: the fast unit `test` job now installs the `capture` extra and asserts `import openadapt_capture` works headless, so the 13 adapter tests in tests/test_capture_adapter.py execute for real instead of silently skipping -- making RECORDING.md's "CI-tested" claim true. The module now skips ONLY when the extra is absent; an import failure with the extra installed fails loudly. - docs/desktop/RECORDING.md + claims.yaml updated to state precisely what CI proves (real on-disk capture session -> convert -> compile, not a live recorder run). Verified locally with 0.5.4: 13/13 adapter tests pass; ruff check, ruff format, mypy, and scripts/check_consistency.py all clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ence claims.yaml evidence/caveat wording changed in the previous commit; the gate requires docs/VERIFICATION.md + docs/verification.json to be regenerated in lockstep (scripts/validate_claims.py --report). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
openadapt-capture's live Recorder is the recorder for OpenAdapt's desktop path. This PR brings flow's integration up to date with capture 0.5.4 and makes the adapter test coverage real in CI.
1. Pin bump:
captureextra →openadapt-capture>=0.5.40.5.3/0.5.4 fixed the screenshot-at-import side effect (headless import now clean) and persist
pixel_ratioon the recording model.uv.lockalready resolved 0.5.4; only the specifier line is synced (no resolution change).2. Three stale "capture screenshots the display at import" comments replaced
pyproject.toml(thecaptureextra comment) — now documents why 0.5.4 is the floor and that the extra runs in headless CI.tests/test_capture_adapter.py— docstring + import-guard comments updated; the blankettry/except → skiparound the import is removed: the module now skips only when the optional extra is absent. With the extra installed (as in CI), an import failure is a real regression and fails loudly instead of silently skipping.openadapt_flow/adapters/capture.py— HiDPI caveat now accurate: sessions recorded with ≥0.5.4 always persistpixel_ratio; the under-scaling caveat applies only to legacy 0.5.x sessions that lack it.3. Adapter tests now REAL in CI
The fast unit
testjob installs.[dev,capture]and runs a cheap guard step (python -c "import openadapt_capture") proving the headless-import invariant before the suite. Result: the 13 tests intests/test_capture_adapter.py— which build a REAL capture session (SQLAlchemyrecording.db+VideoWritermp4) and feed the converted recording to the UNMODIFIED compiler — now execute on every PR instead of silently skipping. This makesdocs/desktop/RECORDING.md's "convert_capture, CI-tested" claim true (claim kept, not weakened).claims.yamlevidence/caveat updated to state precisely what CI proves (real on-disk session → convert → compile → replay; the live recorder has its own integration suite in the capture repo).Verification (local, capture 0.5.4 installed headless-importable)
pytest tests/test_capture_adapter.py→ 13 passedruff check openadapt_flowclean,ruff format --checkclean,mypycleanpython scripts/check_consistency.py→ "Consistency gate passed"Notes
openadapt_flow/backends/windows*,win_agent,runtime/replayer.py, resolver, or macOS-pixel files, and does not touchREADME.md(owned by a separate PR).pyproject.toml; the pin change here is a single line and conflict-tolerant regardless of merge order.🤖 Generated with Claude Code