Skip to content

Add PR area labels and agentic public-impact assessment - #8836

Draft
joshblack wants to merge 2 commits into
mainfrom
copilot/pr-classification-workflows
Draft

joshblack wants to merge 2 commits into
mainfrom
copilot/pr-classification-workflows

Conversation

@joshblack

Copy link
Copy Markdown
Member

Add advisory PR classification: deterministic area labels and a Copilot agentic workflow that assigns public-package risk and explains consumer-facing before/after changes. Both refresh on PR updates, preserve unrelated labels, and avoid executing PR code in privileged jobs.

Area labeling supports forks. AI assessment uses trusted-actor pull_request_target activation (admin, maintainer, or write), organization-billed Copilot inference, a read-only GitHub proxy, and constrained safe outputs. Outside-contributor events do not launch the agent; a trusted maintainer can reopen or mark the PR ready for review. Comparisons use commit-pinned source evidence and may reuse verified existing images; this first version does not generate screenshots or claim rendered visual validation. Superseded comments are hidden, and internal-only changes remain quiet.

Changelog

New

  • PR area labels: overlapping area: labels for React, docs, CI, Storybook, MCP, and other workspaces/tooling; stale-label cleanup, rename handling, and explicit incomplete-file failures.
  • PR public impact: exactly one risk: high|medium|low|none label, consumer-impact comparisons for public changes, and Actions-only incomplete reporting.
  • Contributor documentation and nine deterministic area-label test cases; compiled agentic workflow included.

Changed

  • CI runs the area-label tests with Node's built-in test runner.

Removed

Rollout strategy

  • No rollout required — Automation, tests, and contributor documentation only; no published package changes. Use skip changeset.

Testing & Reviewing

Review the trusted-actor gate and risk rubric, especially the distinction between internal-only changes, optional API additions, and shared-behavior changes. After merging, exercise those cases and a follow-up commit that removes the public change: labels should refresh, unrelated labels should survive, and obsolete comparisons should be hidden.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@joshblack
joshblack requested a review from a team as a code owner November 24, 2026 18:28
@joshblack
joshblack requested review from francinelucca and a balanced review from Copilot November 24, 2026 18:28
@changeset-bot

changeset-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 466135a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@joshblack
joshblack marked this pull request as draft November 24, 2026 18:28
@joshblack joshblack added the skip changeset This change does not need a changelog label Nov 24, 2026 — with Copilot SWE Agent
@github-actions github-actions Bot added the staff Author is a staff member label Nov 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Remaining issue reporters can create repository issues outside the documented triggering-PR-only mutation boundary and must be disabled in the authored workflow before regenerating the lock file.

1 open issue
What changed in this PR

Adds advisory PR classification to Primer React’s automation, helping reviewers identify affected areas and understand consumer-facing risk without executing PR code.

Changes:

  • Adds deterministic, overlapping area labels with rename handling and stale-label cleanup.
  • Adds a trusted-actor Copilot workflow for public-package risk labels and source-backed before/after comparisons.
  • Documents operation and safety boundaries, and adds nine area-label tests to CI.
File Description
contributor-docs/​pr-classification.md Documents classification, risk levels, safety, and maintenance.
.github/​workflows/​pr-public-impact.md Defines assessment rules, actor restrictions, and safe outputs.
.github/​workflows/​pr-public-impact.lock.yml Adds the compiled assessment workflow.
.github/​workflows/​pr-area-labels.yml Applies path-based labels while preserving unrelated labels.
.github/​workflows/​ci.yml Runs area-label tests in CI.
.github/​scripts/​pr-area-labels.test.mjs Tests mappings, cleanup, freshness checks, and API failures.

Review effort: Balanced

Comment on lines +46 to +49
report-incomplete:
create-issue: false
threat-detection:
report-as-issue: false
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

This branch was successfully deployed

2 active (outdated) deployments
storybook-preview-8836 — 0524c048 Deployed Nov 24, 2026 by github-actions[bot]
github-pages — 0524c048 Deployed Nov 24, 2026 by joshblack via deploy-preview #34520
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants