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 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.