fix(fleet): complete HB reader/writer consistency + sidecar hardening #599

Merged
jason.woltje merged 1 commits from feat/f3-hb-consistency into main 2026-06-22 01:22:36 +00:00
Owner

Closes #598 · refs #588. Follow-on to #595 — the 3 quick items from your review: defaultMosaicHome honors MOSAIC_HOME env (systemd guard now uses the literal home); heartbeatPath honors MOSAIC_HEARTBEAT_RUN_DIR; sidecar printf %q hardening. + vitest path-resolution coverage. prettier clean. Deferred (need deeper work, next milestone): agent-watch viewer-leak try/finally + the workdir-assumption fix in test-start-agent-session.sh.

Closes #598 · refs #588. Follow-on to #595 — the 3 quick items from your review: defaultMosaicHome honors MOSAIC_HOME env (systemd guard now uses the literal home); heartbeatPath honors MOSAIC_HEARTBEAT_RUN_DIR; sidecar printf %q hardening. + vitest path-resolution coverage. prettier clean. **Deferred** (need deeper work, next milestone): agent-watch viewer-leak try/finally + the workdir-assumption fix in test-start-agent-session.sh.
jason.woltje added 1 commit 2026-06-21 23:31:22 +00:00
fix(fleet): complete heartbeat reader/writer consistency + sidecar hardening
Some checks failed
ci/woodpecker/pr/ci Pipeline is pending
ci/woodpecker/push/ci Pipeline failed
e30293950a
F3 follow-on to #595 (HB consistency) — the items flagged in the #595 review:
- defaultMosaicHome() honors MOSAIC_HOME env (not just --mosaic-home flag), so the
  reader matches the writer/launcher when MOSAIC_HOME is set in the shell. The
  systemd guard now checks the LITERAL ~/.config/mosaic (units use %h paths).
- heartbeatPath() honors MOSAIC_HEARTBEAT_RUN_DIR (the writer sidecar's override).
- sidecar: printf %q the interpolated hb path / pid / interval (defense-in-depth).
- vitest: heartbeatPath env-resolution coverage.

Deferred to next F3 milestone (need deeper code work): agent-watch viewer-leak
try/finally fix, and the test-start-agent-session.sh workdir-assumption fix.

Refs #588 #542

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jason.woltje merged commit 6ffb27787e into main 2026-06-22 01:22:36 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#599