feat(task-board): repo as a task property + repo-backed review gate - #5970
Merged
Conversation
Task board items can name the repo (site) they pertain to, and repo-backed tasks advance to In Review only via the PR-open hook — not on thread-finish. - `task_board_items` gains nullable `repo_owner`/`repo_name` (migration 170); threaded through storage, create/update tools, schemas, and the shared entity type. - Repo selector in the task dialog's Properties (pick from the org's repo-scoped GitHub connections). - `shouldAdvanceToReview`: a repoOwner-named task waits for its PR — a finished edit may have opened none, and In Review with no PR is the wrong state. Agent-run tasks keep the thread-finish backstop. Tests: unit for the advance gate; real-Postgres for the repo round-trip and the repo-named no-advance-on-finish. Note: tool-io.ts hand-patched (contract generator degraded in this env) — re-run generate:tool-contracts in a full env to confirm. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
hasFieldUpdate omitted repoOwner/repoName, so an update touching only the repo skipped storage.update() entirely and re-read the stale row. The create/update round-trip integration test caught it (storage-integration CI). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`repo_owner`/`repo_name` become a single nullable `repo` holding `owner/name`.
The value is only ever written whole (from a repo-scoped connection's scope),
and two independently-updatable nullable columns let a partial update leave a
half-named repo behind — `{ repoName: "x" }` wrote a row with a name and no
owner, which the review gate then read as "not repo-backed".
Also drops the gate change. Keying `shouldAdvanceToReview` on the repo field
made a user-editable dropdown silently disable a card's lifecycle: the picker
is on every task, so selecting a repo on an agent-run card stopped both the
thread-finish hook AND the stall sweeper (`stall-recovery.ts` gates on the
same function) from ever advancing it — a completed run whose PR detection
missed would sit In Progress forever, which is the mirror of the dead-end the
backstop exists to prevent. The repo ships as metadata for the task-based flow
to read; whatever gates that flow's review should key on the flow, not on a
property anyone can set.
And removes the stray `taskBasedFlow` org flag from the hand-patched
`tool-io.ts` — that flag exists nowhere else on this branch (it leaked from
the task-based-flow PR) and regeneration would strip it.
pedrofrxncx
enabled auto-merge (squash)
August 12, 2026 16:29
decocms Bot
pushed a commit
that referenced
this pull request
Aug 12, 2026
PR: #5970 feat(task-board): repo as a task property + repo-backed review gate Bump type: minor - decocms (apps/api/package.json): 4.204.29 -> 4.205.0 - @decocms/native (apps/native/package.json): 4.204.29 -> 4.205.0 - @decocms/shared (packages/shared/package.json): 0.32.1 -> 0.33.0 Deploy-Scope: both
guitavano
added a commit
that referenced
this pull request
Aug 12, 2026
Sync after #5970 merged (repo-as-task-property + selector). Reconciled to main's convention: - Task's repo scope is a single `repo` column ("owner/name"), not the repoOwner/repoName pair — adopted main's version everywhere, incl. the task pill (filter + create now use the `owner/name` slug). - Kept #5938's `linkPr` on TASK_BOARD_ITEM_UPDATE (CMS submit-for-review) — its repoOwner/repoName is the PR's identity (task_board_item_prs), untouched by the `repo` change. - Dropped the orphaned shouldAdvanceToReview repo-gate tests: main's merge of #5970 did NOT include the review-gate change, so #5938 no longer carries it (see PR note — needs a decision). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Small, standalone slice split out of #5938 (task-based flow) so it can merge on its own — no feature flag, no UI mode.
Summary
task_board_itemsgains nullablerepo_owner/repo_name(migration 170), threaded through storage, the create/update tools, schemas, and the shared entity type. A repo selector in the task dialog's Properties lets you pick from the org's repo-scoped GitHub connections.shouldAdvanceToReview: arepoOwner-named task advances to In Review only via the PR-open hook, never on thread-finish — a finished edit may have opened no PR, and In Review with no PR is the wrong state. Agent-run tasks keep the thread-finish backstop (their run opens the PR, so finishing means there is one to review).Testing
bun run fmtclean;tscclean inapps/api,apps/web,packages/shared; lint clean on touched files. 57 unit tests pass.Notes
packages/shared/src/tools/tool-io.tswas hand-patched (the contract generator is degraded in this dev env). Re-runbun run --cwd=apps/api generate:tool-contractsin a full env to confirm.🤖 Generated with Claude Code
Summary by cubic
Adds a nullable repository field to tasks and a Repository picker in the task dialog. It stores
owner/namein a singlerepocolumn and does not change review gating (the thread‑finish backstop remains;repohas no effect on advancement).repothrough storage,TASK_BOARD_ITEM_CREATE/TASK_BOARD_ITEM_UPDATE, schemas, andpackages/sharedtypes; repo‑only updates now persist.Migration
170-task-board-item-repo.bun run --cwd=apps/api generate:tool-contracts.Written for commit 22e451d. Summary will update on new commits.