Add direct-impl-sonnet@1, plan-review-loop@1, spec-review-loop@1, test-write-review-loop@1 — present in agent-runtimes but missing here. These are needed before agent-runtimes drops its baked-in copies and the CP loads workflow templates exclusively from this CRS repo.
69 lines
2.6 KiB
YAML
69 lines
2.6 KiB
YAML
name: test-write-review-loop
|
|
version: 1
|
|
description: >
|
|
MiniMax writes tests from skeletons, Sonnet reviews AND judges in one node
|
|
(writes its own verdict file — no separate judge node), loop until clean.
|
|
runtime: code-sonnet-tdd-repo
|
|
input:
|
|
state: needs-tests
|
|
tags_required: [test-needed]
|
|
required_artifacts: [test_file]
|
|
output:
|
|
state: test-write-pending
|
|
scope_budget:
|
|
wall_clock_seconds_max: 7200 # must be >= iterations_max * per_iteration_seconds_max
|
|
# (5 * 1200 = 6000) plus slack
|
|
iterations_max: 5
|
|
per_iteration_seconds_max: 1200
|
|
nodes:
|
|
- id: write-minimax
|
|
kind: agent
|
|
role: test-write-review # M36 v0.6 (bug 69370eda fix): role + model replaces
|
|
# the ungrounded `template: minimax-test-writer`
|
|
# (a composite that never existed in the catalog).
|
|
model: minimax-m2
|
|
runtime_env:
|
|
# WF-COMP-15: stage agents share one per-item work branch so their work
|
|
# accumulates across iterations.
|
|
AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git"
|
|
AGENT_BRANCH: "task/${item.uuid}"
|
|
- id: review-sonnet
|
|
kind: agent
|
|
role: test-write-review
|
|
tier: coding
|
|
depends_on: [write-minimax]
|
|
runtime_env:
|
|
AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git"
|
|
AGENT_BRANCH: "task/${item.uuid}"
|
|
prompt: |
|
|
The agent-runtimes project repo is cloned at /workspace/project.
|
|
Change to that directory before doing any work.
|
|
|
|
Review the tests just written for the following task.
|
|
|
|
**Title**: ${artifacts.item_title}
|
|
|
|
Steps:
|
|
1. cd /workspace/project
|
|
2. Review the newly-written test file(s) against the task's spec
|
|
requirements and the test skeleton they were written from:
|
|
- Do the tests actually exercise the required behaviour, not just
|
|
call the code?
|
|
- Are edge cases and failure modes covered?
|
|
- Are assertions specific (not just "no exception raised")?
|
|
- Do the tests pass against the current implementation?
|
|
3. If the tests are inadequate, fix them directly on this branch —
|
|
you are both reviewer and judge for this loop
|
|
4. Write exactly CLEAN or NEEDS_REWORK (nothing else, no trailing
|
|
punctuation or explanation) to /workspace/.workflow/verdict
|
|
- id: review-gate
|
|
kind: script
|
|
cmd: scripts/workflow/verdict-gate
|
|
depends_on: [review-sonnet]
|
|
loop:
|
|
body: [write-minimax, review-sonnet, review-gate]
|
|
condition_node: review-gate
|
|
on_max_reached: escalate
|
|
escalation:
|
|
loop_max_reached: fix-test-fixture-sonnet
|