Skip to content

feat: capture native structural observations - #96

Merged
abrichr merged 3 commits into
mainfrom
codex/capture-structural-post-94
Aug 27, 2026
Merged

feat: capture native structural observations#96
abrichr merged 3 commits into
mainfrom
codex/capture-structural-post-94

Conversation

@abrichr

@abrichr abrichr commented Aug 27, 2026

Copy link
Copy Markdown
Member

What this changes

Capture now records live macOS Accessibility and Linux AT-SPI evidence beside the action event. Provider failures stay nonfatal and keep an explicit unavailable result.

The macOS provider first asks the system-wide Accessibility object for the focused element. It falls back to the frontmost application when macOS does not return that value. The Linux extra keeps PyGObject below 3.50 so it remains compatible with the documented GLib 2.64 baseline.

Stack

This PR is stacked on #94 and must merge after it. The remote #94 branch currently lacks its local frame-interval fix at fba6c745, so this draft temporarily includes that commit. The diff will narrow when #94 updates.

This change does not add the terminal manifest or sealed-load contract. That work touches #94-owned capture files and belongs in the next stack layer.

Verification

  • ruff check openadapt_capture
  • 587 non-slow tests passed; 2 skipped; 12 deselected
  • live macOS focused-element qualification test passed
  • wheel and source archive built and passed scripts/verify_distribution.py
  • git diff --check passed

Two things a later reader needs

Adding an extra to pyproject.toml breaks the sealed fixtures unless uv.lock moves with it. This PR adds the linux extra. CI runs uv sync --extra dev; on main the committed lock already satisfies pyproject.toml, so nothing is rewritten and the fixtures' pinned builder.lock_sha256 still matches. With a new extra the lock goes stale, uv sync re-locks, sha256(uv.lock) changes, and tests/test_synthetic_fixtures.py fails on both fixtures for every Python version. Measured in one worktree with one uv: main's pair produced a stable lock fb9a77ab..., this branch's pyproject.toml produced a rewritten 8758039f.... #107 later narrowed the recorded provenance to the determinants that actually decide the fixture bytes, which is what resolved this. The narrowing was established by experiment: re-locking and regenerating with the old hash held produced byte-identical artifacts, so the lock's contents were causally inert and only its recorded hash was not.

A pre-rebase commit is preserved at rescue/capture-96-pre-forcepush-c61d17a. Two files live only there and are referenced by nothing on main or on this head: scripts/read_structural_fixture_output.py and its test tests/test_structural_fixture_output.py. They look like a fixture-output reader someone wrote and then lost. Take them from the rescue branch if you want them.

@abrichr
abrichr force-pushed the codex/capture-structural-post-94 branch from 4a9293f to 78c0be9 Compare August 27, 2026 17:22
Base automatically changed from codex/native-geometry-epoch-capture to main August 27, 2026 17:33
@abrichr
abrichr force-pushed the codex/capture-structural-post-94 branch from 78c0be9 to ba98574 Compare August 27, 2026 21:30
abrichr and others added 3 commits August 27, 2026 18:17
The linux extra adds a platform-gated PyGObject dependency. Lock it so the
committed uv.lock describes the project's optional dependency groups.

uv resolves this to two Linux-only wheels, pygobject and pycairo, and changes
no already-resolved version. It also rewrites the lock in the current file
format, which accounts for the bulk of the diff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@abrichr
abrichr force-pushed the codex/capture-structural-post-94 branch from ba98574 to 96a1b35 Compare August 27, 2026 22:18
@abrichr
abrichr marked this pull request as ready for review August 27, 2026 22:26
@abrichr
abrichr merged commit 7a96690 into main Aug 27, 2026
12 checks passed
@abrichr
abrichr deleted the codex/capture-structural-post-94 branch August 27, 2026 22:26
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