Skip to content

Commit 49695c7

Browse files
sahrizviclaude
andcommitted
fix(test): correct S27 sql_analyze assertion (CI unblock for #867)
The test asserted `schema_inspect` IS in the output, contradicting its own name. The production code at sql-analyze.ts:56-58 flips `isRealFailure` to true when the dispatcher result includes an `error` field, which suppresses the progressive-disclosure suggestion. Test name described correct behaviour; assertion did not. Flipping to `not.toContain` matches both the implementation and the test name. Pre-existing fail on main (verified on v0.8.0 release CI run 26734399443) — unrelated to the trace corruption fix but blocking #867's CI. Landing the fix in this PR for the unblock. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 8a602f9 commit 49695c7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/opencode/test/session/real-tool-simulation.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,10 @@ describe("REAL EXEC: sql_analyze tool", () => {
298298

299299
const result = await execSqlAnalyze("SELCT * FORM users")
300300
expect(result.output).toContain("Parse error")
301-
// Still gets suggestion on first call since it didn't throw
302-
expect(result.output).toContain("schema_inspect")
301+
// A `result.error` value flips `isRealFailure` to true in sql-analyze.ts,
302+
// which suppresses the progressive-disclosure suggestion. So no
303+
// `schema_inspect` follow-up should appear — matching the test name.
304+
expect(result.output).not.toContain("schema_inspect")
303305
})
304306

305307
test("S28: sql_analyze throws — returns error, no suggestion", async () => {

0 commit comments

Comments
 (0)