Skip to content

feat(launchd): write health-check fallback log to $WORKSPACE/logs/ - #914

Merged
sonichi merged 1 commit into
mainfrom
feat/launchd-plist-workspace
May 20, 2026
Merged

sonichi merged 1 commit into
mainfrom
feat/launchd-plist-workspace

Conversation

@sonichi

@sonichi sonichi commented May 20, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up #2 to PR #911 (per Mini's review). Aligns the launchd-supervised health-check fallback job with the workspace-vs-repo split landed in #911. The plist still wrote its log to __REPO__/logs/ via sed substitution; switching to __WORKSPACE__/logs/ keeps everything under the same runtime root.

Changes (3-file diff — Mini explicitly said scope must include all three)

  • src/launchd/com.sutando.health-check-fallback.plist: StandardOutPath + StandardErrorPath switch from __REPO__/logs/ → __WORKSPACE__/logs/. Header comment updated.
  • src/install-health-check-launchd.sh: resolve $WORKSPACE at top (env override + ~/.sutando/workspace fallback), mkdir -p "$WORKSPACE/logs" instead of "$REPO/logs", add __WORKSPACE__ to sed substitutions.

Migration

Re-installation is idempotent — bash src/install-health-check-launchd.sh bootouts + bootstraps the new plist. Existing installs just need a re-run to pick up the new log path.

Test plan

  • bash -n src/install-health-check-launchd.sh clean
  • Dry-rendered plist with WORKSPACE=$HOME/.sutando/workspace: StandardOutPath + StandardErrorPath both resolve to /Users/wangchi/.sutando/workspace/logs/health-check-launchd.log
  • Re-install on a host with the existing launchd job: bash src/install-health-check-launchd.sh, verify next fire writes to new path

🤖 Generated with Claude Code

Follow-up #2 to PR #911 (per Mini's review). The launchd-supervised
health-check fallback job still wrote its log to \$REPO/logs/ via the
plist's `__REPO__/logs/health-check-launchd.log` substitution. Aligns
with the workspace-vs-repo split landed in #911.

3-file diff (matches what Mini said the scope must be — plist alone
would break since the install script does the sed substitution):

- `src/launchd/com.sutando.health-check-fallback.plist`: change
  `StandardOutPath` + `StandardErrorPath` from `__REPO__/logs/` to
  `__WORKSPACE__/logs/`. Header comment updated to reference
  \$WORKSPACE.
- `src/install-health-check-launchd.sh`: resolve \$WORKSPACE at top
  (env override + ~/.sutando/workspace fallback), `mkdir -p
  \$WORKSPACE/logs` instead of `\$REPO/logs`, add `__WORKSPACE__`
  to the sed substitutions.

Re-installation is idempotent (`bash src/install-health-check-launchd.sh`
bootouts + bootstraps the new plist), so existing installs just need a
re-run to pick up the new log path.

Smoke-tested: dry-rendered the plist with WORKSPACE=\$HOME/.sutando/
workspace — StandardOutPath / StandardErrorPath both correctly resolved to
/Users/wangchi/.sutando/workspace/logs/health-check-launchd.log.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonichi
sonichi merged commit 62ccf22 into main May 20, 2026
1 check passed
@sonichi
sonichi deleted the feat/launchd-plist-workspace branch May 20, 2026 00:25
liususan091219 pushed a commit to liususan091219/sutando-fork that referenced this pull request May 28, 2026
…onichi#914)

Follow-up sonichi#2 to PR sonichi#911 (per Mini's review). The launchd-supervised
health-check fallback job still wrote its log to \$REPO/logs/ via the
plist's `__REPO__/logs/health-check-launchd.log` substitution. Aligns
with the workspace-vs-repo split landed in sonichi#911.

3-file diff (matches what Mini said the scope must be — plist alone
would break since the install script does the sed substitution):

- `src/launchd/com.sutando.health-check-fallback.plist`: change
  `StandardOutPath` + `StandardErrorPath` from `__REPO__/logs/` to
  `__WORKSPACE__/logs/`. Header comment updated to reference
  \$WORKSPACE.
- `src/install-health-check-launchd.sh`: resolve \$WORKSPACE at top
  (env override + ~/.sutando/workspace fallback), `mkdir -p
  \$WORKSPACE/logs` instead of `\$REPO/logs`, add `__WORKSPACE__`
  to the sed substitutions.

Re-installation is idempotent (`bash src/install-health-check-launchd.sh`
bootouts + bootstraps the new plist), so existing installs just need a
re-run to pick up the new log path.

Smoke-tested: dry-rendered the plist with WORKSPACE=\$HOME/.sutando/
workspace — StandardOutPath / StandardErrorPath both correctly resolved to
/Users/wangchi/.sutando/workspace/logs/health-check-launchd.log.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant