feat(settings): distinguish assign-fallback outcome in audit_events - #3366
Conversation
The executor's "assign" case falls back to a by:<login> label when GitHub silently drops an ineligible assignee, but both outcomes recorded the identical generic planner reason in audit_events, so there was no way to tell a real assignee from a silently-refused one. performAction now returns an optional audit-detail override, used only by the assign fallback, so the two outcomes are distinguishable.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-05 05:11:37 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 2 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 #3366 +/- ##
=======================================
Coverage 93.88% 93.88%
=======================================
Files 282 282
Lines 30570 30571 +1
Branches 11136 11137 +1
=======================================
+ Hits 28702 28703 +1
Misses 1211 1211
Partials 657 657
🚀 New features to boost your workflow:
|
Summary
src/services/agent-action-executor.ts's"assign"case (feat(agent): auto-assign PR opener as GitHub assignee (config + wiring) #3182) callsensurePullRequestAssignee; when GitHub silently refuses the assignee (no push/triage access — the common case for an external contributor), it falls back to aby:<login>label. Both outcomes previously recorded the identical generic"completed"audit event with the planner's generic"auto-assign PR opener"reason, soaudit_eventshad no way to tell whether a given PR actually got a real GitHub assignee or silently fell back to the label — the literal gap named in a recent repo-policy config audit ("auto-assign has unclear failure visibility when GitHub refuses assignees").performActionnow returns an optional audit-detail override (string | undefined), used only by the assign fallback branch, so the caller'saudit("completed", detailOverride ?? action.reason)records a distinct detail ("assignee refused by GitHub — fell back to a by:<login> label") when the fallback fires, and the original generic reason otherwise. Every other action class is unaffected — they implicitly returnundefined.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run typecheck(clean)npx vitest run test/unit/agent-action-executor.test.ts(120/120 passing, including the 2 updated assign tests asserting the new audit detail)npx vitest run test/unit/agent-approval-queue.test.ts(68/68 passing — this path also callsperformActionon approval-queue accept)npm run test:workers/npm run build:mcp/npm run test:mcp-pack/npm run ui:openapi:check/npm run ui:build— not run individually this PR; no worker/MCP/OpenAPI/UI surface touched. Ran the fullnpm run test:cigate once already this session (PR fix(settings): authorize circuit-breaker hold labels via merge/close autonomy #3363, same branch point) with no relevant failures; this PR's diff is a small, isolated change to one function's return type plus its one call site.audit_events.detailvalue directly.Safety
audit_eventsrow, never posted to GitHub.)UI Evidencesection below. — N/A, no visible UI change (internal audit-log detail only).Notes