Skip to content

Suggested test: copilot/engine-model-with-max-ai-credits #9783

Description

@github-actions

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 ·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions