test: split config-file tests by config lifecycle phase#3699
Conversation
There was a problem hiding this comment.
Pull request overview
This PR restructures the previously large src/config-file.test.ts suite into four smaller, phase-aligned test files to make config lifecycle coverage easier to navigate, without changing production behavior or test assertions.
Changes:
- Split validation tests into
src/config-file-validation.test.ts. - Split loading/parsing tests into
src/config-file-loading.test.ts. - Split mapping and CLI precedence tests into
src/config-file-mapping.test.tsandsrc/config-file-precedence.test.ts, and removed the old monolithic test file.
Show a summary per file
| File | Description |
|---|---|
| src/config-file.test.ts | Removes the monolithic config-file test suite in favor of phase-focused test files. |
| src/config-file-validation.test.ts | Houses validateAwfFileConfig tests (schema/type/unsupported key validation and edge cases). |
| src/config-file-loading.test.ts | Houses loadAwfFileConfig tests (JSON/YAML/stdin parsing and validation error surfacing). |
| src/config-file-mapping.test.ts | Houses mapAwfFileConfigToCliOptions tests (config-to-CLI transformation expectations). |
| src/config-file-precedence.test.ts | Houses applyConfigOptionsInPlaceWithCliPrecedence tests (CLI-over-file precedence behavior). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 0
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Smoke Test Results ✅
Overall: ✅ PASS
|
Smoke Test: Copilot BYOK (Offline) ModeStatus: PARTIAL PASS
Note: Running in BYOK offline mode ( PR Context: Author
|
Smoke Test Results✅ GitHub MCP — PR #3689: fix(api-proxy): generalize deprecated header stripping Overall: FAIL
|
|
Smoke Test Codex: FAIL 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.
|
Service Connectivity Test Results❌ Redis: Connection timeout (no response from host.docker.internal:6379) Overall Result: FAIL Services running on host are not reachable from AWF sandbox via
|
Chroot Version Comparison Test ResultsThis test verifies that runtime versions inside the chrooted agent container match the host environment.
Overall Result: ❌ FAILED The chroot environment does not have matching versions for all runtimes. This indicates that the agent container is not perfectly mirroring the host environment, which may affect reproducibility and compatibility.
|
🏗️ Build Test Suite ResultsAll build tests completed successfully across 8 ecosystems!
Overall: 8/8 ecosystems passed — ✅ PASS All projects successfully cloned, built/installed dependencies, and passed their tests. The AWF firewall correctly handled network access for all tested language ecosystems.
|
Smoke Test Results\n\n- GitHub MCP: ❌\n- Connectivity: ❌\n- File Writing: ✅\n- Bash Tool: ✅\n\nFAILWarning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
src/config-file.test.tshad grown into a single 783-line suite covering multiple lifecycle phases, making phase-specific coverage harder to navigate. This change reorganizes those tests into phase-aligned files without changing assertions or production behavior.Validation phase
validateAwfFileConfigcoverage tosrc/config-file-validation.test.ts.Loading phase
loadAwfFileConfigcoverage tosrc/config-file-loading.test.ts.Mapping phase
mapAwfFileConfigToCliOptionscoverage tosrc/config-file-mapping.test.ts.Precedence phase
applyConfigOptionsInPlaceWithCliPrecedencecoverage tosrc/config-file-precedence.test.ts.Repository change shape
src/config-file.test.ts.