Repository navigation
feat(mas): closed-lid repair agent, plus #80 review fixes - #81
Merged
Merged
Conversation
…ead-only bookmarks The sandbox can hide a bookmarked target until scoped access starts, so resolve now starts access first and stops it exactly once. Bookmarks use withSecurityScope plus securityScopeAllowOnlyReadAccess to match the user-selected.read-only entitlement.
A closed app holds nothing because WakeEngine.init drops lease holds on relaunch, so end clears the run record and exits 0 instead of failing and leaving it behind.
…A check dilated-power gains on <pid>, beat, check and repair. It records the owner pid and start time in a 0600 session file whose mtime is the heartbeat, and repair reverts a dead or silent session and leaves a tombstone. Test hooks only work when the script runs from a repo checkout. scripts/mas-repair-agent-check.sh installs the real script and agent, proves the revert paths on this Mac, and removes everything.
UserScriptPowerRunner sends on <pid> and maps reverted to revertedWhileUnresponsive. The session guard takes an optional script beat hook, wired only under MAS_CHANNEL at a 20s interval. Permission copy and ARCHITECTURE.md describe the repair agent.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
MAS slice BUILD.4, plus the three CodeRabbit findings from #80.
com.codeswhat.dilated.closed-lid-repair, every 30s and at login) that runsdilated-power repair. Sleep comes back on its own after the MAS app crashes, gets killed, hangs, or the Mac reboots mid-session. The companion installs the agent in a later slice, and the store app never starts anything. The script now owns the session record (pid plus start time, with the file's mtime as the heartbeat), and the app beats every 20s. If the agent reverts a session, a reverted pid can't silently re-enable. The sudo lines are unchanged.scripts/mas-repair-agent-check.shran on real hardware without a lid close: reverted 26s after akill -9, 123s after a hang, and 1.9s after a simulated reboot. The log is kept locally.agent endwith the app closed now clears its record and exits 0. A closed app holds nothing, because lease holds are dropped on relaunch.The combined tree passed verify, check-mas-build and the MAS-filtered tests locally.