Suppress screen lock during meetings (lock-guard) - #25
Merged
twistedmelonman merged 10 commits intoAug 12, 2026
Merged
Conversation
added 10 commits
August 12, 2026 12:17
…tion, Meet URL anchoring, config whitespace) - lock-fanout: invoke lock-guard via $HOME/.local/bin/lock-guard (escaped for remote expansion) instead of a bare name, since ~/.local/bin is not on the non-interactive SSH PATH. - lock-guard: replace ioreg-based mic detection (dead code on Apple Silicon) with pmset -g assertions / coreaudiod PreventUserIdleSleep. - lock-guard: anchor the Meet URL regex to https://meet.google.com/ to avoid matching unrelated hosts/substrings. - lock-guard: trim trailing whitespace/CRLF in guard-processes config lines so they match pgrep -x correctly. - CLAUDE.md: document that upgrading requires re-running bin/install on every Synergy client, not just the primary machine.
|
The diff introduces No BLOCK-worthy issues found. A few things I traced to confirm they are safe:
VERDICT: PASS |
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
bin/lock-guard, a new client-side script invoked over SSH bylock-fanout(replacing a barepmset displaysleepnow) that skips the lock and logs why if the client looks like it's in a meeting: a known process running (Zoom/Teams/FaceTime, configurable via~/.config/lock-sync/guard-processes), the microphone actively in use (pmset -g assertions), or an active Google Meet room tab open in Chrome (osascript, 3s timeout).lock-guardintobin/install/bin/uninstalland documents the new config file and one-time Chrome Automation permission grant in CLAUDE.md/README.md.Notable fixes from review
A local final whole-branch review caught two real bugs verified live on hardware before merge:
lock-fanoutwas invokinglock-guardby bare name, but non-interactive SSH sessions don't have~/.local/binon PATH — every remote call failed withssh_exit=127. Fixed to invoke via an absolute, remotely-expanded path.ioreg -c IOAudioEngineapproach returns zero output on Apple Silicon Macs (legacy Intel/kext-era IOKit class). Replaced withpmset -g assertions, verified against a real mic open/close on this hardware.Also hardened: Meet-URL regex host anchoring (was matching unrelated hosts as a substring), config file trailing-whitespace/CRLF handling.
Known non-blocking follow-up (filed separately):
docs/plans/2026-08-12-lock-guard-meeting-suppression-design.md's Task 1 code block still describes the abandonedioregapproach rather than the shippedpmsetone — the design doc's rationale section wasn't updated when the implementation pivoted. Code and tests are correct and consistent with each other.Test plan
bats tests/— 53/53 passingshellcheck -S info bin/*— cleanasiago(the Synergy server/controller for this repo's author): ranbin/install, confirmedlock-guardsymlinked, triggered a real screen lock, confirmedssh_exit=0forasiagoitself in~/Library/Logs/lock-sync.logarich-mac,mimolette,tilsit) needbin/installre-run on each after this merges — documented in CLAUDE.md's new "Upgrade path" notehttps://claude.ai/code/session_01Sasr2N9Rj9n8rv2sjwN2YJ