Skip to content

Align model routing with AWF runtime, topology, and host support - #77212

Merged
SivaKesava1 merged 14 commits into
mainfrom
copilot/align-model-routing-awf
Nov 14, 2026
Merged

SivaKesava1 merged 14 commits into
mainfrom
copilot/align-model-routing-awf

Conversation

Copilot AI commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

gh-aw's routing checks didn't match what AWF actually supports. Implicit default routing always skipped Cloud Hypervisor, even though AWF v0.29.12+ can route it. Explicit routing (model: router / engine.model-routing) compiled on NVX, arc-dind, Docker-socket-exposing mounts, or native non-Linux runners, and AWF then refused those runs when the agent started.

Changes

  • Shared compatibility helper in the new pkg/workflow/model_routing_runtime.go. Implicit-default eligibility and explicit-routing validation both use modelRoutingRuntimeCompatibility, so the two can't drift. Supported setups:

    • Default Docker: sandbox.agent.runtime omitted, docker, or docker-sudo-iptables, all of which run on runc.
    • cloud-hypervisor when the effective AWF version is at least the new constants.AWFCloudHypervisorModelRoutingMinVersion (v0.29.12). The effective version uses the existing precedence: sandbox.agent.version, then firewall version, then the compiler default.

    Rejected setups:

    • NVX or any other runtime.
    • runner.topology: arc-dind.
    • Agent mounts that expose the Docker socket. The check follows AWF's findDockerSocketExposingMount:
      • Binds of the socket or of a parent directory count, for both /var/run/docker.sock and /run/docker.sock.
      • A bind is safe if the socket lands at /var/run/docker.sock or /run/docker.sock inside the agent, which AWF masks.
      • Only mounts gh-aw actually emits are checked; it doesn't emit custom mounts for Cloud Hypervisor or NVX.
    • Runners that are definitely native non-Linux: GitHub-hosted windows-* and macos-* labels, or self-hosted with the reserved windows/macos label. Literal runs-on: windows-latest stays allowed because of the WSL adapter. Runner groups, expressions, and custom self-hosted labels are never treated as proof of an OS.
  • Implicit default (defaultModelRoutingIneligibility): an incompatible setup now skips routing silently. The separate legacy-security exclusion is kept, so a runtime AWF can route explicitly doesn't automatically get the default.

  • Explicit routing: validateModelRouting now ends with the compatibility check. A second check in populateWorkflowBuildContext runs once runs-on is resolved. Errors name the field and value, list the supported setups, and link Provide primary-agent and enclave parity across Docker, NVX, and Cloud Hypervisor gh-aw-firewall#10335:

    Validation failed for field 'sandbox.agent.version'
    Value: v0.29.11
    Reason: model routing with sandbox.agent.runtime: cloud-hypervisor requires AWF v0.29.12 or newer
    
  • Lock change: daily-mcp-concurrency-analysis.lock.yml now uses the implicit routing default. The other six Cloud Hypervisor workflows keep their chosen models, and no other locks change.

  • Docs: reference/model-routing.md now lists the supported runtimes, topology, and hosts, plus the eligibility rule for default routing.

Review notes

  • TestGenerateModelRoutingConversationStep/arc-dind used to compile explicit routing on arc-dind. It now expects the runner.topology error.
  • On compile, the routing error marker points at the engine: line, matching the existing formatEngineSetupError behaviour.
  • TestBootstrapReleasePinsMatchCompilerDefaults fails on main as well, because v0.29.12 has no release-integrity pin; this PR doesn't change it.

Copilot AI changed the title [WIP] Align model routing with AWF runtime and topology support Align model routing with AWF runtime, topology, and host support Nov 12, 2026
Copilot AI requested a review from SivaKesava1 November 12, 2026 19:28
@SivaKesava1
SivaKesava1 marked this pull request as ready for review November 12, 2026 21:00
Copilot AI adaptive review requested due to automatic review settings November 12, 2026 21:00
@github-actions

Copy link
Copy Markdown
Contributor

🔬 Test Quality Sentinel is analyzing test quality on this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

✂️ Ponytail Reviewer has started processing this pull request

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Specification Reviewer has started processing this pull request

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.

🟡 Changes recommended

Object-form runs-on labels are incorrectly treated as compatible, allowing native Windows hosts without the WSL adapter to pass routing checks but fail at startup.

1 open issue
What changed in this PR

This PR aligns gh-aw’s model-routing defaults and compile-time validation with AWF runtime support, addressing #77208 while preserving authored model choices.

Changes:

  • Shares runtime, topology, Docker-socket mount, and host compatibility checks between explicit and implicit routing.
  • Enables eligible Cloud Hypervisor workflows to use default routing with AWF v0.29.12 or newer.
  • Adds compatibility tests, updates documentation, and regenerates the affected workflow lock.
