internal/ai/analyzer_test.go has 11 Test* funcs and two small tables, so most cases are sequential. JSON extraction, markdown-fence stripping, and the degrade-to-plaintext path are a good table fit.
convert the sequential funcs into table-driven tests driven by t.Run(tc.name, ...). cover the boundaries: well-formed JSON, fenced json, a bare fence, malformed JSON (must degrade, not panic), and empty input. keep the current cases. heads-up that the ai package is in flux across #70/#85/#102, rebase after whichever lands.
mirror the two tables already here and internal/cli/trace_test.go. t.Parallel() is safe for the pure extraction cases.
internal/ai/analyzer_test.gohas 11Test*funcs and two small tables, so most cases are sequential. JSON extraction, markdown-fence stripping, and the degrade-to-plaintext path are a good table fit.convert the sequential funcs into table-driven tests driven by
t.Run(tc.name, ...). cover the boundaries: well-formed JSON, fencedjson, a barefence, malformed JSON (must degrade, not panic), and empty input. keep the current cases. heads-up that the ai package is in flux across #70/#85/#102, rebase after whichever lands.mirror the two tables already here and
internal/cli/trace_test.go.t.Parallel()is safe for the pure extraction cases.