feat: optimize update lavamoat policies#41479
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [39b66d1]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [a3a95b3]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8f29b1f. Configure here.
|
@metamaskbot update-policies |
|
Policy update failed. You can review the logs or retry the policy update here |
This reverts commit 78f553d.
|
Builds ready [77a349d]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|




Description
How it works
Changelog
CHANGELOG entry:
Related issues
Fixes: MetaMask/MetaMask-planning#7150
Manual testing steps
Screenshots/Recordings
Not applicable
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it rewires the
@metamaskbot update-policiesautomation to depend on selecting the correct CI run and applying downloaded patch artifacts, which could fail silently or apply unexpected diffs if mis-scoped.Overview
Reworks the
@metamaskbot update-policiesworkflow to stop re-generating policies locally and instead locate the PR’smain.ymlCI run, download the LavaMoat policy diff artifacts,git applythem, and commit/push the result.Updates
validate-lavamoat-policies.ymlto emit.patchartifacts on working-tree-dirty failures, enabling the update workflow to apply those exact diffs; also adds concurrency control and clearer PR comments for “validation still running”, “no changes”, and failure cases.Reviewed by Cursor Bugbot for commit 77a349d. Bugbot is set up for automated code reviews on this repo. Configure here.