Skip to content

Commit 65ca8dd

Browse files
stephentoubCopilot
andcommitted
Fix Node.js Windows CI test failure
Split dependent SQL tool calls into separate CAPI turns in the session_fs_sqlite snapshot. The CREATE TABLE and INSERT were previously returned as separate choices in a single response, causing the CLI on Windows to execute them concurrently. Since INSERT depends on CREATE TABLE completing first, this produced a 'no such table: items' error. The fix restructures the snapshot into 3 CAPI turns: first executing report_intent + CREATE TABLE, then INSERT, then the final response. This ensures CREATE TABLE always completes before INSERT is attempted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0ef4ce9 commit 65ca8dd

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

test/snapshots/session_fs_sqlite/should_route_sql_queries_through_the_sessionfs_sqlite_handler.yaml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,11 @@ conversations:
1616
function:
1717
name: report_intent
1818
arguments: '{"intent":"Creating database table"}'
19-
- role: assistant
20-
tool_calls:
2119
- id: toolcall_1
2220
type: function
2321
function:
2422
name: sql
2523
arguments: '{"description":"Create items table","query":"CREATE TABLE items (id TEXT PRIMARY KEY, name TEXT)"}'
26-
- role: assistant
27-
tool_calls:
28-
- id: toolcall_2
29-
type: function
30-
function:
31-
name: sql
32-
arguments: "{\"description\":\"Insert Widget row\",\"query\":\"INSERT INTO items (id, name) VALUES ('a1', 'Widget')\"}"
3324
- messages:
3425
- role: system
3526
content: ${system}
@@ -49,17 +40,19 @@ conversations:
4940
function:
5041
name: sql
5142
arguments: '{"description":"Create items table","query":"CREATE TABLE items (id TEXT PRIMARY KEY, name TEXT)"}'
52-
- id: toolcall_2
53-
type: function
54-
function:
55-
name: sql
56-
arguments: "{\"description\":\"Insert Widget row\",\"query\":\"INSERT INTO items (id, name) VALUES ('a1', 'Widget')\"}"
5743
- role: tool
5844
tool_call_id: toolcall_0
5945
content: Intent logged
6046
- role: tool
6147
tool_call_id: toolcall_1
6248
content: Schema operation completed successfully.
49+
- role: assistant
50+
tool_calls:
51+
- id: toolcall_2
52+
type: function
53+
function:
54+
name: sql
55+
arguments: "{\"description\":\"Insert Widget row\",\"query\":\"INSERT INTO items (id, name) VALUES ('a1', 'Widget')\"}"
6356
- role: tool
6457
tool_call_id: toolcall_2
6558
content: "1 row(s) inserted. Last inserted row ID: 1."

0 commit comments

Comments
 (0)