Skip to content

chore: adopt openadapt-capture 0.5.4 and run the adapter tests in CI#139

Merged
abrichr merged 2 commits into
mainfrom
chore/adopt-capture-054
Jul 17, 2026
Merged

chore: adopt openadapt-capture 0.5.4 and run the adapter tests in CI#139
abrichr merged 2 commits into
mainfrom
chore/adopt-capture-054

Conversation

@abrichr

@abrichr abrichr commented Jul 17, 2026

Copy link
Copy Markdown
Member

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: capture extra → openadapt-capture>=0.5.4

0.5.3/0.5.4 fixed the screenshot-at-import side effect (headless import now clean) and persist pixel_ratio on the recording model. uv.lock already 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 (the capture extra 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 blanket try/except → skip around 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 persist pixel_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 test job 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 in tests/test_capture_adapter.py — which build a REAL capture session (SQLAlchemy recording.db + VideoWriter mp4) and feed the converted recording to the UNMODIFIED compiler — now execute on every PR instead of silently skipping. This makes docs/desktop/RECORDING.md's "convert_capture, CI-tested" claim true (claim kept, not weakened). claims.yaml evidence/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.py13 passed
  • ruff check openadapt_flow clean, ruff format --check clean, mypy clean
  • python scripts/check_consistency.py → "Consistency gate passed"

Notes

🤖 Generated with Claude Code

abrichr and others added 2 commits July 17, 2026 18:04
- 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>
@abrichr
abrichr merged commit 4e424dd into main Jul 17, 2026
13 checks passed
@abrichr
abrichr deleted the chore/adopt-capture-054 branch July 17, 2026 22:35
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