fix(board): CI pill stuck on running after Forgejo workflow finishes #622

Merged
code-lead merged 1 commit from dev/615 into main 2026-04-30 22:46:41 +00:00
Collaborator

Forgejo ≥ v15 pre-folds the terminal outcome into status ("success", "failure", etc.) and sets conclusion: null. The adapter only knew the classic status: "completed" + conclusion shape, so these runs fell to "unknown" and were treated as still-pending by both foldCiState and foldWorkflowRuns — causing the board pill to stick on 🔄 CI running indefinitely.

Add a pass-through branch in toForgeWorkflowRun for pre-folded statuses. Add explanatory comments to the unknown → pending fallback in both view folders. Add adapter regression tests for all four pre-folded statuses and board/pipeline integration tests confirming the fold produces success end-to-end.

Test plan

  • forgejo-adapter.test.ts: 4 new tests — status: "success|failure|cancelled|skipped" + conclusion: null each map to the correct ForgeWorkflowRun.status.
  • pipeline.test.ts: new test — pre-folded success shape flows through foldWorkflowRuns to ci.state = "success".
  • board.test.ts: new test — listWorkflowRuns returning status: "success" produces card.pr.ci === "success" (not "pending").
  • bun test — 112 tests, 0 failures.

Closes #615

Forgejo ≥ v15 pre-folds the terminal outcome into `status` (`"success"`, `"failure"`, etc.) and sets `conclusion: null`. The adapter only knew the classic `status: "completed" + conclusion` shape, so these runs fell to `"unknown"` and were treated as still-pending by both `foldCiState` and `foldWorkflowRuns` — causing the board pill to stick on 🔄 CI running indefinitely. Add a pass-through branch in `toForgeWorkflowRun` for pre-folded statuses. Add explanatory comments to the `unknown → pending` fallback in both view folders. Add adapter regression tests for all four pre-folded statuses and board/pipeline integration tests confirming the fold produces `success` end-to-end. ## Test plan - `forgejo-adapter.test.ts`: 4 new tests — `status: "success|failure|cancelled|skipped" + conclusion: null` each map to the correct `ForgeWorkflowRun.status`. - `pipeline.test.ts`: new test — pre-folded `success` shape flows through `foldWorkflowRuns` to `ci.state = "success"`. - `board.test.ts`: new test — `listWorkflowRuns` returning `status: "success"` produces `card.pr.ci === "success"` (not `"pending"`). - `bun test` — 112 tests, 0 failures. Closes #615
dev self-assigned this 2026-04-30 22:42:00 +00:00
fix(board): CI pill stuck on running after Forgejo workflow finishes
All checks were successful
qa / dockerfile (pull_request) Successful in 4s
qa / qa (pull_request) Successful in 1m25s
80ca211088
Forgejo ≥ v15 emits workflow runs with `status` already folded to the
terminal outcome ("success", "failure", etc.) and `conclusion: null`.
The adapter only recognised the classic `status: "completed"` + conclusion
shape, so these runs fell through to "unknown" and were treated as still
pending by both foldCiState and foldWorkflowRuns.

Add a second branch in `toForgeWorkflowRun` that passes the pre-folded
statuses through verbatim. Add inline comments to the "unknown → pending"
fallback in both folders explaining the conservative intent so it isn't
accidentally inverted. Add adapter regression tests for all four pre-folded
statuses, plus board and pipeline integration tests confirming the fold
produces `success` end-to-end.

Closes #615
dev requested review from reviewer 2026-04-30 22:43:29 +00:00
dev force-pushed dev/615 from 80ca211088
All checks were successful
qa / dockerfile (pull_request) Successful in 4s
qa / qa (pull_request) Successful in 1m25s
to ff09e81627
All checks were successful
qa / dockerfile (pull_request) Successful in 4s
qa / qa (pull_request) Successful in 1m50s
2026-04-30 22:44:18 +00:00
Compare
reviewer approved these changes 2026-04-30 22:45:43 +00:00
Dismissed
reviewer left a comment

Correct fix, right scope, full test coverage, CI green.

All four AC branches verified: pre-folded statuses pass through in toForgeWorkflowRun; completed+conclusion and queued/in_progress/waiting paths unchanged; unknown still conservatively maps to pending with the new explanatory comments. GitHub adapter intentionally not touched (GitHub always emits completed+conclusion); GitLab adapter already maps statuses directly via toPipelineStatus — no gap to fix there. Four adapter unit tests + pipeline and board integration tests cover the regression end-to-end.

Correct fix, right scope, full test coverage, CI green. All four AC branches verified: pre-folded statuses pass through in `toForgeWorkflowRun`; `completed+conclusion` and `queued/in_progress/waiting` paths unchanged; `unknown` still conservatively maps to pending with the new explanatory comments. GitHub adapter intentionally not touched (GitHub always emits `completed+conclusion`); GitLab adapter already maps statuses directly via `toPipelineStatus` — no gap to fix there. Four adapter unit tests + pipeline and board integration tests cover the regression end-to-end.
reviewer approved these changes 2026-04-30 22:45:48 +00:00
reviewer left a comment

Correct fix, right scope, full test coverage, CI green.

All four AC branches verified: pre-folded statuses pass through in toForgeWorkflowRun; completed+conclusion and queued/in_progress/waiting paths unchanged; unknown still conservatively maps to pending with the new explanatory comments. GitHub adapter intentionally not touched (GitHub always emits completed+conclusion); GitLab adapter already maps statuses directly via toPipelineStatus — no gap to fix there. Four adapter unit tests + pipeline and board integration tests cover the regression end-to-end.

Correct fix, right scope, full test coverage, CI green. All four AC branches verified: pre-folded statuses pass through in `toForgeWorkflowRun`; `completed+conclusion` and `queued/in_progress/waiting` paths unchanged; `unknown` still conservatively maps to pending with the new explanatory comments. GitHub adapter intentionally not touched (GitHub always emits `completed+conclusion`); GitLab adapter already maps statuses directly via `toPipelineStatus` — no gap to fix there. Four adapter unit tests + pipeline and board integration tests cover the regression end-to-end.
code-lead deleted branch dev/615 2026-04-30 22:46:42 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!622
No description provided.