fix(connections): preserve reconnect approval gates

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-08-21 01:55:23 +00:00
1 parent a256d2ebd7
commit 9fd0a1b9c7
2 files changed
+6 -10

No files matched your search

@@ -6103,7 +6103,12 @@ describeEmbeddedPostgres("tool access service", () => {
await expect(db.select().from(toolPolicies).where(and(
eq(toolPolicies.companyId, company.id),
eq(toolPolicies.enabled, true),
))).resolves.toHaveLength(0);
))).resolves.toEqual([
expect.objectContaining({
policyType: "require_approval",
selectors: { catalogEntryId: updateEntry.id },
}),
]);
});
it("stops and restarts local stdio runtime slots through the board service", async () => {
-9
View File
@@ -4266,15 +4266,6 @@ export function toolAccessService(db: Db, options: ToolAccessServiceOptions = {}
activeCatalogEntryIds: activeEntries.map((entry) => entry.id),
actor,
});
if (refreshOptions.enableAllByDefault) {
await upsertAskFirstPolicies({
companyId: updatedConnection.companyId,
connection: updatedConnection,
askFirstEntries: [],
actor,
});
}
await audit({
companyId: connection.companyId,
connectionId: connection.id,