fix: invalidate Muse receivers on company archive

This commit is contained in:
Dotta committed 2026-11-16 19:20:17 -06:00
1 parent 6ae54c5cf0
commit c6af01fcb4
1 file changed
+1
+1
View File
@@ -517,6 +517,7 @@ export function companyService(db: Db, _budgetHooks: BudgetServiceHooks = {}) {
if (!wasAlreadyArchived) {
// The separate archive entry shares update()'s agent-before-mirror order.
await tx.select({ id: agents.id }).from(agents).where(eq(agents.companyId, id)).orderBy(agents.id).for("update");
await prepareMuseReceiverAuthorityMutation(tx,{companyId:id});
await notifyRunDispatch(tx, { companyId: id });
await notifyGitHubCompanyChange(tx, id);
await notifyDeferredExecutionEligibility(tx, { companyId: id });