Motivation
Link to the gh-aw PR: github/gh-aw#48482 — Fix imported engine.model silently dropped when max-ai-credits is set
When a workflow sets max-ai-credits at the top level and also pins engine.model (whether directly or via @import), the model pin was silently discarded before this fix. No regression test covers the combination of max-ai-credits + explicit model selection.
Proposed test
- Workflow file:
test-copilot-engine-model-with-max-ai-credits.md
- Trigger:
workflow_dispatch
- Engine: copilot
- Safe output:
create-issue (minimal, to confirm the workflow ran without falling back to the default model expression)
- Variant: standard
Minimal test prompt sketch
Write a workflow that sets both max-ai-credits: 50 and an explicit engine.model pin in frontmatter. Instruct the agent to create a trivial issue. The compiled lockfile should embed the pinned model literal (not the ${{ vars.GH_AW_MODEL_AGENT_COPILOT || ... }} fallback expression), which the test runner can verify by inspecting the generated .lock.yml.
New fixtures or secrets needed
None. Standard repo is sufficient; model pin can be any valid model string (e.g. claude-sonnet-4.6).
Notes
The lockfile assertion (checking that the compiled model expression is not the dynamic vars fallback) could be done in e2e.sh as a compile-time check rather than a live-run check, making this test cheap to run. This complements the existing test-copilot-dispatch-workflow and test-copilot-call-workflow coverage.
Generated by 🔍 Suggest New E2E Tests · sonnet46 · 24.7 AIC · ⌖ 5.9 AIC · ⊞ 6.1K · ◷
Motivation
Link to the gh-aw PR: github/gh-aw#48482 — Fix imported
engine.modelsilently dropped whenmax-ai-creditsis setWhen a workflow sets
max-ai-creditsat the top level and also pinsengine.model(whether directly or via@import), the model pin was silently discarded before this fix. No regression test covers the combination ofmax-ai-credits+ explicit model selection.Proposed test
test-copilot-engine-model-with-max-ai-credits.mdworkflow_dispatchcreate-issue(minimal, to confirm the workflow ran without falling back to the default model expression)Minimal test prompt sketch
Write a workflow that sets both
max-ai-credits: 50and an explicitengine.modelpin in frontmatter. Instruct the agent to create a trivial issue. The compiled lockfile should embed the pinned model literal (not the${{ vars.GH_AW_MODEL_AGENT_COPILOT || ... }}fallback expression), which the test runner can verify by inspecting the generated.lock.yml.New fixtures or secrets needed
None. Standard repo is sufficient; model pin can be any valid model string (e.g.
claude-sonnet-4.6).Notes
The lockfile assertion (checking that the compiled model expression is not the dynamic vars fallback) could be done in
e2e.shas a compile-time check rather than a live-run check, making this test cheap to run. This complements the existingtest-copilot-dispatch-workflowandtest-copilot-call-workflowcoverage.