Suggested test: copilot/add-labels-target-restriction
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github
- Domain
- ci-cd, testing-qa
Research direction
Start by comparing test-copilot-add-labels.md with test-copilot-nosandbox-add-labels.md and test-copilot-siderepo-add-labels.md, then create test-copilot-add-labels-target-restriction.md using the stated workflow_dispatch, copilot, and add-labels setup. Done means the harness confirms a model-selected different item is ignored for a fixed or default triggering target, with no fixtures or secrets required.
Written by the indexing model from the issue text.
Description
Motivation
Link to the gh-aw PR: github/gh-aw#60362 — Enforce add-labels target restrictions
Previously the add_labels handler trusted model-provided item numbers over the configured target, allowing labels to be applied outside the triggering issue/PR. The fix now: defaults omitted targets to triggering; ignores model-provided item numbers for triggering and fixed numeric targets; only accepts model-selected targets when target: "*" is configured.
Proposed test
- Workflow file:
test-copilot-add-labels-target-restriction.md - Trigger:
workflow_dispatch - Engine: copilot
- Safe output:
add-labels - Variant: standard
Minimal test prompt sketch
Configure safe-outputs.add-labels with a fixed numeric target (or default triggering) and have the prompt instruct the agent to attempt to emit add_labels for a different, model-chosen item number. Assert the harness confirms the label lands only on the configured/triggering item, not the model-provided one — i.e. the override is ignored.
New fixtures or secrets needed
None.
Notes
Existing tests test-copilot-add-labels.md (issue-triggered) and test-copilot-nosandbox-add-labels.md / test-copilot-siderepo-add-labels.md cover the basic label-add path but not the target-restriction/enforcement behavior. Open suggestions #11353 (add-labels-on-pull-request) and #10716 (add-labels-pull-requests-permission-opt-out) cover different aspects and don't overlap with this scenario.
Generated by 🔍 Suggest New E2E Tests · copilot · auto · 37.1 AIC · ⌖ 6.01 AIC · ⊞ 8.4K · ◷
- Dominant language
- Shell
- Stars
- 8
- Forks
- 5
- Avg merge
- 18h 32m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from githubnext/gh-aw-test
-
suggested new test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
githubnext/gh-aw-test#16875 ·
-
agentic-workflows suggested new test
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
githubnext/gh-aw-test#16262 ·
-
suggested new test
Difficulty 2/5 1-2 days Newbie friendliness 78/100
githubnext/gh-aw-test#15805 ·
-
suggested new test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
githubnext/gh-aw-test#15094 ·
-
suggested new test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
githubnext/gh-aw-test#15093 ·
All issues in githubnext/gh-aw-test
Similar issues
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 comment ·
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·
-
area: compat bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
zenhub-dev
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenLiberty/ci.docker#747 ·