-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: Add AI PR analysis configuration and workflow #28024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f63b199
feat: Add AI PR analysis configuration and workflow
cmd-ob 48127d8
fix: Update AI PR analysis workflow to use new analyzer action
cmd-ob b5b5db9
chore: Update AI PR analysis workflow to use local analyzer action
cmd-ob b08ea7e
chore: Update AI PR analysis workflow to use remote analyzer action
cmd-ob aae1b27
chore: Update AI PR analysis workflow to use local analyzer action
cmd-ob ff576c7
chore: Update AI PR analysis workflow to use specific branch for anal…
cmd-ob b4f9333
chore: Refactor AI PR analysis workflow to streamline input handling
cmd-ob c22e7b0
feat: Add select-tags mode for AI PR analysis
cmd-ob 014d185
chore: Update AI PR analysis workflow to use specific branch for depe…
cmd-ob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| repo: metamask/metamask-mobile | ||
|
|
||
| critical: | ||
| files: | ||
| - package.json | ||
| - metro.config.js | ||
| - babel.config.js | ||
| - .detoxrc.js | ||
| keywords: | ||
| - Controller | ||
| - Engine | ||
| paths: | ||
| - app/core/ | ||
| - tests/ | ||
| - .github/workflows/ | ||
| - .github/actions/ | ||
|
|
||
| searchDirs: | ||
| - app/ | ||
| - e2e/ | ||
| - .github/ | ||
| - scripts/ | ||
| - tests/ | ||
|
|
||
| models: | ||
| default: anthropic/claude-haiku-4-5 | ||
| escalation: anthropic/claude-sonnet-4-6 | ||
| escalationThreshold: 3 | ||
|
|
||
| modes: | ||
| - pr-risk-analysis | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| [ | ||
| { | ||
| "name": "mass-critical-changes", | ||
| "description": "More than 20 critical files changed — automatic high risk", | ||
| "trigger": { | ||
| "type": "criticalFileCount", | ||
| "threshold": 20 | ||
| }, | ||
| "action": "run-all", | ||
| "result": { | ||
| "risk_score": 85, | ||
| "risk_level": "high", | ||
| "summary": "Large-scale change affecting more than 20 critical files. Manual review strongly recommended.", | ||
| "testing_recommendations": [ | ||
| "Full regression test suite recommended", | ||
| "Manual review of all critical file changes", | ||
| "Verify no breaking changes to controller initialization order", | ||
| "Check Engine startup sequence" | ||
| ] | ||
| } | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| You are analyzing MetaMask Mobile, a React Native mobile wallet for Ethereum networks (iOS and Android). | ||
|
|
||
| Your focus is **production regression risk** — the likelihood that these changes break existing user-facing functionality, introduce new bugs, or cause unexpected side effects in the shipped app. | ||
|
|
||
| Production regression risk is what matters most. Test-only changes (fixtures, mocks, helpers, E2E specs) are worth noting but should not dominate the overall score unless they also impact production code paths. | ||
|
|
||
| ARCHITECTURE OVERVIEW: | ||
|
|
||
| - Engine (app/core/Engine/) is the central orchestrator managing 70+ controllers via ComposableController | ||
| - Controllers follow MetaMask's BaseController pattern with messenger-based communication | ||
| - Redux for global state, Redux Saga for side effects, redux-persist for persistence | ||
| - React Navigation v5 for navigation | ||
| - Detox for E2E testing, Jest for unit tests | ||
|
|
||
| CRITICAL DEPENDENCY CHAINS (changes here cascade widely): | ||
|
|
||
| - NetworkController and KeyringController are Phase 2 (foundational) — changes cascade to 40+ controllers | ||
| - TransactionController depends on Network, GasFee, Keyring, and Approval controllers | ||
| - Token controllers (Tokens, TokenBalances, TokenRates, NftController) depend on Network and AssetsContract | ||
| - AccountsController depends on KeyringController | ||
|
|
||
| REGRESSION-PRONE PATTERNS: | ||
|
|
||
| - Engine.ts initialization order changes → can break app startup | ||
| - Controller messenger configuration changes (allowedActions/allowedEvents) → breaks inter-controller communication | ||
| - BACKGROUND_STATE_CHANGE_EVENT_NAMES modifications → UI state sync failures | ||
| - Direct imports between controllers (vs messenger calls) → circular dependency risk | ||
| - State schema changes without migration → data loss on app update | ||
| - Package version bumps in @metamask/\* controller packages → API surface changes | ||
|
|
||
| SIGNALS THAT INCREASE RISK: | ||
|
|
||
| - Modifying a function/class used by many consumers (high fan-out) | ||
| - Changing exported API signatures or return types | ||
| - Altering behaviour of shared utilities or hooks | ||
| - Removing or renaming exports without updating all consumers | ||
| - Changing default values or configuration | ||
| - Modifying state shapes that are persisted or serialized | ||
|
|
||
| SIGNALS THAT DECREASE RISK: | ||
|
|
||
| - Purely additive changes (new files, new exports, new optional params) | ||
| - Documentation, comments, formatting only | ||
| - Test-only changes with no production code modified | ||
| - Isolated component changes with no shared dependencies | ||
| - Adding testIDs for E2E testing | ||
|
|
||
| Use the `load_skill` tool with `metamask-core-architecture` for deeper architectural analysis when changes involve Engine, controllers, or messenger patterns. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.