MetaMask / MetaMask/metamask-extension

Reconsider the background startup liveness check

Open
#44,742 1 comment 0 reactions 0 assignees View on GitHub
exalate-duplicate INVALID-ISSUE-TEMPLATE mig-epic-68-child team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

**What is this about?**

I don't think adding a retry to the current `ALIVE` check is worthwhile. The check waits for an unsolicited message, so repeating the wait would not retry any background work.

## Goal

Reconsider what the `ALIVE` check is meant to prove and whether it is still useful before adding another timeout or retry.

## Open questions

- What failure is the `ALIVE` check intended to distinguish?
- What does receiving `ALIVE` prove that the later initialization and state-sync checks do not?
- Should the liveness check be kept, simplified, replaced, or removed?

**Technical Details**

`CriticalStartupErrorHandler` waits up to 15 seconds for an unsolicited background `ALIVE` message. There is no health-check request to resend and no operation for a retry to repeat. Waiting a second time would extend the timeout without changing the background's behavior.

**Acceptance Criteria**

- [ ] The issue records what the `ALIVE` check proves and which failure it detects.
- [ ] The issue records whether to keep, simplify, replace, or remove the check.
- [ ] A retry is added only if the review identifies a specific operation to repeat and the failure it could recover from.
- [ ] Tests cover any change to the startup checks or error behavior.

**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**

- Parent: #44260

Contributor guide

Open the contributing guide

Research direction

Start by tracing CriticalStartupErrorHandler and comparing the unsolicited ALIVE wait with the later initialization and state-sync checks. Determine what failure the check is meant to detect and whether it should be kept, simplified, replaced, or removed. Done means the decision and rationale are recorded, any retry has a specific recoverable operation, and tests cover changed startup checks or error behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.