Repository navigation
Reduce generated model-routing decision steps - #77334
Conversation
Replace repeated shell branches with a boolean Actions expression and one output command. Regenerate workflow locks and compiler snapshots. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: 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.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
The compact model-routing step preserves the routing decision but removes useful runtime diagnostics. Please retain a concise decision log line so unexpected routing behavior remains debuggable without restoring the previous boilerplate.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
| return fmt.Sprintf(` - name: Resolve model routing | ||
| id: %s | ||
| env: | ||
| GH_AW_MODEL_ROUTING: ${{ vars.%s == '' && vars.%s == '' }} |
There was a problem hiding this comment.
The compact step removes the only runtime diagnostics explaining why implicit routing was enabled or disabled, making unexpected routing decisions difficult to investigate from workflow logs.
💡 Preserve a concise decision diagnostic
Please retain a single log line (for example, the resolved boolean and the relevant override state) before writing the output, or otherwise expose equivalent diagnostic context without restoring the full branch boilerplate. This keeps the size reduction while preserving operational observability.
There was a problem hiding this comment.
The activation step now invokes actions/setup/sh/resolve_model_routing.sh, which logs whether routing was enabled or which override disabled it, then writes the existing output. Commit: 1482e2ad.
There was a problem hiding this comment.
🟡 Changes recommended
Three nonempty-override test cases fail because the evaluator serializes false as an empty string, producing model-routing= instead of model-routing=false.
1 open issue
What changed in this PR
This PR simplifies gh-aw’s generated implicit model-routing decision step from 16 lines to 5, keeping the existing output contract and model-override precedence.
Changes:
- Replace shell branching with a boolean Actions expression and one output command.
- Update compiler assertions and six WebAssembly golden snapshots.
- Regenerate workflow locks without changing workflow sources or adding helper scripts.
| File | Description |
|---|---|
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden |
Refresh routing-step snapshot. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden |
Refresh routing-step snapshot. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden |
Refresh routing-step snapshot. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/custom-safe-output-max-length.golden |
Refresh routing-step snapshot. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden |
Refresh routing-step snapshot. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/copilot.golden |
Refresh Copilot routing snapshot. |
pkg/workflow/model_routing_test.go |
Update generated-step assertions. |
pkg/workflow/model_routing_default.go |
Emit the compact routing decision step. |
.github/workflows/workflow-skill-extractor.lock.yml |
Regenerate compact routing step. |
.github/workflows/workflow-health-manager.lock.yml |
Regenerate compact routing step. |
.github/workflows/weekly-editors-health-check.lock.yml |
Regenerate compact routing step. |
.github/workflows/weekly-blog-post-writer.lock.yml |
Regenerate compact routing step. |
.github/workflows/visual-regression-checker.lock.yml |
Regenerate compact routing step. |
.github/workflows/ubuntu-image-analyzer.lock.yml |
Regenerate compact routing step. |
.github/workflows/tidy.lock.yml |
Regenerate compact routing step. |
.github/workflows/stale-pr-cleanup.lock.yml |
Regenerate compact routing step. |
.github/workflows/spec-librarian.lock.yml |
Regenerate compact routing step. |
.github/workflows/spec-extractor.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-workflow-call-with-inputs.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-work-queue-worker.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-work-queue-dispatcher.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-update-cross-repo-pr.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-security-alerts.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-project.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-multi-pr.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-issues.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-create-cross-repo-pr.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-copilot-dynamic-workflow.lock.yml |
Regenerate compact routing step. |
.github/workflows/smoke-checkout-pr-dispatch.lock.yml |
Regenerate compact routing step. |
.github/workflows/slide-deck-maintainer.lock.yml |
Regenerate compact routing step. |
.github/workflows/security-compliance.lock.yml |
Regenerate compact routing step. |
.github/workflows/repository-quality-improver.lock.yml |
Regenerate compact routing step. |
.github/workflows/release.lock.yml |
Regenerate compact routing step. |
.github/workflows/refiner.lock.yml |
Regenerate compact routing step. |
.github/workflows/pr-nitpick-reviewer.lock.yml |
Regenerate compact routing step. |
.github/workflows/pr-finisher.lock.yml |
Regenerate compact routing step. |
.github/workflows/plan.lock.yml |
Regenerate compact routing step. |
.github/workflows/org-health-report.lock.yml |
Regenerate compact routing step. |
.github/workflows/objective-impact-report.lock.yml |
Regenerate compact routing step. |
.github/workflows/mergefest.lock.yml |
Regenerate compact routing step. |
.github/workflows/mcp-inspector.lock.yml |
Regenerate compact routing step. |
.github/workflows/layout-spec-maintainer.lock.yml |
Regenerate compact routing step. |
.github/workflows/firewall.lock.yml |
Regenerate compact routing step. |
.github/workflows/firewall-escape.lock.yml |
Regenerate compact routing step. |
.github/workflows/eslint-miner.lock.yml |
Regenerate compact routing step. |
.github/workflows/eslint-factory-dispatcher.lock.yml |
Regenerate compact routing step. |
.github/workflows/enterprise-docs-audit.lock.yml |
Regenerate compact routing step. |
.github/workflows/engine-conformance-dispatcher.lock.yml |
Regenerate compact routing step. |
.github/workflows/engine-conformance-copilot.lock.yml |
Regenerate compact routing step. |
.github/workflows/draft-pr-cleanup.lock.yml |
Regenerate compact routing step. |
.github/workflows/docs-noob-tester.lock.yml |
Regenerate compact routing step. |
.github/workflows/dictation-prompt.lock.yml |
Regenerate compact routing step. |
.github/workflows/dev-hawk.lock.yml |
Regenerate compact routing step. |
.github/workflows/deployment-incident-monitor.lock.yml |
Regenerate compact routing step. |
.github/workflows/delight.lock.yml |
Regenerate compact routing step. |
.github/workflows/dead-code-remover.lock.yml |
Regenerate compact routing step. |
.github/workflows/dataflow-pr-discussion-dataset.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-workflow-updater.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-workflow-security-model.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-work-queues-report.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-work-queue-formal-verification.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-trajectory-grader-implementer.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-testify-uber-super-expert.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-team-status.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-syntax-error-quality.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-squid-image-scan.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-spec-coverage-kiro.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-spdd-spec-planner.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-security-observability.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-secrets-analysis.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-schema-audit-cursor.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-safe-output-integrator.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-report-dispatcher.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-regression-audit-kiro.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-pr-review-cursor.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-graft-intelligence.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-geo-optimizer.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-formal-spec-verifier.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-experiment-report.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-ecosystem-explorer.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-declarative-engine-improver.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-compiler-threat-spec-optimizer.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-compiler-quality.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-assign-issue-to-user.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-ambient-context-optimizer.lock.yml |
Regenerate compact routing step. |
.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml |
Regenerate compact routing step. |
.github/workflows/craft.lock.yml |
Regenerate compact routing step. |
.github/workflows/copilot-pr-prompt-analysis.lock.yml |
Regenerate compact routing step. |
.github/workflows/copilot-pr-nlp-analysis.lock.yml |
Regenerate compact routing step. |
.github/workflows/copilot-pr-merged-report.lock.yml |
Regenerate compact routing step. |
.github/workflows/copilot-opt.lock.yml |
Regenerate compact routing step. |
.github/workflows/cli-consistency-checker.lock.yml |
Regenerate compact routing step. |
.github/workflows/ci-coach.lock.yml |
Regenerate compact routing step. |
.github/workflows/breaking-change-checker.lock.yml |
Regenerate compact routing step. |
.github/workflows/aw-issue-clustering.lock.yml |
Regenerate compact routing step. |
.github/workflows/auditor.lock.yml |
Regenerate compact routing step. |
.github/workflows/architecture-guardian.lock.yml |
Regenerate compact routing step. |
.github/workflows/agentic-token-optimizer.lock.yml |
Regenerate compact routing step. |
.github/workflows/agentic-token-audit.lock.yml |
Regenerate compact routing step. |
.github/workflows/agent-performance-analyzer.lock.yml |
Regenerate compact routing step. |
Review effort: Balanced (dynamic)
| return fmt.Sprintf(` - name: Resolve model routing | ||
| id: %s | ||
| env: | ||
| GH_AW_MODEL_ROUTING: ${{ vars.%s == '' && vars.%s == '' }} |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd and /diagnosing-bugs directly, since the diff is small. Requesting changes because one test fails.
📋 Key Themes & Highlights
Blocking issue
- Failing test (outside this diff):
TestDefaultModelRoutingActivationHonorsModelVariablesinpkg/workflow/model_env_vars_test.go:892fails in theagent_variable,default_variable, andboth_variables,_agent_winssubtests. The step now emitsfalsethrough Actions boolean stringification.evaluateTestExpressionreturns""for falsebinaryandlogicalresults, but the test expects"false". This test file is not part of the PR, so it was not updated for the new expression. - Suggested fix: keep
evaluateTestExpressiontruthiness semantics soif:checks still work. Map an empty result to"false"only at the${{ }}interpolation boundary, and only when the top-level node is abinaryorlogicalexpression. Do not map every empty value, because an unsetvars.*also yields"". A blanket mapping insideevaluateTestExpressionbreaks theneither_variablecase.
Verified
- ✅
gofmt -lis clean on both changed Go files. - ✅
TestCompileDefaultModelRouting_RuntimeOverrideGuardpasses against the new expression and echo. - ✅ The
neither_variablesubtest passes. - ✅ No references to the removed
GH_AW_MODEL_AGENT_VARorGH_AW_DEFAULT_MODEL_VARremain at head, and the committed.lock.ymlfiles use the new form. - ✅
== ''preserves the former-nsemantics: unset and emptyvars.*both evaluate to'', and whitespace-only values count as set in both versions.
Limits
- I could not confirm the failure against the parent commit because the worktree fetch failed. I attribute it to this change because the old script emitted a literal
false. - The PR body says the final lint gate is blocked by pre-existing findings in
model_routing_default.go. I did not verify this.
@copilot please address the failing test before merging.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "975779adacb94c31efd9a073c631b3e7d3fd4c9a",
"kind": "requested",
"schema_version": "1",
"state": "5add20967dc6321a3544be1334eb85bf55818d145f3d6039c5d5876284d4d111",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
"8970a13fb8acb6e86e0b521084fb261586d2a9c7001e9485eb265f089d1566fb"
],
"workflow": "pr-sous-chef"
}
|
…l-routing Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
@copilot keep the looging, move to .sh file |
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Restored the routing decision diagnostics in a dedicated |
|
🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: Completed task
Please address the remaining CI failures on this PR's existing branch. No merging or CI triggering. Structured data{
"completed_task": 43371574120,
"head": "1482e2ad6b0812d7e5ccf9371ebfda0d3fd0d906",
"kind": "ci-follow-up",
"schema_version": "1",
"state": "d600f537123b10fc194747549c3c8e9cd64cc09676fb8c6b85421e2dc9e9969d",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Fixed in commit |
|
@copilot resolve the merge conflicts on this branch. |
…l-routing # Conflicts: # pkg/workflow/compiler_custom_actions_test.go Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Resolved the conflict and merged the latest |
|
🎉 This pull request is included in a new release. Release: |

Summary
Reduce generated model-routing boilerplate from 16 lines to 5 per workflow. Evaluate whether both model override variables are empty in a boolean Actions expression, then write the existing
model-routingoutput with one command. Nonempty overrides still disable implicit routing; explicit routing is unchanged.Regenerate workflow locks and compiler golden snapshots. No helper script or workflow source changes are needed.
Validation
model_routing_default.go(function length, JSON decoding, and a discarded type-assertion result). The workflow drift found during validation was addressed by regenerating lock files.