Skip to content

fix: propagate config fields to all layers - #8876

Merged
lpcox merged 4 commits into
mainfrom
fix/config-audit-model-routing-env-wiring-5b0acc627cd41f8d
Sep 22, 2026
Merged

lpcox merged 4 commits into
mainfrom
fix/config-audit-model-routing-env-wiring-5b0acc627cd41f8d

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

PR Field Layer missing Fix
#8853 (feat(routing): add the routing configuration surface and contracts) apiProxy.routing (ModelRoutingConfig) Env var wiring — the field reached JSON Schema, docs/awf-config-spec.md, config-file.ts, config-mapper.ts, build-config.ts, and api-proxy-routing-options.ts, but was never mapped to an AWF_* env var for the api-proxy sidecar (unlike its sibling apiProxy.modelFallbackAWF_MODEL_FALLBACK) Added AWF_MODEL_ROUTING wiring in buildModelPolicyEnv() (src/services/api-proxy-env-config.ts), updated the spec's CLI-mapping row for apiProxy.routing to reference AWF_MODEL_ROUTING, and added a regression test in api-proxy-env-config.test.ts.

Other PRs reviewed — no gaps

Verification checklist

  • npx tsc --noEmit — passes
  • src/config-file-mapping.test.ts — passes
  • src/config-file-validation.test.ts — passes
  • src/services/api-proxy-env-config.test.ts (incl. new AWF_MODEL_ROUTING test) — passes
  • src/awf-config-schema.json vs docs/awf-config.schema.json — identical

State saved

config-audit-state.json updated with last_audit_date and last_pr_number: 8853 for the next run.

Generated by Config Consistency Auditor · copilot · auto · 85.2 AIC · ⊞ 9.2K ·

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>
@lpcox
lpcox marked this pull request as ready for review September 22, 2026 11:37
Copilot AI balanced review requested due to automatic review settings September 22, 2026 11:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

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.

Comment thread src/services/api-proxy-env-config.test.ts Outdated
Comment thread src/services/api-proxy-env-config.ts Outdated
Comment thread docs/awf-config-spec.md Outdated
lpcox and others added 2 commits September 22, 2026 07:20
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>
@github-actions

Copy link
Copy Markdown
Contributor Author

✅ Copilot review passed with no inline comments.

@github-actions[bot] Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-8876 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit 3bc47b1

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 92.13% 92.13% ➡️ +0.00%
Statements 90.67% 90.67% ➡️ +0.00%
Functions 90.19% 90.19% ➡️ +0.00%
Branches 84.09% 84.09% ➡️ +0.00%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/nvx/one-shot-adapter.ts 81.0% → 80.4% (-0.61%) 78.2% → 77.7% (-0.57%)
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

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Build Test Suite completed successfully!

Generated by Build Test Suite for #8876

@github-actions

Copy link
Copy Markdown
Contributor Author

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Gemini reports failed. Facets need polishing...

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • msfeed25.pkgs.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "msfeed25.pkgs.visualstudio.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Claude passed

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.anthropic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by Smoke Claude for #8876

@github-actions

Copy link
Copy Markdown
Contributor Author

Smoke Test: Cloud Hypervisor + Copilot

  1. GitHub MCP list_pull_requests: PASS (call succeeded, returned PR data)
  2. curl https://github.com: PASS (200)
  3. Write/read temp file: PASS (smoke-cloud-hypervisor-35743392523.txt written and read back)
  4. curl (example.com/redacted) (should be blocked): PASS (000)

Result: ALL CHECKS PASSED

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor Author

Smoke Test: Copilot Engine

  • ✅ GitHub MCP connectivity (PRs fetched)
  • ✅ github.com connectivity (HTTP 200)
  • ✅ File write/read test

PRs checked: #8878 fix(security): enforce TLS SNI allowlist, #8870 Add NVX Phase 3d direct launch executor

Overall: PASS

cc @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor Author

