MetaMask / MetaMask/metamask-extension

Storage Resilience E7: Degraded Persistence Mode (quota / no-space UX)

Open
#44,259 1 comment 0 reactions 1 assignee Claimed by @MajorLift View on GitHub
epic for-migration mig-epic-67-child ta-triaged
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### What is this about?

## Goal
Treat quota / disk-space / backend-unavailable errors as their own class with visible UX, not generic persistence errors.

## Why
Rotating keys or retrying writes makes no-space worse. Users need to know their changes may not be saved. (H9 — high)

## Success criteria
- Extension enters a visible degraded mode on `FILE_ERROR_NO_SPACE`, repeated manifest-commit failures across replica copies, or inability to write a persistence health marker.
- New durable wallet operations are blocked until either a safe write succeeds or the user explicitly acknowledges the risk.
- Bypass path is explicit, logged, and reviewed by product + security.
- Entry / exit / bypass / failure-class events on their own Sentry stream.

## Tasks
- [ ] Product + design spec for the degraded-persistence UI and the acknowledgement flow.
- [ ] Implement `PersistenceHealthMonitor` — writes a small marker on a schedule, tracks the recent failure class, decides when to enter/exit degraded mode.
- [ ] Gate durable-state-creating operations (send TX, add account, add network, sign, connect dapp) on the persistence-health check.
- [ ] Emit telemetry: `degraded-persistence-entered`, `degraded-persistence-bypass`, `degraded-persistence-exit`.
- [ ] Backup / export guidance where product + security approve.
- [ ] Security review of the bypass path.

## Dependencies
- **Depends on:** E6 (failure-class telemetry: separated quota/no-space stream).
- **Shares implementation surface with:** E8.

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.