Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions apps/vscode-e2e/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,13 @@ The `model` field can be added to either match when a test targets a specific mo
Use `streamingProfile: { ttft: <ms> }` on a fixture, not a flat `latency: <ms>`, when a test needs
to simulate a slow or hung provider (e.g. to cancel an in-flight request mid-stream). `ttft` delays
only the first SSE chunk, so the pending window is exactly the configured value. Flat `latency`
delays _every_ chunk, and aimock never observes client disconnects — after a test cancels the
request, a flat-latency stream keeps flushing chunks server-side for `chunks × latency` before
reaching the dead socket, which can interleave with the next test's request against the same mock
server. See `SUBTASK_API_HANG_RESPONSE_LATENCY_MS` in `fixtures/subtasks.ts` for an example,
including the bounded post-test drain the calling suite uses to wait out that window.
delays _every_ chunk. Before aimock 1.47.0, the mock did not observe client disconnects — after a
test cancelled the request, a flat-latency stream kept flushing chunks server-side for
`chunks × latency` before reaching the dead socket, which could interleave with the next test's
request against the same mock server. Version 1.47.0 stops the reply on disconnect, but the
suite keeps its drain wait until an e2e run shows it is not needed. See
`SUBTASK_API_HANG_RESPONSE_LATENCY_MS` in `fixtures/subtasks.ts` for an example, including the
bounded post-test drain the calling suite uses to wait out that window.

## 404 errors in logs are expected

Expand Down
2 changes: 1 addition & 1 deletion apps/vscode-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@roo-code/config-eslint": "workspace:^",
"@roo-code/config-typescript": "workspace:^",
"@roo-code/types": "workspace:^",
"@copilotkit/aimock": "1.35.0",
"@copilotkit/aimock": "1.47.0",
"@types/mocha": "10.0.10",
"@types/node": "catalog:",
"@types/vscode": "1.100.0",
Expand Down
9 changes: 5 additions & 4 deletions apps/vscode-e2e/src/suite/subtasks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ const waitForAimockRequestContaining = async (
// suite becomes flaky again on slow CI runners, widen this value first.
const SUBTASK_API_HANG_DRAIN_GRACE_MS = 500

// aimock does not observe client disconnects: after the API-hang child request is cancelled,
// the mock keeps the delayed stream pending server-side until the fixture's ttft has fully
// elapsed, then flushes the remaining chunks to the dead socket. A streamed request opened by
// the next test can interleave with that late flush, so wait out the remainder of the delayed
// aimock 1.47.0 stops and journals a reply when the client disconnects. Before that, the mock
// kept the delayed stream pending server-side until the fixture's ttft had fully elapsed, then
// flushed the remaining chunks to the dead socket. A streamed request opened by the next test
// could interleave with that late flush. This wait is a conservative guard kept until an e2e
// run shows it is not needed: wait out the remainder of the delayed
// window before the next test runs. The deadline is anchored to the journal timestamp of the
// request this test created (never earlier traffic), and bounded by one latency window plus
// grace, so it cannot hide a genuine hang.
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading