fix: unify runtime path resolution for procd services#341
Open
stehdev wants to merge 1 commit intosipeed:mainfrom
Open
fix: unify runtime path resolution for procd services#341stehdev wants to merge 1 commit intosipeed:mainfrom
stehdev wants to merge 1 commit intosipeed:mainfrom
Conversation
Centralize config/auth/global skills path derivation with PICOCLAW_CONFIG and PICOCLAW_HOME precedence so non-interactive OpenWrt services load the intended files. Always apply env overrides even when the config file is missing, and add tests for global --config parsing plus resolver precedence. Co-authored-by: Cursor <cursoragent@cursor.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.
📝 Description
This PR fixes runtime config resolution for non-interactive environments (especially OpenWrt
procd) where PicoClaw could silently fall back to defaults.Problem Summary
In service contexts, config/auth/skills paths could diverge or resolve incorrectly:
-cflag would conflict withpicoclaw cron add -c, so long-form handling is needed.What this PR changes
--config/PICOCLAW_CONFIGPICOCLAW_HOME/config.json~/.picoclaw/config.json--configparsing behavior🗣️ Type of Change
🔗 Linked Issue
No public issue for this change (internal investigation + OpenWrt repro).
📚 Technical Context (Skip for Docs)
procdand other non-interactive runtimes may not provide expected home context. Explicit runtime path precedence and unconditional env parsing remove ambiguity and make service behavior deterministic.🧪 Test Environment & Hardware
📸 Proof of Work (Optional for Docs)
Click to view Logs/Screenshots
go test ./...passes on this branch.PICOCLAW_CONFIG=<custom-path> picoclaw statusPICOCLAW_HOME=<custom-home> picoclaw statusprocdstartup validated by installing/usr/bin/picoclawand running as service.☑️ Checklist