restore: replay four merged-but-not-on-main PRs onto the trunk - #316
Merged
Conversation
AppleScript System Events keystrokes and clicks, cliclick, xdotool, screencapture video, and ffmpeg screen capture act on the session the user is sitting in. They are blocked unless a hands-off window marker is open and fresh, the screen is unlocked, and the user has been idle a moment. A command that runs a local script is scanned through that script, with shell variables in the path resolved first, and files are streamed rather than skipped for being large: an unchecked file is not a clean file. Past the scan ceiling the command is refused with the reason. Ships with its own installer wiring, since the repo's install test requires every hook entrypoint to be wired in the commit that adds it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ Change-Id: I670196cdbe46ac0dad0cd9c097033d312f1cffb6 (cherry picked from commit 3eea768)
cat-mode gains a UI-testing rule under Verify and the live-demo rules gain the matching bullet: disposable surface first, an explicit hands-off window and marker before driving real input, stop when the session goes back to the user, and leave no residue. Contract tests pin the pieces an agent acts on, including that the marker path matches the guard hook's default. The skill's own line cap forced a trim in the same commit, so one bullet's incident narrative is cut back to its rule. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ Change-Id: Ifa0ea6ce9e6f809dfe162be89ff630d8ec90d363 (cherry picked from commit 8a08e9d)
… miss A reply that opens by conceding and then says it is verifying now, that it had not checked, or that it should have, is the wrong-check class this detector already covers in its explicit forms. "Your instinct was right" fires on its own: conceding that the user's suspicion beat the agent's checks already means the checks missed something. Bare agreement stays silent. The reflect skill's invoke list names the same shapes, so the written trigger and the detector agree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ Change-Id: I5b8f852a9ba5097517405ae1959f21378fab3cbf (cherry picked from commit 40fe66e)
A detector that opens a file has a third outcome besides hit and clean: input it could not read. A size cap that silently skips anything larger reports an unchecked file as clean, which is the opposite of what a guard is for. check_hook_test_coverage now requires any file-reading detector to have a test that pins its unreadable-input behavior. Fail open or fail closed stays the hook's own documented choice; leaving it untested does not. scope-lock was the one real gap the new rule found: its state file fails open and its transcript read fails closed, both now asserted. The evidence rules gain the general form, grounded in Saltzer and Schroeder's fail-safe defaults. Claude-Session: https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ Change-Id: Ifa24ac4d096e44be20c30733c5beea8d9218e578 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit c094d31)
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_cc8f8af7-d22b-4d68-9ead-1fd52b2ef0cb) |
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
Four merged PRs never reached
main. #291, #292, #298 and #296 all reportstate=MERGED, but their merge commits are on their own stack branches, not on the trunk. This branch replays those four squashes onto currentmainso the work is actually in effect.The cause was
gh pr edit --base main. It exits 0 and prints a Projects-classic GraphQL deprecation warning while leaving the base unchanged, so each child merged into its parent's branch instead of the trunk. The same command silently drops--add-labelwrites in this repo.No content changed. Each commit is a
git cherry-pick -xof the original squash, applied cleanly with no conflicts.Test Plan
Every CI gate run locally against this branch:
ruffandshellcheckare not installed on the local box, so those two run in CI only.Verify the gap this closes:
Revert Plan
git revertthe four commits, or resetmainto the commit before the merge. Nothing here is stateful and no migration runs.🤖 Generated with Claude Code
https://claude.ai/code/session_01F43CBUnsDEs6J2zEC1r8a8
Note
Medium Risk
New PreToolUse blocking can stop legitimate Bash automation on the live desktop; lock/idle probes fail open on non-macOS/errors while missing the hands-off marker still blocks.
Overview
Adds
ui-input-guard, a Bash PreToolUse hook that blocks synthetic session control (AppleScriptSystem Eventskeystrokes/clicks,cliclick,xdotool, videoscreencapture, ffmpeg screen capture) unless a fresh/tmp/.ui-input-windowhands-off marker exists, the screen is unlocked, and the user has been idle ~10s on macOS. It follows wrapper scripts (chunked scan, refuses unscannable files over 8MB instead of treating them as clean), and is wired throughinstall.shplus Claude settings merge.Policy and reflect plumbing: Live-demo / cat-mode /
CLAUDE.core.mdnow require disposable UI surfaces and the same marker; evidence rules add an explicit hit / clean / unchecked rule for guards.wrong-check-reflectandreflecttreat concessions like “your instinct was right” or “good catch” plus a correction as FAIL shapes.scope-lockgains tests pinning corrupt state vs unreadable transcript behavior.check_hook_test_coverage.pyrequires hooks that read files to have tests naming the unreadable outcome.Reviewed by Cursor Bugbot for commit 9f0f9ab. Bugbot is set up for automated code reviews on this repo. Configure here.