test: MM-1388 - Create a production sync job to sync feature flags from PROD#40365
test: MM-1388 - Create a production sync job to sync feature flags from PROD#40365LeVinhGithub merged 49 commits intomainfrom
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 [a3bd0cc]
⚡ Performance Benchmarks (1400 ± 108 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
…/MetaMask/metamask-extension into harry/e2e-feature-flag-pro-fetch
Builds ready [013753e]
⚡ Performance Benchmarks (1373 ± 99 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [8b98216]
⚡ Performance Benchmarks (1354 ± 93 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [3320c25]
⚡ Performance Benchmarks (1399 ± 101 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [fad029a]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [e611fac]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [0428c9f]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [fe59565]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…/MetaMask/metamask-extension into harry/e2e-feature-flag-pro-fetch
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Builds ready [29fee1f]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [24b210c]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Builds ready [41ee615]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|



Description
1. Reason for the change: The feature flag registry (from PR #39910) must stay aligned with production. Without automation, drift between the registry and production goes unnoticed until tests fail or behave unexpectedly.
2. Improvement/solution: This PR adds a production sync job that:
test/e2e/feature-flags/feature-flag-registry.tsAdded components:
sync-production-flags.ts): CLI that fetches, compares, and prints a formatted report with colored output and a summary. Supports--checkfor CI (exit 1 on drift).yarn feature-flags:sync(manual, exit 0) andyarn feature-flags:sync:check(CI, exit 1 on drift)workflow_dispatch; creates or updates an issue with the sync report when drift is foundChangelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1388
Manual testing steps
yarn feature-flags:syncand confirm the report with drift (or "in sync" if registry matches).yarn feature-flags:sync:checkand confirm it exits 1 when there is drift.yarn test:unit test/e2e/feature-flags/sync-production-flags.test.tsand confirm all tests pass.Screenshots/Recordings
Before
N/A – this adds a new script and workflow.
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Introduces a scheduled GitHub Action that calls an external production API and notifies Slack on drift, so failures/noise or brittle parsing in the new sync tooling could impact CI signal and alerts.
Overview
Adds an automated feature-flag drift detector that compares the local
test/e2e/feature-flags/feature-flag-registry.tsagainst the production client-config flags API.Introduces a new
tsxCLI (sync-production-flags.ts) with--check(exit non-zero on drift) and--update(rewrite registry defaults) modes, plus unit tests around drift classification (new/removed/value mismatch andinProdmetadata mismatches).Adds a daily GitHub Actions workflow to run the check, upload
sync-report.jsonwhen drift is found, and post a Slack notification viaSLACK_WEBHOOK_FEATURE_FLAG_DRIFT; wires newyarn feature-flags:sync*scripts intopackage.json.Written by Cursor Bugbot for commit 41ee615. This will update automatically on new commits. Configure here.