Skip to content

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

fix: keep activity test notes out of production memory

[._.]/ Adam Eivyd4a63d67f4ef
diff --git a/server/services/systemActivityNotify.js b/server/services/systemActivityNotify.js
index 9895aa3627..92244f8fde 100644
--- a/server/services/systemActivityNotify.js
+++ b/server/services/systemActivityNotify.js
@@ -22,6 +22,7 @@ let seq = 0;
let timer = null;
let pending = null;
const notes = [];
+const captureTestNotes = process.env.NODE_ENV === 'test' || Boolean(process.env.VITEST);
let armed = false;
let previousMind = null;
const unsubs = [];
@@ -32,7 +33,7 @@ export function bindSystemActivityIo(next) {
export function noteSystemActivity(source, phase) {
if (!ACTIVITY_SOURCES.has(source) || typeof phase !== 'string' || !phase) return;
- notes.push({ source, phase });
+ if (captureTestNotes) notes.push({ source, phase });
pending = { source, phase };
if (timer) return;
timer = setTimeout(flushSystemActivity, SYSTEM_ACTIVITY_COALESCE_MS);