Skip to content

Commit 96f64d5

Browse files
committed
fix: satisfy model picker delivery lint guards
Narrow observed final-delivery promises before aggregation and avoid a shadowed test catalog binding. Targeted lint and 278 reply regressions pass.
1 parent a722461 commit 96f64d5

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/auto-reply/reply/dispatch-from-config.finalize.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ export async function finalizeDispatchAndAudit(state: ExecuteDispatchReadyState)
361361
channelTransformSuppressed ||=
362362
noVisibleReplyFallbackAllowed() &&
363363
finalDeliveries.length > 0 &&
364+
finalDeliveries.every((outcome) => outcome !== undefined) &&
364365
(await Promise.all(finalDeliveries)).every((outcome) => outcome === "channel-transform");
365366
sessionWriterDeliveryRevoked ||= replies.some(
366367
(reply) => !state.isSessionWriterDeliveryAuthorized(reply),

‎src/auto-reply/reply/get-reply-native-slash-fast-path.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ describe("maybeResolveNativeSlashCommandFastReply", () => {
114114
body: string,
115115
config?: OpenClawConfig,
116116
response: { shouldContinue: boolean; reply?: { text: string } } = { shouldContinue: true },
117-
preparedModelCatalog?: ModelCatalogSnapshot,
117+
preparedCatalog?: ModelCatalogSnapshot,
118118
) {
119119
handleCommandsMock.mockResolvedValue(response);
120120
const commandName = body.slice(1).split(/\s+/, 1)[0] ?? "";
@@ -152,7 +152,7 @@ describe("maybeResolveNativeSlashCommandFastReply", () => {
152152
agentCfg: config?.agents?.defaults,
153153
commandAuthorized: true,
154154
typing,
155-
preparedModelCatalog,
155+
preparedModelCatalog: preparedCatalog,
156156
});
157157

158158
return { result, typing, storePath: resolvedConfig.session?.store };

0 commit comments

Comments
 (0)