6.0.0 installer: DeployComponents leaves __BUN_PATH__ unsubstituted in com.lifeos.pulse.plist (launchd exit 78)
Component: LifeOS/Tools/DeployComponents.ts (pulse component), LifeOS 6.0.0 skill payload.
What happens: deploying the pulse component materializes ~/Library/LaunchAgents/com.lifeos.pulse.plist with __HOME__ correctly substituted, but ProgramArguments[0] is left as the literal __BUN_PATH__. launchd then fails the service with last exit code = 78: EX_CONFIG and the post-apply healthz probe reports healthz → 000.
Repro: fresh LifeOS 6.0.0 install on macOS (Apple Silicon, bun at ~/.bun/bin/bun) → Setup workflow step 7 → bun Tools/DeployComponents.ts --apply --components pulse → plutil -p ~/Library/LaunchAgents/com.lifeos.pulse.plist shows __BUN_PATH__.
Workaround: sed -i '' 's|__BUN_PATH__|'$(which bun)'|' ~/Library/LaunchAgents/com.lifeos.pulse.plist && launchctl bootout gui/$UID/com.lifeos.pulse; launchctl bootstrap gui/$UID ~/Library/LaunchAgents/com.lifeos.pulse.plist — service then runs and healthz returns 200.
Suggested fix: substitute __BUN_PATH__ the same way __HOME__ is handled when materializing the plist.
(Also noticed: Pulse's dashboard 503s until a one-time bun install && bun run build in PULSE/Observability — if the build can't ship prebuilt, the deployer could run it as part of apply.)
Confirming this still reproduces on 6.0.5 (macOS, Apple Silicon, bun at ~/.bun/bin/bun), so the bug has persisted across 6.0.0 to 6.0.5. Identical symptom: com.lifeos.pulse fails with last exit code = 78: EX_CONFIG, port 31337 has no listener, and healthz returns 000. Running bun run pulse.ts directly works fine, which isolates the fault to the plist, not the daemon.
Exact location in the 6.0.5 payload:
- Template
install/LIFEOS/PULSE/com.lifeos.pulse.plistline 10 ships<string>__BUN_PATH__</string>inProgramArguments[0]. Tools/DeployComponents.ts(around line 159) materializes it withreadFileSync(plistSrc, "utf-8").replaceAll("__HOME__", ctx.home), which substitutes__HOME__only and never touches__BUN_PATH__.
The plist already resolves bun on PATH (__HOME__/.bun/bin in EnvironmentVariables.PATH), so the one-line fix is to chain a second replace when materializing, using the bun path DetectEnv already computes, for example .replaceAll("__BUN_PATH__", ctx.bunPath) (or ${ctx.home}/.bun/bin/bun).
Also confirming the parenthetical: the dashboard 503s on 6.0.5 too until a one-time cd PULSE/Observability && bun install && bun run build. The voice and hooks API on 31337 work regardless of the dashboard build.
Thanks for the sharp report and the workaround. This is fixed in the development source via a deployer rework: the pulse component's plist install is now delegated to PULSE/manage.sh, which substitutes both __HOME__ and __BUN_PATH__ when materializing the plist (same for the systemd unit), so launchd gets an absolute bun path. Your note about the one-time Observability build is on our radar in the same deployer workstream. Ships with the next release. Closing as integrated.