fix(review): wire resolveDispositionReason into the action-executor notification (#6636) - #6686
Conversation
…otification (JSONbored#6636) resolveDispositionReason (outcomes-wire.ts) was fully implemented + tested but had zero call sites: the action executor emitted disposition notifications with only the plain `action.reason`, never the enriched, verdict-aware reason the function builds. Call it at the Discord/Slack notify site so the notification shows the AI's actual recorded gate-verdict reasoning (latest gate_decision summary for the PR) when one is on record, falling back to the plain reason otherwise — byte-identical when there's nothing to enrich with. Adds a regression test asserting the enriched reason (not the plain reason) reaches the notification, plus the plain-reason fallback path.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
1 similar comment
|
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 #6686 +/- ##
==========================================
- Coverage 93.65% 93.65% -0.01%
==========================================
Files 681 682 +1
Lines 68114 68107 -7
Branches 18706 18707 +1
==========================================
- Hits 63791 63784 -7
Misses 3347 3347
Partials 976 976
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-16 19:05:35 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
resolveDispositionReason(src/review/outcomes-wire.ts) was fully implemented and had a dedicated test suite, but zero call sites — the action executor emitted its Discord/Slack disposition notification with only the plainaction.reason, so the enriched, verdict-aware reason the function was built to supply never reached users. Its own doc comment has promised that behavior since it was built. Closes #6636.Fix
At the notify site in
src/services/agent-action-executor.ts, resolve the enriched reason before building the notification params:resolveDispositionReasonreturns the latest recordedgate_decisionsummary for the PR (review_auditkeys those rows by${repoFullName}#${pullNumber}), and falls back toaction.reasonwhen no verdict is on record or the read fails — so the notification is byte-identical when there's nothing to enrich with.resolveDispositionReason's own logic is unchanged (it's already correct + tested); this is purely the missing wire-up.Scope / Validation / Safety
Closes #6636.npm run typecheck(0 errors), engine build clean,git diff --checkclean, no attribution/secrets.notifyActionToDiscordand asserts the notification carries the enriched gate-verdict summary for a PR with a recorded verdict, and the plain disposition reason for a PR without one — covering both branches at the new call site.test/unit/agent-action-executor.test.ts+outcomes-wire.test.tsgreen (219 tests).resolveDispositionReason's logic untouched; no behavior change when no verdict is recorded.Closes #6636