Agent host: no mock-LLM integration test runs in CI for a provider that Positron ships

Open
#17,693 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript
Domain
backend, testing

Research direction

Start with src/vs/platform/agentHost/test/node/providerIntegration/ and inspect the existing Codex harness and copilotMockLlm.integrationTest.ts; then check how startRealServer({ mockLlm: true }) and the Linux ext-host integration lane are configured. Port the two idle-release cases to Claude or Codex and make them run in CI. Done means a CI test releases an idle session and resumes it without data loss.

Written by the indexing model from the issue text.

Description

area: assistant testing

Follow-up to #17689.

Problem

#17337 removed Copilot Chat, and the agent host no longer registers CopilotAgent. #17689 then skipped the four provider integration suites that authenticate to that agent:

  • Agent Host Provider Integration — Copilot Customizations
  • Agent Host Provider Integration — Copilot image generation
  • Agent Host Provider Integration — Copilot with Mock LLM
  • Agent Host Provider Integration — Copilot Idle Release

After that change, no test in CI starts a real agent host server with a mock LLM and sends a turn through a provider that Positron ships.

  • The Codex suites of this type (codexCustomizations, codexPermissions, codexSandbox) exist, but they show as pending in CI. Each test skips itself unless the platform is macOS and CODEX_SDK_ROOT is set. The ext-host lane runs on Linux.
  • There is no Claude suite of this type in src/vs/platform/agentHost/test/node/providerIntegration/.
What still has coverage

The agent host service logic has unit tests that run. For idle release, these are the idle release ... tests in agentService.test.ts and the idle-release cases in codexPrewarmEviction.test.ts.

The missing coverage is the path through a real server: release an idle session, then resume it without data loss.

Proposal

Get one mock-LLM integration test to run in CI for the Claude agent or the Codex agent. Use idle release as the first case, because the Claude and Codex agents still use it.

  1. Select the provider. Codex already has a harness, but its tests run only on macOS with CODEX_SDK_ROOT. Claude has no harness in this folder.
  2. Make the test run on the Linux ext-host lane, or find out why the Codex condition cannot be removed.
  3. Port the two Copilot Idle Release tests from copilotMockLlm.integrationTest.ts to that provider.
Notes
  • Test type: Core Mocha node.js integration test (*.integrationTest.ts) that uses startRealServer({ mockLlm: true }).
  • These tests run in the "node.js integration tests" step of scripts/test-integration.sh. The ext-host lane runs that step on merge runs only. The PR lane runs scripts/test-integration-pr.sh, which does not include it.
Dominant language
TypeScript
Stars
4.4k
Forks
207
Avg merge
1d 16h
Merged PRs (30d)
308

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/positron

All issues in posit-dev/positron

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.