Skip to content

Use model: router for explicitly routed Pi workflows - #21183

Merged
pelikhan merged 1 commit into
mainfrom
chore/router-model-syntax
Nov 18, 2026
Merged

pelikhan merged 1 commit into
mainfrom
chore/router-model-syntax

Conversation

@rabeckett

@rabeckett rabeckett commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Use top-level model: router for the 19 Pi workflows that already request automatic, cost-oriented routing. This keeps the same model choices and prepares these workflows for eventual deprecation of the nested goal/mode syntax. The other 65 workflows are unchanged.

All 19 changed workflows compiled with pinned gh-aw v1.2.3. Their generated locks match the previous locks except for the source fingerprints and metadata recording the requested router value. Repository-wide strict compilation passed (84/84, with four warnings in the unchanged modernization workflow). The 12 SelfCare docs tests passed locally. The upstream workflow contracts and dashboard contracts passed in CI.

Fixes #21182

@github-actions github-actions Bot 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.

Test Quality Sentinel: model: router migration

Reviewed head: 719739eb318c5fbf247c8b6f8da1219b08f819d2 (re-verified open, non-draft, same head before submission).
Score: N/A. Verdict: COMMENT (non-blocking).

The four modified assertions in three test files match all 19 migrated sources at head, and the lock diffs are metadata-only. The legacy model-routing block is gone from every committed workflow. However, the new patterns pin only engine: id: pi and model: router. The routing objective (goal: cost, mode: auto) is no longer asserted at source level for 11 sources, and the engine pattern still passes if a nested model-routing block is re-added. I did not execute the tests; findings come from reading the diff and replaying the regexes against committed blobs.

Action: Add assert.doesNotMatch(source, /model-routing:/) to the four modified scenarios (or an explicit "requested":"router" lock check) before merge, or accept the reduced coverage explicitly.