File Description
pkg/​workflow/​model_routing.go Applies shared compatibility validation to explicit routing.
pkg/​workflow/​model_routing_test.go Tests explicit routing compatibility and version precedence.
pkg/​workflow/​model_routing_runtime.go Defines shared runtime, topology, mount, and host checks.
pkg/​workflow/​model_routing_default.go Uses shared checks for implicit routing eligibility.
pkg/​workflow/​model_routing_default_test.go Tests default eligibility, socket exposure, and runner labels.
pkg/​workflow/​compiler_orchestrator_workflow.go Validates compatibility after runner selection is resolved.
pkg/​constants/​version_constants.go Defines the minimum AWF version for Cloud Hypervisor routing.
docs/​src/​content/​docs/​reference/​model-routing.md Documents supported configurations and default eligibility.
.github/​workflows/​daily-mcp-concurrency-analysis.lock.yml Adds conditional default routing and routing-result reporting.

Review effort: Balanced (auto)

Comment thread pkg/workflow/model_routing_runtime.go Resolved
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check impacted-go-tests (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "92555d2d55577918c4865631b6f1349d4170d1d7",
  "kind": "requested",
  "schema_version": "1",
  "state": "37e81d265d1fe40146d8e7d4a9133adad3723da360da65c0a5fb6423d0ab3608",
  "work": [
    "42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

@github-actions

Copy link
Copy Markdown
Contributor

Triage

  • Category: bug
  • Risk: medium
  • Score: 61 (impact 31 + urgency 18 + quality 12)
  • Recommended action: batch_review
  • Reason: model-routing compatibility fix with direct user impact and clear runtime coverage.
  • Batch: pr-batch:model-routing-and-audit

Generated by 🔧 PR Triage Agent · copilot · mai11 · ~8 AIC · ⌖ ~2 AIC · ⊞ 15.9K · ◷

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "9ce25a49451253615d42e9f94429d99f0b064e3d",
  "kind": "requested",
  "schema_version": "1",
  "state": "251d984f2dcd6642abd370239f2b96a7a962f42e667dda572ab0c5fafcf171e9",
  "work": [],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

Copilot AI and others added 3 commits November 13, 2026 15:12
…outing-awf

# Conflicts:
#	.github/workflows/daily-mcp-concurrency-analysis.lock.yml

Co-authored-by: gh-aw-bot <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Triage summary

  • Category: bug
  • Risk: medium
  • Score: 63/100 (impact 33, urgency 18, quality 12)
  • Recommended action: batch_review
  • Why: runtime/topology compatibility fix with direct user impact, green CI, and a contained change set.
  • Batch: none (only 2 eligible Copilot PRs remain outside the cooldown)

Generated by 🔧 PR Triage Agent · copilot · mai11 · ~5 AIC · ⌖ ~1 AIC · ⊞ 15.3K · ◷

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check push_ledger_changes (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "8eaad35e129c0710600030a6bbaf5cba6229d1b7",
  "kind": "requested",
  "schema_version": "1",
  "state": "69743f1432e455171fe9585e64ccf01cf13251062c727dbfb2d4c0fd274ac341",
  "work": [
    "2ec1c55a56c3bbc3d439b0f0d819e0f964a9c8ea5c8bbe45cc9676c7e7802a18"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

Copilot AI commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged main at 7517bb7 in f799a04b using make merge-main, without conflicts and preserving the routing changes. Build and focused tests passed; the target's recompilation stage encountered npm registry DNS errors. No CI was dispatched or retried.

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Updated from main in f799a04b using make merge-main, preserving the routing changes. The newer impacted-go-tests check was already green; focused routing/ledger tests and local impacted Go tests also pass. Full validation remains limited by custom-lint diagnostics, missing golangci-lint, npm DNS errors during recompilation, and a CodeQL timeout. No CI was dispatched or retried.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "a68e51fd3524c37dd6d59eae8787d1de6cd9abc6",
  "kind": "requested",
  "schema_version": "1",
  "state": "17253f99e8e243c870d0f92103494d89aa4dfe718a634cf65e7b3b52dab44d05",
  "work": [],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

@pelikhan

Copy link
Copy Markdown
Collaborator

@SivaKesava1 ready?

Copilot AI and others added 2 commits November 13, 2026 21:04
…outing-awf

# Conflicts:
#	.github/workflows/daily-mcp-concurrency-analysis.lock.yml

Co-authored-by: gh-aw-bot <[email protected]>

Copilot AI commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged latest main in 8cbda3fc85; the workflow lock conflict was regenerated from the merged sources. No conflicts remain.

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged current main in 8cbda3fc85. The impacted Go tests pass on the merged tree; I also fixed the model-routing custom-linter findings in ea0642612c. No CI was triggered.

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged latest main in 8cbda3fc85; regenerated the conflicted workflow lock, and no conflicts remain.

@SivaKesava1
SivaKesava1 merged commit 3a12004 into main Nov 14, 2026
51 checks passed
@SivaKesava1
SivaKesava1 deleted the copilot/align-model-routing-awf branch November 14, 2026 03:19
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

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.

Align model routing with AWF runtime and topology support

6 participants