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: keep the inbound origin on a relayed Brain record that lacks one (#8316)
[._.]/ Adam Eivy9a76c1b13f51
diff --git a/server/services/brainSync.js b/server/services/brainSync.jsindex 870a0ea399..d7f1d747f6 100644--- a/server/services/brainSync.js+++ b/server/services/brainSync.js@@ -42,10 +42,10 @@ export async function applyRemoteChanges(changes) {// An op our state already reflects: relay OUR copy (the state a pulling peer// should converge to). The skipLogged append drops it when the log already// carries it — the common echo case — so this never amplifies.- const relayIfCurrent = (result, op, type, id) => {+ const relayIfCurrent = (result, op, type, id, originInstanceId) => {if (result.reason !== 'local_current') return;const { current } = result;- relayBatch.push({ op, type, id, record: current, originInstanceId: current.originInstanceId });+ relayBatch.push({ op, type, id, record: current, originInstanceId: current.originInstanceId ?? originInstanceId });};for (const change of changes) {@@ -76,7 +76,7 @@ export async function applyRemoteChanges(changes) {appliedRecords.push({ type, id });} else {skipped++;- relayIfCurrent(result, op, type, id);+ relayIfCurrent(result, op, type, id, originInstanceId);}} else if (op === 'create' || op === 'update') {if (!record) { skipped++; continue; }@@ -88,7 +88,7 @@ export async function applyRemoteChanges(changes) {appliedRecords.push({ type, id });} else {skipped++;- relayIfCurrent(result, op, type, id);+ relayIfCurrent(result, op, type, id, originInstanceId);}} else {skipped++;