fix(task-board): resolve the conflict auto-resolve gate from the board's own lanes - #6873
Merged
Merged
Conversation
pedrofrxncx
added a commit
that referenced
this pull request
Sep 2, 2026
…es to the activity log (#6878) Three status_changed entries in run-reactions.ts hardcoded "in_progress", "todo", and "in_review" instead of reading the board's own lanes — the same class of bug fixed in #6849/#6862/#6873 for the sweep/conflict paths. On an org-owned board (org_board_columns), a card's real progress/queue/review column can have a different name, so the timeline would show a from/to that doesn't match what was actually written to the card's status.
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 bug class as #6849 and #6854 ("advanceToReviewIfInProgress" and the failed-run reaction both hardcoded a Studio lane literal instead of reading the org board's own column), found in the conflict auto-resolve path this time.
TASK_BOARD_ITEM_PRS_GET's conflict auto-resolve trigger compareditem.status === "in_review", andreactToApprovedPrConflict's own entry gate compareditem.status !== "in_review"— both against the literal Studio uses, even thoughreactToApprovedPrConflictalready fetchesboardLanes(ctx, orgId)a few lines later and useslanes.review/lanes.progresseverywhere else in the same function. On an org-owned board (org_board_columns) whose In Review column is named anything else, both comparisons never match: an approved PR that develops a merge conflict with its base branch is never auto-handed back to the Super Agent to resolve — it just sits there, silently, forever.Fix: hoist the
boardLanesfetch in both files and compare againstlanes.reviewinstead of the literal. Inconflict-reaction.tsthe guard is also pulled out into a small pureisConflictResolutionCandidatehelper, matching the file's existing "Pure — unit-tested" pattern, so the org-lane case is covered without a database.No behavior change for Studio's own board:
STUDIO_LANES.reviewis still the literal"in_review", solanes.reviewresolves to the same value there.To confirm:
bun test apps/api/src/tools/task-board/conflict-reaction.test.ts(9 pass, including the new org-lane cases), pluscd apps/api && bunx tsc --noEmitandbunx oxlinton the three changed files, all clean locally. Full CI validates the rest.Summary by cubic
Fixes the conflict auto-resolve gate so it checks the board's own In Review column instead of Studio's hardcoded
"in_review"literal. On org-owned boards with a renamed In Review column, approved PRs with merge conflicts were never auto-handed back to the Super Agent; they now are.conflict-reaction.tsinto a pureisConflictResolutionCandidatehelper, unit-tested for the org-lane case."in_review".Written for commit 8a757e0. Summary will update on new commits.