Repository navigation
Conversation
…system chrome
Window-scoped recording dropped input that went to another window but left
its reserved source ordinal empty, so the sealed journal had a hole and
verification refused the whole recording ('missing ordinal').
The journal now records each policy drop with its reason, and the recorder
writes them to a sealed source-ordinal-skips.json. The verifier accepts an
empty ordinal only when that record names it with a known reason in a
window-scoped capture. Unrecorded holes still fail.
On macOS, full-screen Dock and Notification Center windows no longer count
as the window under the pointer unless the Accessibility hit test says their
process takes the click there; unknown fails closed.
|
Lab verification of 632a7b4: macOS 15.7.7 guest, TextEdit, window-scoped record with this branch's Capture installed editable. A real click (hardware-level input, not injected) on the TextEdit window, 28 typed characters and Command-S. The capture sealed Linux X11 (Ubuntu 24.04 under Xvfb + openbox), #1966's CI on this PR is green (22 pass). The macOS and Windows capture unit jobs are skipped on PRs. |
Independent adversarial review: BLOCKFrom: Codex Reviewed head [P1] window_input_focus.py:341–343 can attribute another process's click to the target. After Accessibility names a PID different from the full-screen chrome, the loop skips that chrome but returns the first normal window without reconciling its PID with the hit test. When AX names a process absent from the Quartz candidates, or one present only at the filtered status-window level, the target behind it is returned. The actual Refuse an unresolved or contradictory owner before accepting a normal candidate. Keep the legitimate transparent-chrome positive and actual-chrome refusal cases. Gated Linux validation: the three unchanged author files passed 79 tests; their opt-in live macOS test skipped. Ten independent head/parent probe controls produced seven passes and three failures: both ownership-disagreement cases failed at head and passed with the exact parent probe. The remaining failure is the parent's old refusal of legitimate target clicks through chrome, which the head fixes. The shared input-admission implementation is byte-identical at head and parent. These are component controls using fake native bindings and the real admission check. No independent native macOS run or full-suite qualification is claimed. |
Closes #1976. Part of #1867.
What changed
source-ordinal-skips.jsonbefore sealing, so the artifact manifest covers the file. It holds ordinals and reason codes only.MacOSInputFocusProbe.window_attreated full-screen Dock (layer 20) and Notification Center (layer 23) windows as the window under every point, so clicks on the target were dropped. A window at the Dock level or above (below the status level) now counts only when the system Accessibility hit test (AXUIElementCopyElementAtPosition) says its process takes the click there, for example a Dock tile or a notification banner. When the hit test can't answer, the owner is unknown and the click is dropped (fail closed). Other apps' windows still block as before.How I tested it
tests/test_source_skips.py(record format, journal), verifier cases intests/test_capture_terminal.py, and intests/test_window_input_focus.pyan end-to-endrecord()run. That run clicks and types into another window, then goes throughRecorder._verify_completed_capture, sealing andCaptureSession.validate_sealed. It also adds macOS probe tests with full-screen Dock and Notification Center windows.origin/mainand the new tests kept, 12 tests fail. These include the end-to-end test and the Dock/Notification Center test. With the fix, all 79 tests in these three files pass.pytest tests/ -m "not slow"gave 1125 passed, 11 skipped.ruff check openadapt_capture/, the py310 E9 check andcheck_changelog.pypass.What I could not test