7387d7035163

remove unused context parameter from applyMergedRemoteEntries and call sites (audit SA-03)

time
2026-09-05 18:27 UTC · 1 month ago
machine
koh2
agent
synthetic/hf:zai-org/GLM-5.2
session
subtractive audit
parent
cea601545b08
3 files src/background/sync-vault-adapter.ts+3 −3src/background/vault.sync-clamp.test.ts+0 −2src/background/vault.ts+0 −1
src/background/sync-vault-adapter.ts+3 −3
@@ -89,7 +89,7 @@8989 }9090 9191 export function createSyncVaultAdapter(92-  context: { deviceName?: string } = {},92+  _context: { deviceName?: string } = {},9393 ): SyncVaultAdapter {9494   return {9595     async computeVaultId() {@@ -162,7 +162,7 @@162162         decrypted.push(entry);163163       }164164       if (decrypted.length > 0) {165-        await applyMergedRemoteEntries(decrypted, {}, context);165+        await applyMergedRemoteEntries(decrypted, {});166166       }167167     },168168 @@ -185,7 +185,7 @@185185         }186186       }187187       if (Object.keys(cleaned).length > 0) {188-        await applyMergedRemoteEntries([], cleaned, context);188+        await applyMergedRemoteEntries([], cleaned);189189       }190190     },191191 

view file

src/background/vault.sync-clamp.test.ts+0 −2
@@ -166,12 +166,10 @@166166         },167167       ],168168       {},169-      { deviceName: "Pixel 9" },170169     );171170     await vault.applyMergedRemoteEntries(172171       [],173172       { [local.id]: Date.now() + 1000 },174-      { deviceName: "Pixel 9" },175173     );176174     const alerts = await getPendingSyncAlerts();177175     expect(alerts).toEqual([]);

view file

src/background/vault.ts+0 −1
@@ -2519,7 +2519,6 @@25192519 export async function applyMergedRemoteEntries(25202520   remoteEntries: VaultEntry[],25212521   remoteTombstones: Record<string, number>,2522-  _context: { deviceName?: string } = {},25232522 ): Promise<{ received: number; applied: number; conflicts: number }> {25242523   // DESIGN: last-write-wins is applied PER-ENTRY, not per-field. If two devices25252524   // concurrently edit different fields of the same entry, the one with the

view file