Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: avoid returning a removed share subscription after export (#6776)
[._.]/ Adam Eivy60cb98bc030f
diff --git a/server/services/sharing/importer.js b/server/services/sharing/importer.jsindex 8d0ffa288d..b135333995 100644--- a/server/services/sharing/importer.js+++ b/server/services/sharing/importer.js@@ -1,4 +1,3 @@-import { createKeyCachedQueue } from '../../lib/createKeyCachedQueue.js';/*** Share Bucket — importer.*@@ -22,6 +21,7 @@ import { createKeyCachedQueue } from '../../lib/createKeyCachedQueue.js';* workflows have the prompt + params.*/+import { createKeyCachedQueue } from '../../lib/createKeyCachedQueue.js';import { join, basename } from 'path';import { readdir } from 'fs/promises';import { existsSync } from 'fs';diff --git a/server/services/sharing/stateConcurrency.test.js b/server/services/sharing/stateConcurrency.test.jsindex 24c29c4fc9..d0c0048dcb 100644--- a/server/services/sharing/stateConcurrency.test.js+++ b/server/services/sharing/stateConcurrency.test.js@@ -57,7 +57,7 @@ it('does not restore a subscription removed during its own export', async () =>const [sub] = await subscriptions.listSubscriptions();await subscriptions.unsubscribe(sub.id);exported.resolve({ manifestId: 'a-export' });- await subscribing;+ expect(await subscribing).toBeNull();expect(await subscriptions.listSubscriptions()).toEqual([]);});diff --git a/server/services/sharing/subscriptions.js b/server/services/sharing/subscriptions.jsindex 7dd57a2223..3905062137 100644--- a/server/services/sharing/subscriptions.js+++ b/server/services/sharing/subscriptions.js@@ -158,7 +158,7 @@ export async function subscribe({ bucketId, recordKind, recordId }) {// Export outside the state queue, then stamp only a still-live row.const exp = await runExport({ bucketId, recordKind, recordId });- if (exp) return (await stampExport(sub, exp)) || sub;+ if (exp) return stampExport(sub, exp);return sub;}