feat(agent): kill-switch + dry-run + action audit (#776) - #842
Merged
Conversation
Phase-0 safety controls the action layer (#778) must consult before any action — the second gate alongside resolveAutonomy. - src/settings/agent-execution.ts (pure, 100% covered): - resolveAgentActionMode -> paused | dry_run | live. Safest wins: a global OR per-repo pause halts everything; else dry-run logs without mutating; else live. agentActionModeExecutes is true only for live. - isGlobalAgentPause: the operator emergency brake via env AGENT_ACTIONS_PAUSED (truthy-string idiom). - buildAgentActionAudit: a structured who/what/why/outcome/mode audit record (eventType agent.action.<class>) so live actions AND dry-run shadows record on one shape — extends the existing audit-event infra. - Per-repo settings agentPaused + agentDryRun (migration 0044, default false), wired like badgeEnabled across types/schema/repositories/openapi /settings-preview yml block, plus the maintainer PUT /settings. - Dashboard: kill-switch + dry-run toggles in the auto-maintain section. Deferred to #778 (needs real actions): the action layer honoring the mode, the dry-run feed into the recommendation-outcome loop, and revert-where- possible. NOTE: migration 0044 follows #773/#774's 0042/0043, ahead of the open #833.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 2bd4408 | Commit Preview URL Branch Preview URL |
Jun 17 2026, 09:41 PM |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #842 +/- ##
=======================================
Coverage 96.59% 96.59%
=======================================
Files 99 100 +1
Lines 14229 14240 +11
Branches 5182 5190 +8
=======================================
+ Hits 13744 13755 +11
Misses 105 105
Partials 380 380 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closed
12 tasks
This was referenced Jul 2, 2026
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.




Closes #776. Phase-0 safety controls the action layer (#778) must consult before any action — the second gate alongside
resolveAutonomy(#773).What
src/settings/agent-execution.ts(pure, 100% covered):resolveAgentActionMode→paused | dry_run | live. Safest wins: a global OR per-repo pause halts everything; else dry-run logs without mutating; else live.agentActionModeExecutesis true only forlive.isGlobalAgentPause— the operator emergency brake via envAGENT_ACTIONS_PAUSED(truthy-string idiom).buildAgentActionAudit— a structured who / what / why / outcome / mode record (eventType: agent.action.<class>) so live actions AND dry-run shadows record on one shape, extending the existing audit-event infra.agentPaused+agentDryRun(migration 0044, default false), wired likebadgeEnabledacross types / schema / repositories / openapi / yml settings block, plus the maintainerPUT /settings.Scope
Establishes the primitives; the action layer that honors the mode, the dry-run feed into the recommendation-outcome loop, and revert-where-possible are #778 (they need real actions to act on/revert).
Verification
typecheck clean · migration guard (0001..0044, no dup) · full suite 2021 passed, 1 skipped (pre-existing pngjs skip) · OpenAPI regenerated + drift-clean · UI lint/typecheck/build clean · the new module is 100% covered, every changed line covered.
Relates #768 (Phase 0), #773/#774 (the other Phase-0 gates), #778 (the action layer that consults all three).