fix(pulse): read Bunker monitor state from the USER tree, not ~/.bunker - #2113
Open
pai-scaffolde wants to merge 1 commit into
Open
fix(pulse): read Bunker monitor state from the USER tree, not ~/.bunker#2113pai-scaffolde wants to merge 1 commit into
pai-scaffolde wants to merge 1 commit into
Conversation
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproduced on a LifeOS 7.40.4 install (macOS, Claude Code in the Claude desktop app) running a local Bunker reference implementation that writes its state under the USER tree; the fix was applied to that install and run there before filing.
Observed
The Pulse overview (
/api/telos/overview: live projects, status metrics, team) never showed any Bunker-monitored app, while the monitor state file existed at<USER data home>/PULSE/Bunker/monitor-state.jsonnext to the Bunker shots the bunker module reads.Root cause
LIFEOS/PULSE/Observability/observability.ts:4018hardcodesBUNKER_STATE_FILE = join(HOME, ".bunker", "monitor-state.json")— a home-relative dot-directory outside both the config root and the USER data home.BunkerSystem.md(release note) says per-app Bunker state lives in the user tree;SystemUserBoundary.mdplaces all per-install state under the USER data home;PULSE/modules/bunker.tsalready keeps its Bunker data inUSER/PULSE/Bunker/. The path predates the boundary and nothing else in the tree references~/.bunker.Fix
Resolve the file as
join(USER_DIR, "PULSE", "Bunker", "monitor-state.json")—USER_DIRis the constant the rest of observability.ts already uses for USER-tree reads (it resolves through theLIFEOS/USERsymlink to the data home), andPULSE/Bunker/is the directory bunker.ts uses.readBunkerState()and its three consumers are unchanged. An existing~/.bunker/monitor-state.jsonmoves toUSER/PULSE/Bunker/.How tested
Probe:
startObservability({enabled:true}),GET /api/telos/overviewthroughhandleObservabilityRequest,HOMEpointed at a temp dir holding.claude/LIFEOS/USER/PULSE/Bunker/monitor-state.jsonwith one green appdemo-app:Transpiles. On the live install the overview now lists the monitored apps after a Pulse restart.
🤖 Generated with Claude Code