You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(workflows): repo-bound task without workflow_ref → coding/new-task-v1, not default/agent-v1 (#594)
* fix(workflows): repo-bound task w/o workflow_ref → coding/new-task-v1, not default/agent-v1
#296 (workflow-driven tasks) replaced the task_type→workflow mapping with a
resolution ladder, but left the repo-aware rung ('Phase 4') unwired. Every
task with no explicit workflow_ref — all Slack tasks and all #247
orchestration children (neither sets one) — fell through to the platform
default default/agent-v1: the freeform, repo-less agent prompt with NO
git/PR discipline. The agent then improvised (gh api / gh pr create against
an empty local clone), so ensure_pr found no commits and recorded
pr_url=null, screenshot→Linear routing lost its branch signal, and #247 A4
stacking broke (children couldn't fetch the unpushed predecessor branch).
Re-wire the missing rung minimally: resolveWorkflowRef takes hasRepo; an
absent ref with a repo present resolves to coding/new-task-v1 (the
disciplined coding workflow — edit locally, commit, push, platform opens
the PR via ensure_pr), matching pre-#296 behaviour. Repo-less tasks still
default to default/agent-v1. An explicit workflow_ref always wins. The
single create-task-core call site passes Boolean(body.repo), so both Slack
and orchestration (which create via createTaskCore with repo set) inherit
the fix. Upstream regression — worth an upstream issue too.
Updated workflows + create-task-core tests; the old test asserting
default/agent-v1 for a repo task encoded the regression.
(cherry picked from commit 99b5a17)
(cherry picked from commit 9d8b25d)
* refactor: pin coding workflow at channel call sites, not the resolver default
Rework per review (#594): follow the merged #547 precedent instead of changing
the shared resolver default. A repo-bound channel task must run the disciplined
coding workflow (clone → commit → push → platform opens the PR), not the
repo-less default/agent-v1 that records pr_url=null — but that "repo task ⇒
coding workflow" decision now lives explicitly at each channel's createTaskCore
call site rather than as an implicit resolver-level inference.
Addresses the review point-by-point:
- B3(a): revert resolveWorkflowRef to its single-arg form (no hasRepo); pin
workflow_ref: CODING_WORKFLOW_ID in the Linear and Slack processors, mirroring
the Jira processor (#546/#547). One visible decision per channel, uniform
across all three. (No #247-child path exists on main.)
- B2: moot — no resolver behaviour change, so WORKFLOWS.md / API_CONTRACT.md /
USER_GUIDE.md all stay accurate. No doc edits, no mirror regen needed.
- N1: moot — the hasRepo param is gone, so the "forgot hasRepo" footgun can't exist.
- N2: promote the 'coding/new-task-v1' literal to CODING_WORKFLOW_ID next to
DEFAULT_WORKFLOW_ID, with a module-load invariant asserting both ids exist in
DESCRIPTORS (a descriptor rename now fails at import, not as a runtime
TypeError). Jira's literal switched to the constant too — uniform.
- N3: moot — the stale "last rung" JSDoc was in the reverted resolver block.
- §6 test gap: create-task-core caller tests now assert the real behaviour
(omitted ref → default/agent-v1, with AND without a repo — the symmetric
repo-less case that was missing). Channel processor tests (Linear/Slack/Jira)
assert each pins workflow_ref: 'coding/new-task-v1'.
Full cdk build green (compile + jest + eslint + synth).
0 commit comments