microsoft / microsoft/winget-pkgs

[New Feature]: Author-assist worker for the Unexpected-File scenario

Open
#411,059 1 comment 0 reactions 0 assignees View on GitHub
Issue-Feature
Dominant language
No language data
Stars
11.1k
Forks
9.7k
PR merge metrics
PR metrics pending

Description

### Description of the new feature/enhancement

When a PR is labeled **`Unexpected-File`**, the author currently receives **no guidance** — the label is applied by wingetbot (the validation pipeline), and there is no policy-bot canned reply for it. The author is left to guess which file doesn't belong.

Proposal: an author-assist agentic worker (part of #411014) that posts a **recommend-only** comment naming the **specific stray file(s)** that don't belong in the manifest folder and telling the author exactly what to remove.

Example: PR #410965 (SyntroSend.SyntroSend 1.0.2) committed `manifests/s/SyntroSend/SyntroSend/1.0.2/README.md` alongside the valid installer/locale/version YAMLs — the `README.md` is the file to remove.

### Proposed technical implementation details (optional)

- **Trigger:** `Unexpected-File` label added.
- **Data source:** the PR diff itself (GitHub `files` list) — no ADO log parsing, no URL/binary exposure. An "unexpected" file is any **added** file that is not a valid manifest `*.yaml` under `manifests/////`.
- **Critical classification (guardrail):** determine the PR's intent first.
- **Manifest submission** with a stray file → name the specific file(s) to remove.
- **Legitimate project PR** (docs under `doc/`, tools under `Tools/`, `schemas/`, `.github/`) → these are intentional contributions on the `Project-File` authorization path. **Never** tell these authors to delete their files.
- **Mixed** → be precise about which files are the problem.
- **Guardrails (shared with the family):** recommend-only, idempotent per head SHA, abort on any security label, never post `@wingetbot` triggers.
- Vet with an against-real-PRs pilot (both manifest-with-stray-file and legitimate-project-PR shapes) before building.

_Created with GitHub Copilot assistance._

Contributor guide

Open the contributing guide

Research direction

Start with the related work in #411014 and the GitHub PR files list described here. Trace the Unexpected-File trigger and define the worker’s handling for manifest, legitimate project, and mixed PRs. Done means a recommend-only, idempotent comment with the correct stray files, security-label and trigger guardrails, plus an against-real-PRs pilot.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.