Split config-assembly validator tests by concern group#5348
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the config-assembly validator unit tests to improve navigability by splitting a large, multi-concern test file into smaller, concern-focused suites while centralizing shared setup/mocks in a reusable test harness.
Changes:
- Split
src/commands/validators/config-assembly.test.tsinto multiple focused test files grouped by validation concern (docker host, host access, API proxy, model detection, and general flags). - Extracted shared mocks, fixtures, and helpers into
config-assembly.test-utils.tsto reduce duplication across the new suites. - Removed the original monolithic
config-assembly.test.ts.
Show a summary per file
| File | Description |
|---|---|
| src/commands/validators/config-assembly.test.ts | Removed the previous monolithic test suite. |
| src/commands/validators/config-assembly.test-utils.ts | Added shared test harness (mocks, temp-dir lifecycle, helper builders) used across the split suites. |
| src/commands/validators/config-assembly-docker-host.test.ts | Contains docker host / path-prefix / chroot-related validation tests. |
| src/commands/validators/config-assembly-host-access.test.ts | Contains host access + host port perimeter validation/warning tests. |
| src/commands/validators/config-assembly-api-proxy.test.ts | Contains API-proxy and rate-limit validation tests. |
| src/commands/validators/config-assembly-model-detection.test.ts | Contains env/env-file COPILOT_MODEL detection and model validation tests. |
| src/commands/validators/config-assembly-flags.test.ts | Contains general flag validation and happy-path assembly tests. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/7 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
✅ Smoke Gemini completed. All facets verified. 💎 Smoke test completed with partial failures. Results reported to PR #5348. |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed... |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Claude passed |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
✅ Build Test Suite completed successfully! |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
🔌 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 ✅✅ MCP connectivity verified Running in direct BYOK mode via
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
🔐 Smoke Test: Copilot PAT Auth — PASS
Overall: PASS | Auth mode: PAT (COPILOT_GITHUB_TOKEN) cc
|
🔬 Smoke Test Results — PASS
PR: Split config-assembly validator tests by concern group Overall: PASS
|
🔭 Smoke Test: API Proxy OpenTelemetry Tracing
All 5 scenarios passed.
|
|
Smoke test report
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.
|
Gemini Engine Smoke Test Results
Overall status: FAIL 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.
|
Chroot Version Comparison Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot environments.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL —
|
|
|
src/commands/validators/config-assembly.test.tshad grown into a single 900+ line test file covering unrelated validation paths. This change separates the coverage by concern so security-sensitive and model-detection cases are easier to navigate and target independently.Test file split
describeblocks into focused files:config-assembly-docker-host.test.tsconfig-assembly-host-access.test.tsconfig-assembly-api-proxy.test.tsconfig-assembly-model-detection.test.tsconfig-assembly-flags.test.tsconfig-assembly.test.tsShared test harness
assembleAndValidateConfighelpers intoconfig-assembly.test-utils.tsConcern-oriented coverage layout
COPILOT_MODELenv-file detection into its own file