fix: propagate config fields to all layers - #8876
Conversation
PR #8853 added apiProxy.routing (ModelRoutingConfig) to the JSON schema, docs/awf-config-spec.md, TypeScript types (config-file.ts, config-mapper.ts, api-proxy-routing-options.ts), and build-config.ts, but never wired the resulting modelRouting config value to an env var for the api-proxy sidecar. Added AWF_MODEL_ROUTING wiring in buildModelPolicyEnv alongside the existing AWF_MODEL_FALLBACK pattern, updated the spec's CLI mapping table entry, and added a regression test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new variable name conflicts with the existing AWF_ROUTING_CONFIG API-proxy contract.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Propagates task-level model routing configuration to the API-proxy environment.
Changes:
- Adds routing environment-variable serialization.
- Adds regression coverage.
- Documents the environment mapping.
| File | Description |
|---|---|
src/services/api-proxy-env-config.ts |
Adds routing environment wiring. |
src/services/api-proxy-env-config.test.ts |
Tests serialized routing configuration. |
docs/awf-config-spec.md |
Documents the environment mapping. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Updated configuration options for apiProxy to reflect new mappings and descriptions. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @github-actions[bot] Add the |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 3bc47b1 |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (2 files)
Coverage comparison generated by |
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ 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
- "example.com"See Network Configuration for more information.
|
|
✅ Build Test Suite completed successfully!
|
|
🚀 Security Guard has started processing this pull request |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed. 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
- "example.com"See Network Configuration for more information.
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 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
- "msfeed25.pkgs.visualstudio.com"See Network Configuration for more information.
|
|
✅ Smoke Claude passed 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
- "api.anthropic.com"See Network Configuration for more information.
|
Smoke Test: Cloud Hypervisor + Copilot
Result: ALL CHECKS PASSED 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
- "example.com"See Network Configuration for more information.
|
|
Smoke Test: Copilot Engine
PRs checked: #8878 fix(security): enforce TLS SNI allowlist, #8870 Add NVX Phase 3d direct launch executor Overall: PASS cc
|
Smoke Test: Copilot BYOK (Direct) ✅ PASS✅ GitHub MCP connectivity Running in direct BYOK mode via api-proxy → api.githubcopilot.com
|
|
EGRESS_RESULT allow=pass deny=pass
Overall status: PASS cc 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
- "example.com"See Network Configuration for more information.
|
📡 OTel Tracing Smoke Test Results
Overall: ✅ All scenarios pass or are expected-pending. No regressions detected in OTEL tracing integration.
|
Chroot Version Comparison Results
Overall: FAILED — Node.js version mismatch between host and chroot environments. The
|
Smoke Test: Services Connectivity
Overall: PASS
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS Notes:
|
Smoke Test: Claude Engine Validation
Overall result: PASS 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
- "api.anthropic.com"See Network Configuration for more information.
|
|
Merged PRs: 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
- "msfeed25.pkgs.visualstudio.com"See Network Configuration for more information.
|


Config Consistency Audit — Gap Found and Fixed
Audited merged PRs since the last audit run (first run, 7-day window: #8853, #8688, #8682, #8663, #8622).
Gap identified
feat(routing): add the routing configuration surface and contracts)apiProxy.routing(ModelRoutingConfig)docs/awf-config-spec.md,config-file.ts,config-mapper.ts,build-config.ts, andapi-proxy-routing-options.ts, but was never mapped to anAWF_*env var for the api-proxy sidecar (unlike its siblingapiProxy.modelFallback→AWF_MODEL_FALLBACK)AWF_MODEL_ROUTINGwiring inbuildModelPolicyEnv()(src/services/api-proxy-env-config.ts), updated the spec's CLI-mapping row forapiProxy.routingto referenceAWF_MODEL_ROUTING, and added a regression test inapi-proxy-env-config.test.ts.Other PRs reviewed — no gaps
EnclaveRuntimeenum consistently across schema (both copies), spec, types, and validators. No new top-level field requiring separate config-file/env wiring.src/awf-config-schema.jsonanddocs/awf-config.schema.jsonremain identical (diffclean).Verification checklist
npx tsc --noEmit— passessrc/config-file-mapping.test.ts— passessrc/config-file-validation.test.ts— passessrc/services/api-proxy-env-config.test.ts(incl. newAWF_MODEL_ROUTINGtest) — passessrc/awf-config-schema.jsonvsdocs/awf-config.schema.json— identicalState saved
config-audit-state.jsonupdated withlast_audit_dateandlast_pr_number: 8853for the next run.