Skip to content

Commit b2d2156

Browse files
committed
test: harden fan-out regression coverage
1 parent 17109ab commit b2d2156

8 files changed

Lines changed: 41 additions & 672 deletions

File tree

apps/vscode-e2e/src/fixtures/search-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function addSearchFilesResultFixtures(mock: InstanceType<typeof LLMock>)
8989
toolName: "search_files",
9090
arguments: '{"path":"search-files-tool-fixture","regex":"nonExistentPattern12345"}',
9191
toolCallId: "call_search_files_no_match_001",
92-
expected: ["No results found"],
92+
expected: ["Found 0 results."],
9393
result: "No matches were found for `nonExistentPattern12345` in the search fixture directory.",
9494
id: "call_search_files_no_match_002",
9595
},

apps/vscode-e2e/src/fixtures/terminal-reuse-shell-race.ts

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@ import { toolResultContains } from "./tool-result"
44

55
export function addTerminalReuseShellRaceFixtures(mock: InstanceType<typeof LLMock>) {
66
// First command completes — model issues a second command on the same terminal.
7-
// With the temp-script fix, both commands now deliver real output.
87
mock.addFixture({
98
match: {
10-
predicate: (req) => toolResultContains(req, "call_terminal_reuse_001", ["first", "Exit code: 0"]),
9+
predicate: (req) => {
10+
const messages = Array.isArray(req?.messages) ? req.messages : []
11+
const lastToolMsg = messages.filter((message) => message?.role === "tool").at(-1)
12+
13+
return (
14+
lastToolMsg?.tool_call_id === "call_terminal_reuse_001" &&
15+
toolResultContains(req, "call_terminal_reuse_001", [
16+
"Command was submitted in the VS Code terminal",
17+
])
18+
)
19+
},
1120
},
1221
response: {
1322
toolCalls: [
@@ -25,7 +34,17 @@ export function addTerminalReuseShellRaceFixtures(mock: InstanceType<typeof LLMo
2534
// Second command on the reused terminal also completes.
2635
mock.addFixture({
2736
match: {
28-
predicate: (req) => toolResultContains(req, "call_terminal_reuse_002", ["second", "Exit code: 0"]),
37+
predicate: (req) => {
38+
const messages = Array.isArray(req?.messages) ? req.messages : []
39+
const lastToolMsg = messages.filter((message) => message?.role === "tool").at(-1)
40+
41+
return (
42+
lastToolMsg?.tool_call_id === "call_terminal_reuse_002" &&
43+
toolResultContains(req, "call_terminal_reuse_002", [
44+
"Command was submitted in the VS Code terminal",
45+
])
46+
)
47+
},
2948
},
3049
response: {
3150
toolCalls: [

apps/vscode-e2e/src/suite/subtasks.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,19 @@ suite("Roo Code Subtasks", function () {
216216
assert.ok(stack.includes(parentTaskId), "Fan-out parent should remain in the live task stack")
217217
assert.ok(stack.includes(childTaskId!), "Fan-out child should remain in the live task stack")
218218
assert.strictEqual(stack.at(-1), childTaskId, "Child should remain the focused task while parent runs")
219+
220+
const parentHistory = await api.getTaskHistoryItem(parentTaskId)
221+
assert.strictEqual(parentHistory?.status, "delegated", "Fan-out parent history should stay delegated")
222+
assert.strictEqual(
223+
parentHistory?.awaitingChildId,
224+
childTaskId,
225+
"Fan-out parent history should point at the running child",
226+
)
227+
assert.strictEqual(
228+
parentHistory?.delegatedToId,
229+
childTaskId,
230+
"Fan-out parent history should record the delegated child",
231+
)
219232
} finally {
220233
api.off(RooCodeEventName.Message, messageHandler)
221234
while (api.getCurrentTaskStack().length > 0) {

docs/formal/task-delegation/README.md

Lines changed: 0 additions & 84 deletions
This file was deleted.

docs/formal/task-delegation/TaskDelegation.cfg

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/formal/task-delegation/TaskDelegation.tla

Lines changed: 0 additions & 208 deletions
This file was deleted.

0 commit comments

Comments
 (0)