Problem
The pipeline ends one hop short of its artifact. On a fully successful Workload (coder GO → gate GATE-PASS → reviewer GO → phase Completed), the result is a pushed foreman/<workload>/issue-<n> branch — and nothing else. No PR is opened, nothing links the branch to the issue, and no human is notified. Grepping the agent, operator, and docs: there is no PR-creation code anywhere.
Observed in production: first fully-green Workload completed (code GO → verify GATE-PASS → review GO), operator watched the dashboard expecting a PR, and the reviewed branch sat unopened on the remote until a human found it.
Proposed fix
On Workload completion (all tasks terminal, review verdict GO), open a PR:
- Where: the agent already holds the GitHub token it pushed with — one
POST /repos/{repo}/pulls after the review task GOes (or an operator-side finalizer step, which centralizes it and survives agent restarts).
- Content: head = the workload branch, base = repo default branch, title from the coder's commit subject, body
Fixes #<issue> + a summary of gate/review verdicts (the review transcript ref is already in the task result).
- Config:
openPullRequest: true|false on the Workload spec (default true when issues is set), so callers that want branch-only behavior keep it.
- Idempotency: skip if a PR with the same head already exists (re-runs after LLMKube#934 force-push should update, not duplicate).
A review verdict of request-changes should arguably still open a draft PR carrying the review feedback — that's where a human (or a follow-up fix task) picks it up.
Related: #934 (branch push idempotency across re-runs).
Problem
The pipeline ends one hop short of its artifact. On a fully successful Workload (coder GO → gate GATE-PASS → reviewer GO → phase
Completed), the result is a pushedforeman/<workload>/issue-<n>branch — and nothing else. No PR is opened, nothing links the branch to the issue, and no human is notified. Grepping the agent, operator, and docs: there is no PR-creation code anywhere.Observed in production: first fully-green Workload completed (
code GO → verify GATE-PASS → review GO), operator watched the dashboard expecting a PR, and the reviewed branch sat unopened on the remote until a human found it.Proposed fix
On Workload completion (all tasks terminal, review verdict GO), open a PR:
POST /repos/{repo}/pullsafter the review task GOes (or an operator-side finalizer step, which centralizes it and survives agent restarts).Fixes #<issue>+ a summary of gate/review verdicts (the review transcript ref is already in the task result).openPullRequest: true|falseon the Workload spec (default true whenissuesis set), so callers that want branch-only behavior keep it.A review verdict of request-changes should arguably still open a draft PR carrying the review feedback — that's where a human (or a follow-up fix task) picks it up.
Related: #934 (branch push idempotency across re-runs).