Memex Admin

Frontend + Desktop: High-Risk Flows Require Tests

Repository: mem-labs/mem

activeUpdated Feb 19, 2026, 9:36 PM

Policy ID js78batyqan7ggfj8k11gcj3k181c4jk

High-risk frontend and desktop flows require accompanying test coverage updates.

Rationale:
- These flows are user-critical and regressions are costly to detect manually.

Scope:
- PR review policy for runtime code changes in:
  - Web app high-risk areas:
    - `domains/frontend/mem-client/src/components/onboarding/**`
    - `domains/frontend/mem-client/src/pages/oauth-consent/**`
    - `domains/frontend/mem-client/src/pages/google-oauth-redirect/**`
    - `domains/frontend/mem-client/src/pages/google-oauth-redirect-desktop/**`
    - `domains/frontend/mem-client/src/pages/integrations/calendar/*oauth-callback-page.tsx`
    - `domains/frontend/mem-client/src/store/sync/**`
    - `domains/frontend/mem-client/src/store/audio/**`
    - `domains/frontend/mem-client/src/store/audio-recordings/**`
  - Desktop app high-risk areas:
    - `domains/typescript/mem-client-desktop/src/entry.ts`
    - `domains/typescript/mem-client-desktop/src/modules/recall/**`
    - `domains/typescript/mem-client-desktop/src/modules/window/**`
    - `domains/typescript/mem-client-desktop/src/modules/auto-updater/**`
    - `domains/typescript/mem-client-desktop/src/modules/updater/**`
    - `domains/typescript/mem-client-desktop/preload/**`

Trigger:
- A PR changes runtime source in scope (excluding tests/stories/comment-only edits).

Approval checks:
1) Web-scope changes include related test updates in at least one of:
   - `domains/frontend/mem-client/src/**/*.test.*`
   - `domains/frontend/mem-client/e2e/**`
2) Desktop-scope changes include related test updates in at least one of:
   - `domains/typescript/mem-client-desktop/src/**/*.test.*`
   - `domains/typescript/mem-client-desktop/src/**/*.integration.test.*`
3) Test updates assert changed behavior for at least one affected failure or state-transition path.

Evidence:
- Diff shows runtime changes plus corresponding test assertions for changed behavior.

Exception path:
- Allow deviation only when all are true:
1) PR description includes `Policy Exception: frontend-desktop-high-risk-tests`.
2) PR explains why the change is low-risk or test-neutral.
3) PR includes alternate validation evidence.

Decision:
- Return NOT APPROVED when trigger is met and no relevant test updates are included without a valid exception.