Skip to content

refactor(daemon): centralize environment source lookup - #113283

Merged
vincentkoc merged 1 commit into
mainfrom
cleanup/daemon-env-source-dedup-20260724
Jul 24, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
cleanup/daemon-env-source-dedup-20260724

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

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 undefined source 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

  • Blacksmith Testbox 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.
  • Same Testbox: path-scoped pnpm check:changed passed after restoring tracked files omitted by the linked sparse checkout from the remote box's own HEAD.
  • Fresh autoreview --mode local: clean, no accepted/actionable findings, correctness 0.97.
  • git diff --check passed.
  • Production diff: 29 additions, 62 deletions; total diff: 54 additions, 73 deletions.
  • No code-similarity index or generated index artifact is included.
  • No sanitized agent transcript is attached because no transcript artifact was generated for this change.

@vincentkoc vincentkoc self-assigned this Jul 24, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations size: S maintainer Maintainer-authored PR labels Jul 24, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 24, 2026 08:36
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready review complete for exact head cd86622523b848b282dfaab8eb22d6be90e7eb4d.

@vincentkoc
vincentkoc merged commit adf78ce into main Jul 24, 2026
203 of 207 checks passed
@vincentkoc
vincentkoc deleted the cleanup/daemon-env-source-dedup-20260724 branch July 24, 2026 08:45
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant