Relationships
#2763 issue-lifecycle triage fails with 422 when the primary issue is already in_progress in swamp-club
Opened by stack72 · 9/30/2026
Description
The triage method moves the primary issue with a direct sc.transitionStatus('triaged') call (extensions/models/issue_lifecycle.ts, around line 1245). swamp-club only accepts forward single-step transitions. When the issue is already ahead of triaged (for example in_progress, set by hand before a lifecycle was started), the PATCH returns 422. The re-read in transitionStatus only treats the 422 as a no-op when the status equals the target, so triage fails and rolls back. The lifecycle then cannot leave triaging.
Linked issues do not have this problem: advanceLinked uses walkStatusTo / statusPath, which returns an empty path when the issue is already at or past the target.
Reproduction
- An issue is in_progress in swamp-club with no local lifecycle (swamp-club#2168 today).
- swamp model @swamp/issue-lifecycle method run start issue-2168 --input issueNumber=2168 succeeds.
- method run triage issue-2168 --input type=security ... fails with: swamp-club rejected the status transition to triaged: HTTP 422 Cannot triage issue in status in_progress. Expected open.
Expected
Moving the primary issue should treat an upstream status already at or past the target as a no-op, as walkStatusTo does for linked issues. The same direct transitionStatus pattern is used for in_progress in approve and fast_forward and should get the same fix.
Impact
Blocks triage of swamp-club#2168. There is no backward status transition, so the issue cannot be reset to open to work around it.
Closed
No activity in this phase yet.
system commented 9/30/2026, 1:08:04 PM
Classified automatically when this issue was filed.
- Source: Extensions
If you feel this classification is incorrect, add a ripple to tell us so.
stack72 commented 10/2/2026, 12:17:06 AM
Closing as already fixed in swamp-extensions. Since #319 (2026-09-25), transitionStatus in extensions/models/_lib/swamp_club.ts treats a 422 as a no-op when a re-read shows the issue at or beyond the requested status (statusAtOrBeyond). That covers triage, approve and fast_forward on an issue already in_progress. The test 'transitionStatus: a 422 is a no-op when the issue is already further along' in swamp_club_test.ts covers this exact case and passes. The failure on swamp-club#2168 came from the swamp repo's vendored copy, which still does an exact status match; that lifecycle has since reached done.
Sign in to post a ripple.