Skip to content

Suggested test: copilot/close-issue-fixed-target-enforcement #17292

Closed as not planned

Description

@github-actions

Motivation

github/gh-aw#62447 — Safe-output handlers (including close-issue) previously let model-provided IDs override a configured fixed target, allowing an operation to escape the intended item. The fix applies the configured target before any model-provided ID, with model-provided IDs only honored when target: "*".

Proposed test

  • Workflow file: test-copilot-close-issue-fixed-target.md
  • Trigger: issues (opened/reopened), gated by an e2e-marker body check like the existing test-copilot-close-issue.md
  • Engine: copilot
  • Safe output: close-issue with a fixed numeric target (e.g. a pre-created canonical issue number) rather than target: triggering
  • Variant: standard

Minimal test prompt sketch

Create two issues: a "target" issue A (whose number is baked into safe-outputs.close-issue.target) and a "triggering" issue B that starts the workflow. Prompt the agent to attempt to close issue B (the triggering issue) by number. Assert that issue A — the configured fixed target — is the one actually closed, not B, confirming target enforcement overrides the model-provided issue number.

New fixtures or secrets needed

Requires creating a second, stable "target" issue per test run (or pre-provisioning one) since the fixed target must be a real, known issue number at dispatch time — slightly more setup than the existing target: triggering tests.

Notes

Existing test-copilot-close-issue.md and test-copilot-close-issue-duplicate-of.md only exercise target: triggering, not a fixed numeric target with an adversarial prompt, so this scenario is uncovered.

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

Activity

  1. dsyme commented on Oct 24, 2026

    @dsyme
    Collaborator

    Closing during the E2E proposal triage: this is a narrow regression, default/validation case, or redundant subcase that is better covered by gh-aw unit/integration tests than by a live repository E2E. The retained live-only candidates are grouped in #16258, #25348, #16260, #16259, and #25349.

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