From fc27ffe1704ccb0ca9028117e80dcf7b3ae7c61c Mon Sep 17 00:00:00 2001 From: Paul O'Reilly Date: Fri, 31 Jul 2026 10:40:34 +1200 Subject: [PATCH] fix(workflows): airouter-impl-ready prompt was producing empty task descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ${metadata.automation.test_files} and ${metadata.automation.spec_ids} are absent from M39 work items (created from dashboard without these fields), resulting in an empty, useless prompt: "Implement the failing test. Test files: . Spec IDs: ." Switch to ${metadata.task_description} — a sibling metadata key (not under automation, so write-protected path does not apply) — populated by patching items with their body text. The _TriggerItemView in dispatch_service.py correctly exposes item.metadata so this resolves at compile time. All 16 scaffolded M39 items patched with metadata.task_description via CP API. --- task-templates/workflow/airouter-impl-ready@1.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/task-templates/workflow/airouter-impl-ready@1.yaml b/task-templates/workflow/airouter-impl-ready@1.yaml index b2f6271..cf15c79 100644 --- a/task-templates/workflow/airouter-impl-ready@1.yaml +++ b/task-templates/workflow/airouter-impl-ready@1.yaml @@ -24,7 +24,18 @@ nodes: AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git" AGENT_BRANCH: "task/${item.uuid}" labels: [airouter] - prompt: "Implement the failing test. Test files: ${metadata.automation.test_files}. Spec IDs: ${metadata.automation.spec_ids}." + prompt: | + You are implementing source code for the following task. + + ## Task Description + ${metadata.task_description} + + ## Instructions + 1. Read the task description carefully — it specifies the file(s) to create/modify and the exact requirements. + 2. Find the test file mentioned in the description and run it to see current state: `python -m pytest -v --tb=short` + 3. Implement the required source code until all tests pass. + 4. Do NOT modify any test files — they are read-only. + 5. Run the tests one final time to confirm they are green before finishing. escalation: fixture_broken: fix-test-fixture-sonnet contract_ambiguous: review-spec-opus