Merge safe secret presence into Speko setup recovery

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* codex/speko-voice-runtime:
  fix(voice): expose callback secret presence for setup recovery
This commit is contained in:
DottaandPaperclip committed 2026-10-09 21:09:30 -05:00
commit 7f0fac26e8
2 files changed
+14 -1

No files matched your search

@@ -63,6 +63,15 @@ const support = await getEmbeddedPostgresTestSupport();
return { companyId, endpointId, agentId, connectionId, issueId, conversationId, callerId, sessionId, store, request, reserved, accept, toolInput, publication };
}
it("reports signing-secret presence for interrupted setup without returning credential refs", async () => {
const f = await fixture();
const chat = chatChannelService(db, {heartbeat: {wakeup: vi.fn()}});
expect((await chat.get(f.endpointId)).setup.webhookSecretConfigured).toBe(false);
await db.update(toolConnections).set({credentialSecretRefs: [{configPath: "credentials.signingSecret", secretId: randomUUID()}]}).where(eq(toolConnections.id, f.connectionId));
const endpoint = await chat.get(f.endpointId);
expect(endpoint.setup.webhookSecretConfigured).toBe(true);
expect(endpoint).not.toHaveProperty("credentialSecretRefs");
});
it("deduplicates concurrent session requests before creating a second task", async () => {
const f = await fixture();
const results = await Promise.all([f.store.reserve(f.request), f.store.reserve(f.request)]);
+5 -1
View File
@@ -5886,7 +5886,11 @@ export function chatChannelService(db: Db, options: ChatChannelServiceOptions) {
(ref) => ref.configPath === "credentials.webhookSecret",
),
}
: {}),
: endpoint.provider === "speko" ? {
webhookSecretConfigured: row.credentialSecretRefs.some(
(ref) => ref.configPath === "credentials.signingSecret",
),
} : {}),
},
healthMessage: endpoint.healthMessage,
lastError: endpoint.lastError,