Commit Graph
1 Commits
Author SHA1 Message Date
JD Davis 91af73fc04 test(copilot): validate authenticated Windows CLI and VS Code E2E (#3311)
## Summary

- add a credential-safe live Copilot E2E driver for source builds
- cover official Copilot CLI baseline, subscription wrapping, VS Code
proxy routing, documented GPT-5.5/5.6 models, settings restoration, and
the installed VS Code extension via `code chat`
- fix a Windows shutdown race that could orphan a detached dedicated
proxy
- document current Windows auth behavior and GitHub's canonical response
model IDs

## Live Windows validation

Environment:
- Headroom `0.37.0-dev` built from `27b4e2d1` with `uv sync --extra
proxy --extra dev`
- GitHub Copilot CLI `1.0.81`
- VS Code stable `1.133.0`
- dedicated Headroom Copilot OAuth device authorization

Command:

```powershell
uv run --no-sync python e2e/copilot_live.py --vscode-extension `
  --model gpt-5-mini --model gpt-5.5 `
  --model gpt-5.6-luna --model gpt-5.6-sol --model gpt-5.6-terra
```

Result:

```text
PASS: Copilot baseline, CLI wrap, VS Code routing, model preservation, restore, and installed VS Code extension
```

The installed VS Code extension generated traffic through Headroom after
`code chat -m ask`; metrics showed requests and no failures. Real VS
Code settings were restored and no proxy listener remained.

## Findings

- Headroom's dedicated device-auth flow works on Windows.
- Copilot CLI 1.0.81 has a valid native login but does not expose the
legacy Credential Manager target Headroom currently probes; users should
run `headroom copilot-auth login`.
- GitHub may canonicalize a requested alias in response metadata (for
example `gpt-5.5` to `gpt-5.5-2026-04-23`).
- Before the cleanup fix, Ctrl+C could race `/health` and leave the
detached Windows proxy listening as `unidentified`.

## Verification

- 225 focused Copilot/wrapper tests passed
- Ruff check and format passed
- mypy and repository pre-commit hooks passed
- staged and committed-range gitleaks scans found no leaks
- no credential values, device codes, fingerprints, local auth paths, or
account identifiers are included
2026-08-27 12:26:22 -07:00