Harden agent cooling: user kill switch, monotonic lease clocks, restore authority, audit, ruleset matching - #28
Merged
Conversation
…re authority, audit, ruleset matching - Agent cooling kill switch: daemon persists a root-owned policy-enabled setting; disabling restores Auto if a lease is active and flips policy.enabled to false on every status/capabilities/diagnose readback. App Settings gains the Allow agent cooling requests toggle (XPC setAgentControlEnabled). - Monotonic safety clocks: lease expiry, cooldown, and monitor scheduling use a system-uptime-anchored decision clock instead of the wall clock, and startup recovery clamps persisted-lease remaining time so NTP/manual clock rollbacks cannot stretch a lease past the policy cap. - Restore authority: the arbiter refuses authority-less Auto restores over an active manual session; viftyctl restore-auto defaults to no authority and gains --operator for human override. The app coordinator carries operator authority on all its restore paths so unclean-exit recovery and Auto ticks keep working. - Audit: every full-set Auto restore is now recorded, with the request transaction ID when no lease exists. - Release governance: check-release-governance.sh now matches the release ref against ruleset include/exclude patterns (fnmatch, FNM_PATHNAME) and fails if any additional active tag ruleset matches, instead of silently skipping non-shape-exact rulesets; contract checker and Ruby mutation tests updated.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…edtrullz/Vifty into codex/agent-control-hardening
The SwiftPM checks job cancels intermittently at the 35-minute timeout when make verify-full crosses it on slower macos-15 runners; the full gate needs roughly 29-35 minutes, leaving no margin. Pin the larger timeout in the CI trust-gate test.
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.
Part 4 of the 2026-08-07 deep-review remediation (PRs #25-#27 are the release fix, consolidation, and v1.4.2 prep). Implements the review's High/Medium findings H-8, H-9, M-8, M-9, M-15.
Changes
policy-enabled.json(0600, root-owned, same secure-store envelope as the lease); disabling restores Auto if a lease is active. New XPCsetAgentControlEnabled, client proxy, AppModel state, and a Settings → Agent Workflows toggle.policy.enablednow truthfully reports the user's choice on every status/capabilities/diagnose readback (previously hardcoded true).viftyctl restore-autonow defaults to no authority and requires--operator(human) to override a manual session. The app coordinator carries operator authority on all restore paths, so unclean-exit recovery and Auto ticks keep working.check-release-governance.shnow matchesrefs/tags/<tag>against ruleset include/exclude patterns (fnmatch, FNM_PATHNAME) and fails when any additional active tag ruleset matches the ref, instead of silently skipping non-shape-exact rulesets; contract checker and Ruby mutation tests pin the new behavior.Verification
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer make verify: pass (fast XCTest suite, warnings-as-errors build, release app bundling, plist lint, codesign, viftyctl identifier checks).Non-claims