fix(task-board): stop hardcoding 'in_progress' in the failed-run reaction - #6854
Merged
pedrofrxncx merged 1 commit intoSep 2, 2026
Merged
Conversation
…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
deleted the
fix/failed-run-reaction-hardcoded-progress-lane-w1
branch
September 2, 2026 12:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
reactToFailedTaskRunalready receives this org's resolved board lanes as a parameter (lanes: BoardLanes), and the storage calls it makes —scheduleRunRetry(..., lanes.progress)andreturnToTodoAfterFailure(..., lanes)— are correctly lane-aware. But the guard right above them still compareditem.status !== "in_progress"against the hardcoded literal instead oflanes.progress.Failure scenario: on Studio's own board
lanes.progress === "in_progress", so this happened to work by coincidence. On an org-owned board (theorg_board_columnsfeature, #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.progressinstead of the literal, matching every other lane check in this same function.Regression test: added a case in
run-reactions.test.tswith a customprogress: "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.tsChecks run locally:
bun run fmt,bunx tsc --noEmitinapps/api(clean),bunx oxlinton both changed files (0 warnings/errors), and the targeted test file (21/21 pass). Full CI validates the rest.Summary by cubic
Fixes
reactToFailedTaskRunso failed runs are retried or sent back to To Do even when an org's progress column isn't namedin_progress. Previously the guard compared against the hardcoded literal, so onorg_board_columnsboards a failed run's card silently sat in progress forever.Bug Fixes
"in_progress"literal withlanes.progressin the retry/return-to-todo gate."col-doing") to cover org-owned boards.Written for commit 70ccffa. Summary will update on new commits.