refactor: deduplicate BYOK COPILOT_MODEL test scaffolding#5661
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors config-assembly-model-detection.test.ts to reduce duplicated BYOK COPILOT_MODEL test scaffolding by extracting a shared helper for the common arrange/act/assert sequence, while keeping each test’s unique setup (direct config vs env file) local to the test case.
Changes:
- Extracted a local
expectByokModelAllowed(buildConfigOverrides)helper to consolidate repeated BYOK configuration + assertions. - Updated the two BYOK
COPILOT_MODELtests to delegate common logic to the helper, differing only in howcopilotProviderBaseUrlis provided (direct override vs env file).
Show a summary per file
| File | Description |
|---|---|
| src/commands/validators/config-assembly-model-detection.test.ts | Deduplicates BYOK COPILOT_MODEL test setup via a shared helper while preserving test-specific setup paths. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Low
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
🚀 Security Guard has started processing this pull request |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
✅ Smoke Gemini completed. All facets verified. 💎 |
|
✅ Smoke Claude passed |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
✅ Contribution Check completed successfully! Contribution check complete: PR #5661 follows the applicable CONTRIBUTING.md guidelines; no comment needed. |
|
✅ Build Test Suite completed successfully! |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 Smoke test summary comment and label applied; no further action needed |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🔌 Smoke Services — All services reachable! ✅ |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
✅ Smoke Test: Copilot BYOK (Direct) Mode - PASS All tests verified:
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy sidecar.
|
🔬 Smoke Test Results
Overall: FAIL PR: refactor: deduplicate BYOK COPILOT_MODEL test scaffolding
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
🧪 Smoke Test Results
Overall: PASS (verifiable tests passed)
|
Smoke Test: API Proxy OpenTelemetry Tracing
All scenarios pass. OTEL tracing integration is functional.
|
Chroot Version Comparison Results
Overall: ❌ Not all versions match — Python and Node.js versions differ between host and chroot environments.
|
|
refactor: deduplicate BYOK COPILOT_MODEL test scaffolding by Copilot Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test Results: Gemini Engine
PRs Reviewed:
Overall Status: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
|
Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra Overall: FAIL
|
|
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Two BYOK
COPILOT_MODELtests inconfig-assembly-model-detection.test.tsduplicated the full arrange/act/assert scaffold — differing only in whethercopilotProviderBaseUrlcame from direct config or an env file.Changes
expectByokModelAllowed(buildConfigOverrides)helper inside thedescribeblock, following the existingrunCopilotModelDetectionCasepattern already present in the file