Files

47 lines
1.9 KiB
YAML

name: integration
version: 1
description: Cherry-pick coding output from agent fork to main and verify test suite (WT-PIPE-5)
runtime: integration-direct
input:
state: impl-green
tags_forbidden: []
required_artifacts: []
output:
state: integrated
scope_budget:
files_modified_max: 20
lines_diff_max: 2000
wall_clock_seconds_max: 3600
nodes:
- id: agent
kind: agent
template: integration-direct
runtime_env:
# WF-COMP-15: stage agents share one per-item work branch so their work
# accumulates (test-write -> scaffold -> impl -> integrate -> merge all
# see the same tree). Without AGENT_REPO_URL the agent-repo layer never
# clones and the agent's output evaporates (E2E 2026-07-04).
AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git"
AGENT_BRANCH: "task/${item.uuid}"
prompt: |
You are the integration gate for this work item.
Work item UUID: ${item.uuid}
Work item title: ${item.title}
Spec IDs: ${metadata.automation.spec_ids}
Test files: ${metadata.automation.test_files}
Coding agent branch: ${metadata.automation.last_coder_branch}
Agent fork: git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git
Task:
1. Fetch and cherry-pick commits from the coding agent's branch (see integration context)
2. Run: python -m pytest ${metadata.automation.test_files} -x -v
3. If green: git push origin main, then exit 0
4. If red or conflict: write failure reason to ci_metadata.json and exit non-zero
Branch discovery: if last_coder_branch is empty, list agent fork branches
and find the one most recently working on this item (UUID in commit message or
branch name matches known patterns for this project's task IDs).
NEVER push if tests are red. Better to fail here than to break main.