Skip to content

Add AI-assisted Meta import risk triage for pull requests - #60289

Merged
cipolleschi merged 3 commits into
react:mainfrom
cortinico:codex/meta-import-risk
Nov 26, 2026
Merged

cipolleschi merged 3 commits into
react:mainfrom
cortinico:codex/meta-import-risk

Conversation

@cortinico

@cortinico cortinico commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Add a trusted-base pull_request_target workflow that labels new or updated PRs requiring a Meta import. Dependency manifests/lockfiles or an existing high-risk label force review. A tool-free Muse Spark pass assesses the actual patch for other risks: native React Native core, Yoga and Hermes changes are not labeled just for touching those directories. A typo or comment-only native change can remain low risk, while a behavioral change can be escalated. Ordinary JavaScript, Markdown and workflow-only changes are normally low risk but can also be escalated when their diff warrants it.

The read-only classification job uses the existing EXPO_CODE_REVIEW_API_KEY repository secret as a Meta Model API credential. A separate job with issues:write applies Meta Review Required and creates that label on first use. If the AI cannot cover the whole diff or returns an invalid response, the check fails and the label is applied conservatively. Labels already applied are retained after later PR updates.

Changelog:

[INTERNAL] [ADDED] - Add AI-assisted Meta import risk triage for pull requests.

Test Plan:

  • npx --yes jest@29.7.0 --config '{"transform":{},"testEnvironment":"node","testRegex":"metaImportRisk-test.js$","modulePathIgnorePatterns":["/scripts/releases/__tests__/__fixtures__/"]}' --runInBand .github/workflow-scripts/__tests__/metaImportRisk-test.js — 14 tests passed.
  • npx --yes prettier@3.10.0 --check .github/workflows/meta-import-risk.yml .github/workflow-scripts/metaImportRisk.js .github/workflow-scripts/__tests__/metaImportRisk-test.js — passed.
  • ruby -e "require 'yaml'; YAML.load_file('.github/workflows/meta-import-risk.yml'); puts 'YAML valid'" — passed.
  • git diff --check — passed.
  • Could not run yarn test because repository dependencies are not installed in this checkout. Live Muse/GitHub Actions validation requires the workflow to be on the base branch and access to the configured secret.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 25, 2026
@cortinico
cortinico marked this pull request as ready for review November 25, 2026 16:51
Comment thread .github/workflows/meta-import-risk.yml Resolved
@cipolleschi
cipolleschi merged commit 63835d3 into react:main Nov 26, 2026
91 of 92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants