fix(agent-actions): distinguish an executor error from a clean accept - #2428
Conversation
decidePendingAgentAction unconditionally persisted status: "accepted" on the approval-queue row regardless of what the executor actually did, so a thrown exception during the live mutation was indistinguishable from a clean success or an intentional policy denial. Add an "errored" status, scoped to a genuine executor exception -- a clean "denied" outcome (the gates ran and correctly declined to act) still reads as accepted, matching existing behavior. Closes #2423
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-01 22:46:14 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2428 +/- ##
==========================================
+ Coverage 95.85% 95.88% +0.02%
==========================================
Files 224 224
Lines 25104 25106 +2
Branches 9129 9131 +2
==========================================
+ Hits 24064 24072 +8
+ Misses 427 421 -6
Partials 613 613
🚀 New features to boost your workflow:
|
Summary
decidePendingAgentAction's accept path unconditionally setstatus: "accepted"on the persistedagentPendingActionsrow regardless of the executor's actual outcome (completed/queued/denied/error/dry_run), so a thrown exception during the live mutation was invisible next to a clean success without cross-referencing audit metadata."errored"status, scoped specifically to a genuine executor exception (execOutcome === "error"). A clean"denied"outcome (autonomy no longer authorizes, dry-run active, or a live pre-condition failed cleanly) still persists"accepted"— the maintainer's accept WAS honored, the executor just correctly chose not to act, which is not a failure and must not be conflated with one (matches existing, intentional test coverage for that case).AgentPendingActionStatus(types.ts),ApprovalDecisionResult.status, and the MCPgittensory_list_pending_actionsfilter enum +gittensory_decide_pending_actionsummary text.Closes #2423
Test plan
npm run typecheckcleannpm run test:coverage: 312 files / 5823 tests passing, no threshold failuresnpm audit --audit-level=moderate: 0 vulnerabilities"errored", not"accepted"