Skip to content

fix(task-board): stop hardcoding 'in_progress' in the failed-run reaction - #6854

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/failed-run-reaction-hardcoded-progress-lane-w1
Sep 2, 2026
Merged

fix(task-board): stop hardcoding 'in_progress' in the failed-run reaction#6854
pedrofrxncx merged 1 commit into
mainfrom
fix/failed-run-reaction-hardcoded-progress-lane-w1

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Same class of bug as #6849 (advanceToReviewIfInProgress hardcoded in_progress/in_review) — found while hunting the same file's neighborhood (run-reactions.ts sits right next to pr-open-board-reaction.ts, the board-column-vocab gap this tick's focus area points at).

Bug: reactToFailedTaskRun already receives this org's resolved board lanes as a parameter (lanes: BoardLanes), and the storage calls it makes — scheduleRunRetry(..., lanes.progress) and returnToTodoAfterFailure(..., lanes) — are correctly lane-aware. But the guard right above them still compared item.status !== "in_progress" against the hardcoded literal instead of lanes.progress.

Failure scenario: on Studio's own board lanes.progress === "in_progress", so this happened to work by coincidence. On an org-owned board (the org_board_columns feature, #6319/#6725/#6739/#6849), the in-progress column is named whatever the org named it — never the literal "in_progress". The guard then never matches, so a failed run's card is silently never retried and never sent back to To Do on retry exhaustion: it just sits in progress forever with no failure reaction, and the person never sees why.

Fix: compare against lanes.progress instead of the literal, matching every other lane check in this same function.

Regression test: added a case in run-reactions.test.ts with a custom progress: "col-doing" lane, asserting the retry still fires — this reproduces the bug (fails on the old code, passes after the fix).

To verify: bun test apps/api/src/tools/task-board/run-reactions.test.ts

Checks run locally: bun run fmt, bunx tsc --noEmit in apps/api (clean), bunx oxlint on both changed files (0 warnings/errors), and the targeted test file (21/21 pass). Full CI validates the rest.


Summary by cubic

Fixes reactToFailedTaskRun so failed runs are retried or sent back to To Do even when an org's progress column isn't named in_progress. Previously the guard compared against the hardcoded literal, so on org_board_columns boards a failed run's card silently sat in progress forever.

Bug Fixes

  • Replaced the hardcoded "in_progress" literal with lanes.progress in the retry/return-to-todo gate.
  • Added a regression test with a custom progress lane name ("col-doing") to cover org-owned boards.

Written for commit 70ccffa. Summary will update on new commits.

Review in cubic

…tion

reactToFailedTaskRun already takes this org's board lanes as a parameter,
but its retry/return-to-todo gate still compared item.status against the
literal string "in_progress" instead of lanes.progress. On an org-owned
board (org_board_columns) whose in-progress column is named anything else,
this comparison never matches, so a failed run's card is silently never
retried and never sent back to To Do — it just sits in progress forever
with no failure reaction.

Same class of bug as #6849 (advanceToReviewIfInProgress hardcoded
in_progress/in_review).
@pedrofrxncx
pedrofrxncx merged commit 6b184c1 into main Sep 2, 2026
33 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/failed-run-reaction-hardcoded-progress-lane-w1 branch September 2, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant