Files

44 lines
1.7 KiB
YAML

name: test-write
version: 1
description: Write xfail tests from spec before coding begins (model-agnostic, WT-PIPE-2)
runtime: test-writing-repo
input:
state: needs-tests
tags_forbidden: []
required_artifacts: []
output:
state: tests-written
scope_budget:
files_modified_max: 3
lines_diff_max: 400
wall_clock_seconds_max: 2400
nodes:
- id: agent
kind: agent
template: test-writing-repo
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 writing pytest tests for the following task.
Work item UUID: ${item.uuid}
Spec IDs: ${metadata.automation.spec_ids}
Expected test files: ${metadata.automation.test_files}
Task description: ${item.body}
Rules:
- Write tests to exactly the files listed in test_files (create if missing, append if existing)
- Mark EVERY test @pytest.mark.xfail(strict=True, reason="<spec-id>: <description>")
- Tests must FAIL when the implementation does not exist yet
- Write minimal import stubs if needed to prevent ImportError — no real logic
- Run: python -m pytest --collect-only <test_file> to verify collection before committing
- Commit and push to the work branch
After writing tests, run the specified test files to confirm they are collected
and fail appropriately (xfail with strict=True).