Repository navigation
fix(agent-isolation): show the touch overlay for every signature - #1832
Merged
Merged
Conversation
potiuk
enabled auto-merge (squash)
October 25, 2026 23:03
A window that closed without being answered (the Aqua overlay losing the keyboard to another application, a missing toolkit, a crash) was taken for a dismissal, and a dismissal was kept until every armed session had disarmed. With another agent session open, one stray click silenced the overlay for every later signature, and git waited on the key with nothing on screen. Generated-by: Claude Opus 5
potiuk
force-pushed
the
fix/gpg-touch-overlay-dismissal
branch
from
October 26, 2026 00:13
1b6d39e to
7f04375
Compare
pytest.skip raises, but CodeQL cannot see that, so a loop that returned the process from inside and fell through to the skip read as mixed explicit and implicit returns. Generated-by: Claude Opus 5
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.
Summary
kill -0would read it as ended. No dismissal lasts more than a minute, so a long-lived gpg it happened to name (agpg --card-edit) cannot keep it; a signature still waiting after that gets its window back. An ssh authentication has no signer to name, and the first gpg or ssh-keygen after it removes its dismissal. A window that closes unanswered is shown again after 3 s. Through that delay the watcher keeps the window lease, so another session's watcher cannot redraw the window early and take the keyboard straight back.exec'd, so its exit status can be translated: 0 and 1 (OK, Esc, close) count as answered, anything else as unanswered. Its termination trap is installed before the dialog starts, so no dialog outlives the overlay that drew it.Type of change
tools/*/withpyproject.toml)tools/agent-isolation/gpg-touch-overlay.shand the macOS windowTest plan
tools/agent-isolation/tests/test_gpg_touch_overlay.pypasses on macOS (serially, and repeatedly under-n autoas CI runs it) and in a Linux container (python:3.12, bash 5.2). Linux runs the zenity-path tests that macOS skips.New watcher tests:
prek run --from-ref origin/mainpasses, as doestests/test_hook_manager_shim.pyafter mergingmain(which carries test(agent-isolation): keep the shim test's commit from signing #1831's fix for the shim test's signed commit).The tests that start a fake signer now take turns across pytest workers (a lock in
process_named): every worker sees the same process table, so under-n autoone test's fakessh-keygenwas another test's signature in flight.RFC-AI-0004 compliance
Linked issues
Refs #1325
Notes for reviewers (optional)
Known follow-ups, not in this PR, both about how a dismissal identifies its signature:
A false positive here costs one extra window; a false negative is a silent block. Where those trade off, the change errs to the window: an unrelated gpg that the dismissal named and that exits brings the window back for a signature already dismissed.
Split from the matcher fix in a separate PR, which makes more commands arm the overlay. The two are independent and either can merge first.
🤖 Generated with Claude Code