Scope and method
  • Test files changed: workflow-contract-compliance.test.mjs (EU CRA loop), workflow-contract-selfcare-dashboard.test.mjs (1 scenario), workflow-contract-selfcare-docs.test.mjs (2 scenarios). Four modified behavioral scenarios; no tests added or deleted.
  • Replayed each new regex against committed .github/workflows/*.md at 719739eb: 19/19 match ^engine:\n +id: pi$ and ^model: router$. The old model-routing pattern matches 0 sources.
  • Lock diffs vs 453e35b: only gh-aw-metadata fingerprints and GH_AW_INFO_MODEL_CONFIG, which gains "requested":"router". Routing stays enabled, goal: cost, mode: auto. No other lock changes.
  • Synthetic check: a source with engine: id: pi, a nested model-routing: goal: quality block, and model: router passes both new regexes.
  • The local working tree was stale relative to the PR head (it held pre-PR text), so all evidence uses committed blobs at 719739eb.
Per-scenario classification
Scenario File Sources Classification New edge/failure cases Regression that now escapes
EU CRA workflows preserve advisory and human-review boundaries workflow-contract-compliance.test.mjs 8 Configuration conformance 0 Routing objective changed, or nested model-routing re-added beside model: router (previously pinned goal: cost and mode: auto)
SelfCare dashboard performance worker selects one highest-ROI small win workflow-contract-selfcare-dashboard.test.mjs 1 Configuration conformance 0 Same
SVG visual audit covers every tracked SVG in both color schemes workflow-contract-selfcare-docs.test.mjs 1 Configuration conformance 0 Same
SelfCare accessibility checker audits the served docs site workflow-contract-selfcare-docs.test.mjs 1 Configuration conformance 0 Same

Score is N/A. The rubric does not settle whether source-text conformance checks count as design or implementation tests, and the set adds no edge, failure, or authorization cases, so the diagnostic would not discriminate.

Coverage observations
  • Source-level assertions for the objective were removed from 11 sources (8 EU CRA, plus the SelfCare dashboard, SVG audit, and accessibility checker). The other 8 migrated sources were never asserted in source-text tests, so nothing regresses there.
  • tests/unit/workflow-contract-compilation.test.mjs still asserts the escaped objective for uk-ai-advisory-campaign-maintainer and eu-cra-compliance-campaign-maintainer from generated output. That covers two campaign maintainers only.
  • Suggested minimal fix: keep the new patterns and add assert.doesNotMatch(source, /model-routing:/) in each modified scenario, so a legacy nested block cannot coexist with model: router. Optionally assert "requested":"router" in one compiled lock.
Not verified
  • Did not run npm test, gh aw compile, or CI. PR-body claims (84/84 strict compile, 12 docs tests) are unverified here.

Generated by Test Quality Sentinel for #21183 · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~1 AIC · ⊞ 4.7K
Comment /test-quality to run again

@rabeckett

Copy link
Copy Markdown
Collaborator Author

For the Test Quality Sentinel suggestion, I’m keeping the tests focused on the authored model: router value. A workflow with that value and the old nested block does pass the two regexes in isolation, but it does not compile: gh-aw v1.2.3 explicitly rejects that combination, and the PR validator strictly compiled all 84 workflows. The full lock comparison also confirmed enabled: true, goal: cost, mode: auto for all 19 changed workflows. A prose-wide negative regex would duplicate the compiler check and could reject a harmless mention in a prompt.

@github-actions github-actions Bot 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.

Summary

This moves 19 Pi workflow sources from the nested model-routing block to a top-level model: router. The committed lock metadata keeps the routing objective unchanged (goal: cost, mode: auto) and adds requested: "router". Each lock diff is a two-line metadata change. I found no correctness or authority defect. The one gap is that the updated test assertions no longer pin the routing objective.

Action: No blocking change is required. Consider adding a lock-level assertion for "goal":"cost","mode":"auto" before merge.

Evidence
  • All 19 changed .md sources at 719739e contain exactly one top-level model: router and engine: id: pi.
  • All 19 lock files record "requested":"router" alongside the unchanged goal/mode.
  • No model-routing: nested block remains in workflow sources, shared control modules, or tests at head.
  • The uk-ai-advisory-operational-resilience.md model: matches are model: small agent definitions in the body, not duplicates.
Verification limits
  • Tests were not executed. Policy forbids running PR tests, and the local checkout does not match PR head. The review is static, based on committed content at headRefOid.
  • gh aw is not installed here, so compilation was not re-run. Compile success relies on the lock metadata and the PR's stated results.

Generated by Matt Pocock Skills Reviewer for #21183 · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~1 AIC · ⊞ 3.8K
Comment /matt to run again

@github-actions github-actions Bot 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.

Validator results

  • FAIL: npm run test:unit (1287 passed, 11 failed of 1299)
  • FAIL: npm run test:integration (300 passed, 1 failed of 301)
  • PASS: npm run test:load (10 of 10)
  • PASS: agentic-workflows compile (84 workflows valid, 0 errors, 0 warnings)
  • PASS: npm run docs:build

Failure analysis

  • 8 tests in dashboard-site-build.test.mjs and 1 in the Pages simulation test fail with esbuild errors: Could not resolve @xterm/xterm, @xterm/addon-fit, @xterm/addon-web-links, @xterm/xterm/css/xterm.css and strip-ansi, imported by dashboard/site/src/components/cli-terminal-runtime.js. The runner has no dashboard/site/node_modules because npm ci fails against (packagefeedproxy.microsoft.io/redacted) with DEPTH_ZERO_SELF_SIGNED_CERT. The lockfile declares these packages, so this appears to be an install-environment limitation, not a defect in the changed code.
  • dashboard-postgres-fixtures.test.mjs: requires an explicitly configured disposable POSTGRES_URL, which this runner does not provide.
  • workflow-contract-compilation.test.mjs (clean-room compilation): produced no lock files in the first run, and the log shows the same @xterm build errors. It passes when rerun alone.
  • control-standalone-compilation.test.mjs (integration): the gh aw version check did not match the pinned v1.2.3 in the first run. It passes when rerun alone.

Requested action

  • Rerun test:unit and test:integration where dashboard/site dependencies install from the feed and POSTGRES_URL is set. No code change is requested based on these first-run results.

Generated by Workflow PR Validator for #21183 · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~1 AIC · ⊞ 2.8K

@rabeckett

Copy link
Copy Markdown
Collaborator Author

Follow-up to the Workflow PR Validator’s change request: I reran the requested suites on 719739eb3 using the repository’s Workflow contracts CI. All five unit shards passed: 1,298 passed, 1 skipped, 0 failed. The dashboard shard installed the dashboard dependencies, provisioned PostgreSQL and passed all 192 tests. The integration suite passed 301/301. No source change was needed.

The manual run is red overall: four separate campaign lifecycle jobs failed during setup, before they could exercise routing. The root fixture found no prebuilt CAO runtime for this SHA; CAO Evolution, Optimization, and Dependabot reported unknown command "cao" for "gh". These jobs run separately from npm run test:integration.

@pelikhan, the requested rerun no longer reproduces the validator failures. Please re-review on that basis; I’ve left the blocking decision in place for maintainer review.

@pelikhan
pelikhan merged commit 215fd92 into main Nov 18, 2026
64 of 72 checks passed
@pelikhan
pelikhan deleted the chore/router-model-syntax branch November 18, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use model: router in workflows with explicit automatic routing

2 participants