From b493651c265d2ae347f4d5f2b82ab5ae4b4e484a Mon Sep 17 00:00:00 2001 From: Mathias Bergqvist Date: Sun, 19 Apr 2026 07:42:24 +0200 Subject: [PATCH] fix(test): update executor test fixture to match --output-format json envelope Co-Authored-By: Claude Sonnet 4.6 --- internal/exec/executor_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/exec/executor_test.go b/internal/exec/executor_test.go index ee6cf2c..0b9a25e 100644 --- a/internal/exec/executor_test.go +++ b/internal/exec/executor_test.go @@ -28,8 +28,10 @@ func fakeClaudePath(t *testing.T, output string, exitCode int) string { } func TestExecutorParsesValidResult(t *testing.T) { - validJSON := `{"status":"pass","phase":"red","skill":"tdd","file_path":"/tmp/x_test.go","runner_output":"FAIL","verified":true,"model_used":"self","message":"ok"}` - claude := fakeClaudePath(t, validJSON, 0) + // Fake claude emits the --output-format json envelope that the real CLI produces. + // The executor extracts the result from the "structured_output" field. + envelope := `{"type":"result","subtype":"success","is_error":false,"structured_output":{"status":"pass","phase":"red","skill":"tdd","file_path":"/tmp/x_test.go","runner_output":"FAIL","verified":true,"model_used":"self","message":"ok"}}` + claude := fakeClaudePath(t, envelope, 0) ex := iexec.New(iexec.Config{ ClaudeBinary: claude,