Skip to content

restore: replay four merged-but-not-on-main PRs onto the trunk - #316

Merged
EdbertChan merged 4 commits into
mainfrom
restore/stranded-stack-291-296
Sep 9, 2026
Merged

restore: replay four merged-but-not-on-main PRs onto the trunk#316
EdbertChan merged 4 commits into
mainfrom
restore/stranded-stack-291-296

Conversation

@EdbertChan

@EdbertChanEdbertChan commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

Four merged PRs never reached main. #291, #292, #298 and #296 all report state=MERGED, but their merge commits are on their own stack branches, not on the trunk. This branch replays those four squashes onto current main so 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-label writes in this repo.

No content changed. Each commit is a git cherry-pick -x of the original squash, applied cleanly with no conflicts.

Test Plan

Every CI gate run locally against this branch:

run_all_tests.sh PASS skill_test_coverage PASS
no_tracked_local_artifacts PASS skill_test_debt_no_growth PASS
hook_test_coverage PASS skill_trigger_mechanism PASS
skills_three_harnesses PASS dora_baseline PASS
ecosystem_boundaries PASS no_dated_provenance PASS
skill_file_refs PASS no_new_comments PASS

ruff and shellcheck are not installed on the local box, so those two run in CI only.

Verify the gap this closes:

gh pr view 296 --json mergeCommit --jq .mergeCommit.oid # c094d31e4...
git branch -r --contains c094d31e4 | grep -c origin/main # 0 before, 1 after

Revert Plan

git revert the four commits, or reset main to 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 (AppleScript System Events keystrokes/clicks, cliclick, xdotool, video screencapture, ffmpeg screen capture) unless a fresh /tmp/.ui-input-window hands-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 through install.sh plus Claude settings merge.

Policy and reflect plumbing: Live-demo / cat-mode / CLAUDE.core.md now require disposable UI surfaces and the same marker; evidence rules add an explicit hit / clean / unchecked rule for guards. wrong-check-reflect and reflect treat concessions like “your instinct was right” or “good catch” plus a correction as FAIL shapes. scope-lock gains tests pinning corrupt state vs unreadable transcript behavior. check_hook_test_coverage.py requires 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.

EdbertChanand others added 4 commits September 9, 2026 13:12
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)
@cursor

cursorBot commented Sep 9, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@EdbertChan
EdbertChan merged commit 2b4b63d into mainSep 9, 2026
5 of 6 checks passed
Sign up for freeto 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

@EdbertChan