Repository navigation
ci: enable model router for failure-prone and high-burn workflows - #11918
Conversation
Set `model: router` on 12 Copilot workflows selected for high failure rates (engine timeouts) or high AI-credit burn, recompile on gh-aw v1.3.1, and update CI tests for router output. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
Mandatory routing changes model overrides and model/effort selection across security and maintenance workflows, requiring broader review of router availability, execution budgets, and task-quality tradeoffs.
No open issues 🎉
What changed in this PR
Enables explicit model routing for 12 failure-prone or high-credit-use Copilot workflows in AWF’s repository automation. This replaces auto for four workflows migrated in #10854 while preserving existing turn limits.
Changes:
- Sets
model: routerand updates compiled workflows to enable routing unconditionally. - Adds routing configuration, model reporting, and diagnostic artifacts where needed.
- Updates regression checks for routing, image-version consistency, install-script controls, and token exclusion.
| File | Description |
|---|---|
scripts/ci/workflow-engine-install-security.test.ts |
Recognizes environment-based install-script suppression. |
scripts/ci/test-coverage-reporter-workflow.test.ts |
Checks compiled author-file metadata. |
scripts/ci/smoke-enclave-workflow.test.ts |
Strengthens GH_TOKEN exclusion checks. |
scripts/ci/security-guard-workflow.test.ts |
Expects routing while preserving security checks and turn limits. |
scripts/ci/refactoring-scanner-workflow.test.ts |
Validates per-image tags against the installed AWF version. |
scripts/ci/pelis-agent-factory-advisor-workflow.test.ts |
Checks routing and the four-turn budget. |
scripts/ci/duplicate-code-detector-workflow.test.ts |
Changes the expected model selector to router. |
scripts/ci/copilot-auto-model-workflows.test.ts |
Adds routing assertions for all 12 workflows. |
.github/workflows/security-review.md |
Enables explicit routing. |
.github/workflows/security-review.lock.yml |
Makes routing configuration and reporting unconditional. |
.github/workflows/security-guard.md |
Replaces auto with router. |
.github/workflows/refactoring-scanner.md |
Enables explicit routing. |
.github/workflows/refactoring-scanner.lock.yml |
Makes routing unconditional and retains per-image pins. |
.github/workflows/pelis-agent-factory-advisor.md |
Replaces auto with router. |
.github/workflows/issue-duplication-detector.md |
Enables explicit routing. |
.github/workflows/issue-duplication-detector.lock.yml |
Removes conditional routing selection. |
.github/workflows/duplicate-code-detector.md |
Replaces auto with router. |
.github/workflows/duplicate-code-detector.lock.yml |
Adds router setup, model reporting, and diagnostic artifacts. |
.github/workflows/dependency-security-monitor.md |
Enables explicit routing. |
.github/workflows/dependency-security-monitor.lock.yml |
Makes routing configuration and reporting unconditional. |
.github/workflows/copilot-token-usage-analyzer.md |
Replaces auto with router. |
.github/workflows/copilot-token-optimizer.md |
Enables explicit routing. |
.github/workflows/copilot-token-optimizer.lock.yml |
Removes conditional routing selection. |
.github/workflows/config-consistency-auditor.md |
Enables explicit routing. |
.github/workflows/config-consistency-auditor.lock.yml |
Makes routing configuration and reporting unconditional. |
.github/workflows/claude-token-optimizer.md |
Enables routing for its Copilot engine. |
.github/workflows/claude-token-optimizer.lock.yml |
Removes conditional routing selection. |
.github/workflows/auth-doctor-updater.md |
Enables explicit routing. |
.github/workflows/auth-doctor-updater.lock.yml |
Makes routing unconditional and retains per-image pins. |
Review effort: Balanced (adaptive)
…est' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
The job failed because |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request... |
|
🚀 Security Guard has started processing this pull request |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Testing chroot feature Smoke Chroot is validating functionality... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
--build-local recompiled Squid from source (~575s) and exhausted the 600s test timeout. The build-images job already builds the patched Squid image from this tree, so use it with --skip-pull instead. Co-authored-by: Copilot App <[email protected]>
|
🚀 Security Guard has started processing this pull request |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error.
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 Smoke CodexOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
✅ Smoke Claude passed
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ Smoke OTel TracingOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
🔌 Smoke Services — All services reachable! ✅ Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error.
|
|
✅ Build Test Suite completed successfully! Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. 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
- "169.254.169.254"See Network Configuration for more information.
|
|
Smoke Test: Copilot Engine (trigger: pull_request)
Overall status: PASS cc @lpcox (author). No assignees.
|
|
|
Cloud Hypervisor + Copilot smoke test
Overall: PASS
|
📡 Smoke OTel Tracing: scenario results
Overall: the OTEL integration points validate. Two smoke-workflow defects need follow-up: the outdated Jest flag (
|
Smoke Test: Copilot Network Isolation ✅Both egress checks passed successfully:
Overall Result: PASS The firewall correctly:
|
|
Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. Smoke Test: Copilot BYOK (Direct Mode) ✅ PASS
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy sidecar → api.githubcopilot.com with credential isolation.
|
Chroot version comparison
Result: not all tests passed (
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. Services smoke test: ✅ Redis PONG, ✅ pg_isready accepting connections, ✅ SELECT 1 → 1. PASS
|
|
Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. 🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS All eight repositories cloned successfully. Node.js test scripts print only "All tests passed!", so no per-test counts are available for them. Runner setup workarounds (test results unaffected):
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
- "169.254.169.254"See Network Configuration for more information.
|
Summary
Turns on the gh-aw model router (
model: router, gh-aw v1.3.1) for the 12 Copilot workflows that fail most often (mainly engine timeouts) or burn the most AI credits.Routed workflows: auth-doctor-updater, claude-token-optimizer, config-consistency-auditor, copilot-token-optimizer, copilot-token-usage-analyzer, dependency-security-monitor, duplicate-code-detector, issue-duplication-detector, pelis-agent-factory-advisor, refactoring-scanner, security-guard, security-review.
Each lock now sets
GH_AW_MODEL_ROUTING_ENABLED: "true"andexperimental.modelRouting: true, and pins the AWFrouterimage.Notes for reviewers
model: autotomodel: router.max-turns: 4. Routing lowers cost but won't fix turn-limit failures.Test updates
copilot-auto-model-workflows.test.ts: removes the 4 routed workflows from theautolist and adds router assertions for all 12.refactoring-scanner-workflow.test.ts: routed locks pin per-image tags undercontainer.imagesinstead of a sharedimageTag. The test checks that each pin matches the installed AWF version.router.Locally,
npx jest scripts/cishows the same 243 environment-specific failures as unmodifiedmainon macOS, with no new failures.