Skip to content

fix(task-board): resolve the conflict auto-resolve gate from the board's own lanes - #6873

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/conflict-resolve-org-lane-w4
Sep 2, 2026
Merged

fix(task-board): resolve the conflict auto-resolve gate from the board's own lanes#6873
pedrofrxncx merged 1 commit into
mainfrom
fix/conflict-resolve-org-lane-w4

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

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 compared item.status === "in_review", and reactToApprovedPrConflict's own entry gate compared item.status !== "in_review" — both against the literal Studio uses, even though reactToApprovedPrConflict already fetches boardLanes(ctx, orgId) a few lines later and uses lanes.review/lanes.progress everywhere 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 boardLanes fetch in both files and compare against lanes.review instead of the literal. In conflict-reaction.ts the guard is also pulled out into a small pure isConflictResolutionCandidate helper, 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.review is still the literal "in_review", so lanes.review resolves 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), plus cd apps/api && bunx tsc --noEmit and bunx oxlint on 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.

  • Extracts the entry gate in conflict-reaction.ts into a pure isConflictResolutionCandidate helper, unit-tested for the org-lane case.
  • No behavior change for Studio's own board, where the review lane still resolves to "in_review".

Written for commit 8a757e0. Summary will update on new commits.

Review in cubic

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.
@pedrofrxncx
pedrofrxncx merged commit 43aa7aa into main Sep 2, 2026
33 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/conflict-resolve-org-lane-w4 branch September 2, 2026 19:36
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