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
test: mark readiness reset as a test-only hook (#8553)
[._.]/ Adam Eivy94ce97fe0560
diff --git a/server/services/readinessNotify.js b/server/services/readinessNotify.jsindex 6e8bad5b10..a453e745bc 100644--- a/server/services/readinessNotify.js+++ b/server/services/readinessNotify.js@@ -137,7 +137,7 @@ export async function armReadinessWatchers() {}}-export function resetReadinessForTests() {+export function __resetReadinessForTests() {subscribers.clear();stopObservation();stopWatchers?.();diff --git a/server/services/readinessNotify.test.js b/server/services/readinessNotify.test.jsindex e610366857..413b1d53e9 100644--- a/server/services/readinessNotify.test.js+++ b/server/services/readinessNotify.test.js@@ -13,7 +13,7 @@ import { getCapabilitiesSnapshot } from './capabilitiesSnapshot.js';import { settingsEvents } from './settings.js';import { cosEvents } from './cosEvents.js';import {- armReadinessWatchers, registerReadinessSocket, resetReadinessForTests,+ armReadinessWatchers, registerReadinessSocket, __resetReadinessForTests,READINESS_OBSERVE_MS, READINESS_COALESCE_MS,} from './readinessNotify.js';@@ -30,7 +30,7 @@ beforeEach(() => {getSystemHealthSnapshot.mockResolvedValue({ overallHealth: 'healthy', timestamp: 'one', system: { uptime: 1 } });getCapabilitiesSnapshot.mockResolvedValue({ summary: { overall: 'ok' }, timestamp: 'one' });});-afterEach(() => { resetReadinessForTests(); vi.useRealTimers(); });+afterEach(() => { __resetReadinessForTests(); vi.useRealTimers(); });describe('shared readiness subscription', () => {it('shares one observer, ignores clock-only changes and stops after the last unsubscribe', async () => {@@ -78,7 +78,7 @@ describe('shared readiness subscription', () => {getCapabilitiesSnapshot.mockResolvedValue({ summary: { overall: 'ok' } });await vi.advanceTimersByTimeAsync(READINESS_OBSERVE_MS);expect(a.socket.emit).toHaveBeenCalledExactlyOnceWith('capabilities:changed', {});- resetReadinessForTests();+ __resetReadinessForTests();expect(settingsEvents.listenerCount('settings:updated')).toBe(0);expect(cosEvents.listenerCount('health:check')).toBe(0);});