Repository navigation
feat(launchd): write health-check fallback log to $WORKSPACE/logs/ - #914
Merged
Merged
Conversation
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>
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>
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.
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+StandardErrorPathswitch from__REPO__/logs/→__WORKSPACE__/logs/. Header comment updated.src/install-health-check-launchd.sh: resolve$WORKSPACEat top (env override +~/.sutando/workspacefallback),mkdir -p "$WORKSPACE/logs"instead of"$REPO/logs", add__WORKSPACE__to sed substitutions.Migration
Re-installation is idempotent —
bash src/install-health-check-launchd.shbootouts + 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.shcleanWORKSPACE=$HOME/.sutando/workspace:StandardOutPath+StandardErrorPathboth resolve to/Users/wangchi/.sutando/workspace/logs/health-check-launchd.logbash src/install-health-check-launchd.sh, verify next fire writes to new path🤖 Generated with Claude Code