MetaMask / MetaMask/metamask-extension

Spike: Validate `wallet-services` extraction PoC against CI

Open
#41,964 0 comments 0 reactions 0 assignees View on GitHub
INVALID-ISSUE-TEMPLATE team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

## Parent

- Epic: [#41735 — `MetamaskController` decomposition](https://github.com/MetaMask/metamask-extension/issues/41735)
- Sub-epic: [#41736 — Sub-epic A: `wallet-services` completion](https://github.com/MetaMask/metamask-extension/issues/41736)

## Context

[PR #41758](https://github.com/MetaMask/metamask-extension/pull/41758) is a CI-testing PR for the decomposition PoC branch. It extracts six `wallet-services/` modules and five extension-specific modules from `MetamaskController`, rewires `getApi()` entries, and adds `ControllerRegistry` + `PatchBuffer`. The PR is +6,234/-2,931 across 19 files including LavaMoat policy regeneration.

This spike validates whether the extraction mechanics are CI-ready and identifies blockers before Sub-epic A tickets begin merging to `main`.

## Scope

1. **CI pass/fail analysis.** Run full CI suite against the PoC branch (or a rebased variant). Categorize failures:
- LavaMoat policy drift (expected, regeneration required per extraction)
- Test failures from import path changes
- Lint failures from new module boundaries
- Type errors from messenger action wiring

2. **Extraction mechanics validation.** For each `wallet-services/` module in the PoC:
- Confirm method bodies port cleanly (no implicit `this` dependencies beyond messenger)
- Confirm `getApi()` entries can delegate via `messenger.call(...)` without forwarding stubs
- Identify any methods that require refactoring before extraction (circular deps, side effects)

3. **LavaMoat policy impact.** Quantify how many policy files change per extraction. Determine whether batched extraction or per-module extraction produces less policy churn.

4. **Blocking issues list.** Enumerate anything that must be resolved before A.1 (token-resolution, size S) can merge to `main`.

## Output

- List of CI blockers with severity (hard-block vs. mechanical fix)
- Per-module extraction readiness assessment (ready / needs refactoring / blocked)
- Recommendation on extraction order if different from epic's A.1→A.6 sequence
- LavaMoat policy churn estimate per module

## Size

S–M (investigation, no code to merge)

## References

- [PoC PR #41758](https://github.com/MetaMask/metamask-extension/pull/41758)
- [PoC branch diff](https://github.com/MetaMask/metamask-extension/compare/main...jongsun/poc/MetamaskController-decomposition)
- [Decomposition audit](https://github.com/MetaMask/metamask-extension/blob/jongsun/poc/MetamaskController-decomposition/app/scripts/lib/wallet-services/README.md)

Contributor guide

Open the contributing guide

Research direction

Start with PR #41758 or its PoC branch, run the full CI suite, and read the wallet-services README and decomposition diff. Check each extracted wallet-services module, its getApi delegation, and the related policy changes. Done means a severity-ranked blocker list, per-module readiness assessment, policy churn estimate, and any revised extraction-order recommendation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ci-cd, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.