From 0de3b9694e6fd7c635f7f2015847542dd6127b37 Mon Sep 17 00:00:00 2001 From: pai-scaffolde Date: Fri, 11 Sep 2026 17:10:52 -0700 Subject: [PATCH] fix(pulse): read Bunker monitor state from the USER tree, not ~/.bunker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit observability.ts read Bunker monitor state from ~/.bunker/monitor-state.json, a home-relative dot-directory outside both the config root and the USER data home. BunkerSystem.md says per-app Bunker state lives in the user tree and SystemUserBoundary.md places every piece of per-install state under the USER data home; PULSE/modules/bunker.ts already keeps its Bunker data (shots) in USER/PULSE/Bunker/. The overview therefore never saw a monitor state written where the boundary says it belongs. Resolve the file as USER_DIR/PULSE/Bunker/monitor-state.json — the same USER path convention the rest of observability.ts uses and the directory bunker.ts reads from. The path predates the boundary; no other consumer references ~/.bunker. Co-Authored-By: Claude Fable 5.1 --- LifeOS/install/LIFEOS/PULSE/Observability/observability.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/LifeOS/install/LIFEOS/PULSE/Observability/observability.ts b/LifeOS/install/LIFEOS/PULSE/Observability/observability.ts index 787cf2861c..ce0f38cb13 100644 --- a/LifeOS/install/LIFEOS/PULSE/Observability/observability.ts +++ b/LifeOS/install/LIFEOS/PULSE/Observability/observability.ts @@ -4015,7 +4015,12 @@ function buildRecommendedNextAction( // and USER identity files parsed at request time. No values are invented and // no user-identifying content is hardcoded here (this file ships in releases). -const BUNKER_STATE_FILE = join(HOME, ".bunker", "monitor-state.json") +// Bunker monitor state is per-install USER data (BunkerSystem.md: per-app state +// lives in the user tree; SystemUserBoundary.md: all per-install state under the +// USER data home). It sits with the rest of the Bunker data in USER/PULSE/Bunker/ +// — the same directory PULSE/modules/bunker.ts reads shots from — not in a +// home-relative dot-directory outside both the config root and the USER tree. +const BUNKER_STATE_FILE = join(USER_DIR, "PULSE", "Bunker", "monitor-state.json") interface BunkerAppState { status: "green" | "red"; failing: string[]; since: string }