The #60 max_turns/tools fix stopped the build-node crash but exposed the next gap: with tools enabled the agentic builder reads files and its final text is NARRATION (observed live: candidate_diff = 'Let me read the key source files to get exact signatures bef…'), not a unified diff. That non-diff dispatched to CI, could not be applied, and the task parked at verify. - builders.py: default_diff_builder now extracts the unified diff from the response via _extract_unified_diff — prefers a fenced ```diff block, else slices from the first 'diff --git' header, dropping surrounding prose. A reply with NO diff header raises BuildError so narration fails closed (the node fails the task with a clear reason) instead of dispatching a bogus diff. - builders.py: _render_build_prompt now instructs the model that its FINAL message must be ONLY the unified diff in a single ```diff fenced block, no narration before/after. - tests: extract from fenced/bare diff with narration; reject narration-only (BuildError); default_diff_builder returns the clean diff from a narrated response and raises on a prose-only reply. Full suite 1503 passed; ruff clean. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| build_verify_subgraph.py | ||
| builders.py | ||
| builders_llm.py | ||
| clarifier.py | ||
| clarifier_llm.py | ||
| dispatch_invoker.py | ||
| fixer.py | ||
| handbook.py | ||
| planner.py | ||
| review_loop.py | ||
| review_loop_llm.py | ||
| verifier.py | ||
| verifier_llm.py | ||