Skip to content

Commit 7ed78b5

Browse files
cliffhallclaude
andcommitted
chore(servers): parallel keychain deletes for symmetry (#1356)
Picks up the symmetry observation from the third review: `deleteKeychainFields` now uses `Promise.all` like its read and write siblings. Distinct (id, field) deletes have no ordering requirement, and `secretStore.delete` is already a silent no-op on unavailability so Promise.all has no failure-mode surprise. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 18012ae commit 7ed78b5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

core/mcp/remote/node/server.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,13 +1292,15 @@ export function createRemoteApp(
12921292
return obsolete;
12931293
};
12941294

1295+
// Parallel for symmetry with `readKeychainEntriesFor` /
1296+
// `writeKeychainEntriesFor`: distinct (id, field) deletes have no
1297+
// ordering requirement, and `secretStore.delete` is already a silent
1298+
// no-op on unavailability so Promise.all has no failure-mode surprise.
12951299
const deleteKeychainFields = async (
12961300
id: string,
12971301
fields: string[],
12981302
): Promise<void> => {
1299-
for (const field of fields) {
1300-
await secretStore.delete(id, field);
1301-
}
1303+
await Promise.all(fields.map((field) => secretStore.delete(id, field)));
13021304
};
13031305

13041306
const keychainErrorResponse = (

0 commit comments

Comments
 (0)