Repository navigation
refactor(daemon): centralize environment source lookup - #113283
Merged
Merged
Conversation
vincentkoc
marked this pull request as ready for review
July 24, 2026 08:36
Member
Author
|
Land-ready review complete for exact head
|
Member
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 25, 2026
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.
What Problem This Solves
Daemon service environment provenance was looked up through four separate case-insensitive readers. Keeping those copies synchronized made install planning, service audits, and systemd staging vulnerable to subtle drift around key normalization and source classification.
Why This Change Was Made
Centralize provenance lookup in the existing managed-service environment owner and reuse it from daemon audit, install planning, and systemd staging. The helper preserves portable key normalization, first-match behavior, and existing
undefinedsource semantics; no compatibility path or new module is added.User Impact
No intended user-visible behavior change. Daemon environment repair and staging now share one provenance lookup contract, reducing maintenance risk while deleting duplicate production code.
Evidence
tbx_01ky9jm875qf0et5qbc7x66dg5:pnpm test:serial src/daemon/service-audit.test.ts src/commands/daemon-install-helpers.test.ts src/daemon/systemd.test.ts— 195 tests passed.pnpm check:changedpassed after restoring tracked files omitted by the linked sparse checkout from the remote box's ownHEAD.autoreview --mode local: clean, no accepted/actionable findings, correctness 0.97.git diff --checkpassed.