Smoke Test: Copilot BYOK (Direct) ✅ PASS

✅ GitHub MCP connectivity
✅ github.com HTTP 200
✅ File write/read test
✅ BYOK inference path working

Running in direct BYOK mode via api-proxy → api.githubcopilot.com

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@lpcox
lpcox enabled auto-merge (squash) September 22, 2026 15:01
@github-actions

Copy link
Copy Markdown
Contributor Author

EGRESS_RESULT allow=pass deny=pass

  • ✅ Allowed domain (api.github.com): HTTP 403 returned (reachable via proxy, curl exit 0)
  • ✅ Blocked domain (example.com): connection blocked (CONNECT tunnel failed, 403)

Overall status: PASS

cc @lpcox

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

📡 OTel Tracing Smoke Test Results

Scenario Result
1. Module Loading otel.js loads; isEnabled()=true; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled, _parseEndpoints, _parseOtlpHeaders, _buildResourceSpans, ...
2. Test Suite ✅ 68/68 tests passed across 3 suites (otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js)
3. Env Var Forwarding env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID to agent; api-proxy-env-config.ts forwards GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, and trace context to api-proxy
4. Token Tracker Integration onUsage callback present in token-tracker-http.js (OTEL hook point)
5. OTEL Diagnostics ⚪ No api-proxy/otel.jsonl span file — expected, this run's bash-only test scenario didn't route LLM calls through the api-proxy sidecar

Overall: ✅ All scenarios pass or are expected-pending. No regressions detected in OTEL tracing integration.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor Author

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.14 Python 3.12.14 ✅ YES
Node.js v24.21.0 v22.23.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: FAILED — Node.js version mismatch between host and chroot environments. The smoke-chroot label was not added since not all tests passed.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor Author

Smoke Test: Services Connectivity

  • Redis PING: ✅ PONG
  • PostgreSQL pg_isready: ✅ accepting connections
  • PostgreSQL SELECT 1: ✅ 1

Overall: PASS

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor Author

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A (run OK) ✅ PASS
.NET json-parse N/A (run OK) ✅ PASS
Go color ok ✅ PASS
Go env ok ✅ PASS
Go uuid ok ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx passed ✅ PASS
Node.js execa passed ✅ PASS
Node.js p-limit passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Notes:

  • All repositories cloned successfully.
  • Java required overriding the local Maven repo path (-Dmaven.repo.local=/tmp/gh-aw/agent/m2repo) because the default ~/.m2/repository directory was not writable in this environment (unrelated to the Squid proxy config, which worked correctly per the JAVA_TOOL_OPTIONS proxy settings picked up by Maven).
  • All other ecosystems built/installed and ran tests without any firewall/proxy-related issues.

Generated by Build Test Suite for #8876 · copilot · auto · 37.3 AIC · ⊞ 11.8K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor Author

Smoke Test: Claude Engine Validation

Check Result
API status ✅ PASS
gh check ✅ PASS
File status ✅ PASS

Overall result: PASS

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.anthropic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by Smoke Claude for #8876 · claude · haiku45 · 55.9 AIC · ⊞ 4.7K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor Author

Merged PRs: fix(security): enforce TLS SNI allowlist; Add NVX Phase 3d direct launch executor
GitHub MCP: ✅
PR detail lookup: ✅
Playwright title check: ❌
File write: ✅
Bash cat verify: ✅
Latest discussion + oracle comment: ✅
npm ci && npm run build: ✅
Overall: FAIL

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • msfeed25.pkgs.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "msfeed25.pkgs.visualstudio.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@lpcox
lpcox merged commit e3155ba into main Sep 22, 2026
150 of 153 checks passed
@lpcox
lpcox deleted the fix/config-audit-model-routing-env-wiring-5b0acc627cd41f8d branch September 22, 2026 15:09

This branch was successfully deployed

1 active deployment
aoai-model 1ab2a224 Deployed Sep 22, 2026 by lpcox via conclusion #1734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants