Skip to content

Suggested test: copilot/close-issue-state-reason-agent-override #21342

Closed as not planned

Description

@github-actions

Motivation

Link to the gh-aw PR: github/gh-aw#67245 — Fixes close_issue dropping the agent-selected state_reason when state-reason: is configured as a list; the handler always fell back to the first configured value because ValidationConfig["close_issue"] didn't declare the injected state_reason field (regression for github/gh-aw#67232).

Proposed test

  • Workflow file: test-copilot-close-issue-state-reason-list.md
  • Trigger: workflow_dispatch
  • Engine: copilot
  • Safe output: close-issue
  • Variant: standard

Minimal test prompt sketch

Configure close-issue: { state-reason: [completed, not_planned] } (non-duplicate values, non-default order) with a samples: entry where the agent explicitly picks state_reason: "not_planned" for a fixture issue. Assert via gh issue view --json stateReason that the issue closes with NOT_PLANNED, not the first-listed completed, proving the agent's choice reaches the handler.

New fixtures or secrets needed

None — reuses create_test_issue fixture helper already used by test-copilot-close-issue-duplicate-of.

Notes

test-copilot-close-issue-duplicate-of.md only exercises state-reason: duplicate as a single fixed value, which doesn't catch this bug class (fixed value is never affected by the dropped-field validation issue). This new test specifically needs a list of allowed reasons plus a non-first agent selection to reproduce the original defect.

Generated by 🔍 Suggest New E2E Tests · copilot · auto · 133.2 AIC · ⌖ 7.05 AIC · ⊞ 8.6K · ◷

Activity

  1. dsyme commented on Oct 24, 2026

    @dsyme
    Collaborator

    Closing during the 2026-10-24 E2E triage: this is a narrow bug-regression, schema/default, alias, or rejection case better covered in github/gh-aw unit or integration tests. The retained E2E phases prioritize new safe outputs, unrepresented frontmatter, and behavior requiring live Actions/GitHub state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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