Repository navigation
ci: run the Copilot CLI on a routed selection in model-routing smoke - #9249
Conversation
Co-authored-by: Copilot App <[email protected]> Copilot-Session: f9549be0-1ad6-4e3e-b641-b2f5f0485b1b
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused workflow change is consistent with existing routing coverage and passed the referenced live validation.
Review effort: Balanced
Findings: None
What changed in this PR
Adds live smoke coverage proving the real gh-aw-pinned Copilot CLI can consume AWF’s routed model, effort, and endpoint selection.
Changes:
- Installs Copilot CLI 1.0.89.
- Reads routing data from
/reflectand configures the CLI accordingly. - Verifies routed execution returns
ROUTED_OK.
| File | Description |
|---|---|
.github/workflows/test-model-routing.yml |
Adds routed Copilot CLI installation and execution smoke steps. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 92.71% | 92.71% | ➡️ +0.00% |
| Statements | 91.22% | 91.22% | ➡️ +0.00% |
| Functions | 89.30% | 89.30% | ➡️ +0.00% |
| Branches | 84.29% | 84.28% | 📉 -0.01% |
📁 Per-file Coverage Changes (2 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/one-shot-adapter.ts |
83.5% → 82.9% (-0.60%) | 80.3% → 79.8% (-0.56%) |
src/log-directory-setup.ts |
96.2% → 100.0% (+3.78%) | 96.3% → 100.0% (+3.71%) |
Coverage comparison generated by scripts/ci/compare-coverage.ts
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...
|
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "clients2.google.com"See Network Configuration for more information.
|
|
❌ Smoke Claude failed
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
Smoke Cloud Hypervisor reports failed. Cloud Hypervisor + Copilot failed.
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
✅ Build Test Suite completed successfully!
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...
|
|
🚀 Security Guard has started processing this pull request |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
Smoke Copilot — PASS
|
|
Smoke services: ✅ Redis PONG, ✅ pg_isready accepting connections, ✅ SELECT 1 = 1. PASS
|
|
OTEL smoke test (re-verified locally)
|
|
EGRESS_RESULT allow=pass deny=pass
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
🏗️ Build Test Suite Results
Overall: 6/8 ecosystems passed — FAIL Failures
The
|
Smoke Test: Cloud Hypervisor + Copilot
Note: checks 2 and 4 were blocked at the tool-permission layer before any network request was attempted, so firewall behavior itself was not exercised for these two checks.
|
Smoke Test: Copilot BYOK (Direct) Mode ✅
Status: PASS — Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy sidecar
|
Chroot Version Comparison
Result: Not all tests passed (Node.js version mismatch), so the
|
Refs #9238, covering step 4 (the AWF half). This runs the real Copilot CLI, pinned to 1.0.89 to match gh-aw's
DefaultCopilotVersion, as the agent on a routed selection. That is the shape of a gh-aw Copilot engine step, so it shows what gh-aw has to do before end-to-end routing can work.What's added
Install the Copilot CLI used by gh-aw:
npm install -g @github/[email protected].Run the Copilot CLI agent on the routed selection: allows
claude-haiku-4.5andgpt-5.4-mini. Inside AWF it:/reflect;COPILOT_PROVIDER_WIRE_APIfrom the routed endpoint;copilot --model <wire_model> [--reasoning-effort <effort>] --prompt …;ROUTED_OK.AWF exits 0 only if every request the CLI made matched the selection. Any stray model, effort or endpoint produces exit 78.
What this found
On the first run, the Copilot CLI was rejected with exit 78 (
model_routing_mismatch; the CLI reportedAuthentication failed with provider … (HTTP 403)).The cause is that AWF sets
COPILOT_PROVIDER_WIRE_API=responsesfromCOPILOT_MODELat launch (copilot-credential-env.ts), before the router has chosen. Under routing there is no fixedCOPILOT_MODEL, so the wire API is never set. The CLI then sentgpt-5.4-mini+ effort to/chat/completions, and enforcement rejected it (/responsesis required when an effort is present).Once the wire API is set from the routed endpoint, the Copilot CLI complies fully:
So a gh-aw engine step under routing must take model, effort and wire API from
/reflect, not from its compile-timeCOPILOT_MODEL. Separately, gh-aw's compiler currently only validates theexperimental.modelRoutinggate (TestValidateAWFConfigJSON_ModelRoutingGate). It doesn't yet emitapiProxy.routingor write a routing conversation file. Both are tracked in #9238.Validation
main-only guard temporarily removed and the native-provider job disabled to avoid spend: run 36669199288. The Copilot job passed, including the new step.main.