[Improve] Add deterministic xAI provider e2e coverage#149
Conversation
|
2 checks still pending after the review wait. See task
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
aa2085a to
39fb2c6
Compare
|
Fixed on the PR branch in 94f5535. Latest shipped changes:
Validation:
Browser proof was not applicable because the shipped diff is mocked e2e coverage plus contributor guidance, not rendered UI. |
edelauna
left a comment
There was a problem hiding this comment.
wanted to increase e2e provider coverage, noticed a small bug in the response stream, also highlighted an issue with zAI test harness state management.
9dd2fff to
1edbebe
Compare
|
I validated a narrow fix locally for the failing Root cause: Patch I validated locally: requests: requests.filter(
(request) =>
request.probeTag === probeTag ||
(request.model === modelId && request.functionCallOutputIds.length > 0),
),Validation run in a disposable PR worktree:
Results:
So this looks like the right fix for the CI failure rather than just masking the assertion. |
94f5535 to
55bef60
Compare
Related GitHub Issue
Not currently linked in GitHub.
Description
This PR adds deterministic mocked VS Code e2e coverage for the xAI Responses API provider and lands the follow-up fixes that were required to make that coverage trustworthy in CI.
The main implementation changes are:
POST https://api.x.ai/v1/responsesand verifies theread_file -> attempt_completiontool-use loop plus the expected request shape forgrok-4.20apps/vscode-e2e/fixtures/xai.jsonfixture filecall_id-only delta does not incorrectly suppress the laterresponse.output_item.doneevent that carries the first usable tool nameReviewer focus:
apps/vscode-e2e/src/suite/providers/xai.test.tsresponses-api-stream.tsfix is still grounded in the current xAI provider path, which is the only caller of that helper todayTest Procedure
I validated the current branch with:
pnpm --filter @roo-code/vscode-e2e test:run -- --file xai.testpnpm --filter @roo-code/vscode-e2e test:ci:mockpnpm --dir apps/web-roo-code testcurl -I http://127.0.0.1:3000Pre-Submission Checklist
Screenshots / Videos
Not applicable. This PR changes mocked e2e coverage, stream-processing logic, and contributor guidance, but it does not ship a rendered UI change.
Documentation Updates
Contributor-facing e2e guidance was updated in
apps/vscode-e2e/AGENTS.mdfor xAI recording/replay and hermetic fetch-interceptor suites.Additional Notes
The latest CI failure on this PR was not a broad provider outage. It was an order-dependent xAI test-harness bug where delayed
grok-4.20follow-up requests could leak into later fast-model assertions. The fix here narrows the captured requests to the current probe instead of accepting every follow-up call globally.I do not have a live xAI API key in this sandbox, so the provider grounding in this PR remains based on the checked-in xAI handler/test shape plus xAI’s current docs rather than a fresh live capture from this task.
Get in Touch
Discord username not provided in this task context.