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: add !Array.isArray guards for individual record objects in manifest parsers

[._.]/ Adam Eivy6fa3e0efa381
diff --git a/server/services/brainParity.js b/server/services/brainParity.js
index 1b115769e1..38f83fff4d 100644
--- a/server/services/brainParity.js
+++ b/server/services/brainParity.js
@@ -107,7 +107,7 @@ function normalizeRemoteManifest(body) {
const rows = types[type];
if (!Array.isArray(rows)) continue;
out[type] = rows
- .filter((r) => r && typeof r === 'object' && isNonEmptyStr(r.id))
+ .filter((r) => r && typeof r === 'object' && !Array.isArray(r) && isNonEmptyStr(r.id))
.map((r) => ({ id: r.id, updatedAt: r.updatedAt ?? null, deleted: r.deleted === true }));
}
return out;
@@ -130,7 +130,7 @@ function manifestFromSnapshot(snapshot) {
const byId = records[type];
if (!byId || typeof byId !== 'object' || Array.isArray(byId)) continue;
out[type] = Object.entries(byId)
- .filter(([, rec]) => rec && typeof rec === 'object')
+ .filter(([, rec]) => rec && typeof rec === 'object' && !Array.isArray(rec))
.map(([id, rec]) => ({ id, updatedAt: rec.updatedAt ?? null, deleted: rec._deleted === true }));
}
return out;