fix(task-board): a repo-backed task reaches In Review only with a PR - #5989
Merged
Conversation
A repo-backed task advanced to In Review on thread-finish even when no PR was opened — dead-ending it In Review with nothing to review (the CMS submit path opens the PR later). Now the thread-finish backstop advances a repo-backed task only once a PR is linked; the agent's PR-open hook still moves it mid-run, and non-repo tasks advance on finish unchanged. - `shouldAdvanceToReview` gains a `hasPr` arg; a `repo`-named item stays In Progress on finish unless a PR is linked. - Both callers (thread-finish hook + stall sweep) compute `hasPr` via `listPrs`, querying only for repo-backed items. Tests: unit for the gate; real-Postgres that a repo task holds In Progress with no PR, then advances once a PR is linked. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pedrofrxncx
approved these changes
Aug 12, 2026
decocms Bot
pushed a commit
that referenced
this pull request
Aug 12, 2026
PR: #5989 fix(task-board): a repo-backed task reaches In Review only with a PR Bump type: patch - decocms (apps/api/package.json): 4.205.2 -> 4.205.3 - @decocms/native (apps/native/package.json): 4.205.2 -> 4.205.3 Deploy-Scope: server
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.
Follow-up to #5970, which shipped the
repotask property but intentionally kept the plain thread-finish backstop (its refactor commit dropped the gate). That leaves a repo-backed task dead-ending In Review with no PR: it finished but opened no PR, so there's nothing to review.The rule
A repo-backed task reaches In Review only when a PR exists:
Changes
shouldAdvanceToReviewgains ahasPrarg; arepo-named item stays In Progress on finish unless a PR is linked. Pure, unit-tested.advanceLinkedTasksToReviewOnThreadFinish) and the stall sweep (recoverStalledTasks) — computehasPrvialistPrs, querying only for repo-backed items (non-repo path stays query-free).Testing
tscclean (apps/api); 37 unit tests pass; lint clean.🤖 Generated with Claude Code
Summary by cubic
Prevents repo-backed tasks from entering In Review without a PR. Previously, thread-finish could advance a repo-backed task to In Review with no PR; now it stays In Progress until a PR is linked. Non-repo tasks are unchanged, and the agent’s PR-open hook still moves tasks mid-run.
shouldAdvanceToReviewnow acceptshasPr; repo-backed tasks require a linked PR to advance on finish.advanceLinkedTasksToReviewOnThreadFinishandrecoverStalledTaskscomputehasPrvialistPrsonly for repo-backed tasks (no added queries for non-repo).Written for commit 2eafa41. Summary will update on new commits.