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: carry forward the place trail on a failed Eidoverse world read (#7633)
[._.]/ Adam Eivyf7418a47d3e1
diff --git a/server/lib/eidoverseObservation.js b/server/lib/eidoverseObservation.jsindex b8d781eeee..f48b9858f6 100644--- a/server/lib/eidoverseObservation.js+++ b/server/lib/eidoverseObservation.js@@ -343,7 +343,23 @@ export function buildEidoverseObservation({attentionControllers !== null,marker?.attentionControllerIds,);- const placeStatus = Object.fromEntries(places.map(({ id, status }) => [id, status]));+ // `signalCount === null` alone is not a failed read — a district whose+ // sources are all disabled by the recipe also lands there, legitimately.+ // Only a district that actually FAILED a source read (`unreadableSources`+ // non-empty) gets the section()-equivalent carry-forward treatment: the+ // report keeps `status: 'unknown'` (built into `places` above) so the mind+ // still sees the read failed, but the committed marker — and therefore the+ // diff below — keeps the PREVIOUS marker's status for that district+ // instead of overwriting it with `unknown`. Same rule `section()` applies+ // to the three id-list sections, applied per key because this section is a+ // map rather than a list.+ const previousPlaceStatus = marker?.placeStatus && typeof marker.placeStatus === 'object' ? marker.placeStatus : {};+ const placeStatus = Object.fromEntries(places.map((place) => {+ const unreadable = place.signalCount === null && place.unreadableSources.length > 0;+ const carried = previousPlaceStatus[place.id];+ const status = unreadable && carried !== undefined ? carried : place.status;+ return [place.id, status];+ }));return {report: {diff --git a/server/lib/eidoverseObservation.test.js b/server/lib/eidoverseObservation.test.jsindex 3192a93781..e08cfc9dcd 100644--- a/server/lib/eidoverseObservation.test.js+++ b/server/lib/eidoverseObservation.test.js@@ -295,6 +295,53 @@ describe('a section that could not be read', () => {expect(recovered.report.changes.controllersNeedingAttention).toEqual([]);});+ it('leaves the place trail intact and reports no fabricated district changes when a world read fails, twice (#7633)', () => {+ // Regression for #7633: `placeStatus` was the one marker section built+ // without `section()`'s carry-forward guard. A failed world read degraded+ // every district's signal to `null`, which collapsed into status+ // 'unknown' and flowed straight into the committed marker unguarded —+ // fabricating every district as changed on the failure wake, then again+ // on recovery when the real status flipped back from the erased 'unknown'.+ // This drives the shipped builder through healthy -> outage -> identical+ // healthy and asserts both wakes report zero fabricated changes while a+ // district that genuinely changes status is still reported.+ const districts = [+ { id: 'apps', label: 'Apps', direction: 'North', landmark: 'pylon', sources: ['apps'] },+ { id: 'agents', label: 'Agents', direction: 'South', landmark: 'foundry', sources: ['agents'] },+ ];+ const includes = { apps: true, agents: true };++ const healthy = observe({+ districts,+ includes,+ source: { apps: [{ id: 'a1', status: 'active' }], agents: [{ id: 'g1', status: 'active' }] },+ });+ expect(healthy.report.places.find((place) => place.id === 'apps').status).toBe('active');++ // Total outage: both district sources fail to collect.+ const outage = observe({ districts, includes, source: {}, marker: healthy.marker });+ const outageApps = outage.report.places.find((place) => place.id === 'apps');+ // The report still tells the mind the district could not be read...+ expect(outageApps.status).toBe('unknown');+ expect(outageApps.signalCount).toBeNull();+ // ...but the failure must not fabricate a change or erase the trail.+ expect(outage.report.changes.placesChanged).toEqual([]);+ expect(outage.marker.placeStatus.apps).toBe('active');+ expect(outage.marker.placeStatus.agents).toBe('active');++ // Recovery: apps returns identical to before the outage; agents+ // genuinely goes quiet while it was unreadable.+ const recovered = observe({+ districts,+ includes,+ source: { apps: [{ id: 'a1', status: 'active' }], agents: [] },+ marker: outage.marker,+ });+ // No fabricated "recovery" change for the district that never moved...+ expect(recovered.report.changes.placesChanged).toEqual([{ id: 'agents', was: 'active', now: 'quiet' }]);+ expect(recovered.marker.placeStatus.apps).toBe('active');+ });+it('separates an unavailable controller list from one that is genuinely empty', () => {expect(observe({ controllerInstalls: null }).report.controllers.needsAttention).toBeNull();expect(observe({ controllerInstalls: [] }).report.controllers.needsAttention).toEqual([]);