activeUpdated Feb 19, 2026, 9:36 PM
Policy ID js7bt7m5vs3fv15e83qyrgrb7181f7sg
Desktop `window.electronAPI` type contracts must stay synchronized. Rationale: - Type-contract drift between preload and renderer declarations causes broken runtime assumptions and unsafe usage. Scope: - PR review policy for desktop API contract files: - `domains/typescript/mem-client-desktop/preload/entry.ts` - `domains/typescript/mem-client-desktop/config/typings/global.d.ts` - any shared desktop contract type files used for `electronAPI` signatures. Trigger: - A PR adds/changes/removes `window.electronAPI` method names or signatures. Approval checks: 1) Method names and signatures are synchronized across preload and renderer-facing type declarations in the same PR, or migrated to one shared contract type source. 2) Removed methods are removed from all declarations and call sites in scope. 3) Added methods include typed arguments/return types (no implicit `any` contract surface additions). Evidence: - Diff shows synchronized contract updates and type-check compatibility. Exception path: - Allow deviation only when all are true: 1) PR description includes `Policy Exception: desktop-electron-api-type-sync`. 2) PR explains temporary mismatch reason. 3) PR includes tracked follow-up owner/date to resolve contract drift. Decision: - Return NOT APPROVED when trigger is met and contract sync is missing without a valid exception.