fix: honor OPENCLAW_HOME defaults#85802
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-24 03:05 UTC / May 23, 2026, 11:05 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
PR Surface View PR surface stats
Summary Reproducibility: yes. at source level: current main derives the update dev checkout from PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the bounded Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main derives the update dev checkout from Is this the best way to solve the issue? Yes, with merge-safety review: the patch uses the existing TypeScript home resolver for update-cli and bounded shell helpers for installers while preserving explicit overrides and the HOME-based CLI prefix. The safer remaining step is validation of upgrade behavior, not a different code direction. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 841cb121fb70. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Neon Diff Drake Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
b4b30db to
16af92e
Compare
f61859d to
4b7fb7b
Compare
4b7fb7b to
f974ddd
Compare
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
* fix(doctor): prune stale bundled plugin paths (openclaw#85038) * fix: honor OPENCLAW_HOME defaults (openclaw#85802) * fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns * fix(config): do not suppress recovery retry after failed backup restore (openclaw#85787) maybeRecoverSuspiciousConfigRead unconditionally recorded lastObservedSuspiciousSignature in health state even when restoredFromBackup was false (copyFile failed). The guard at resolveConfigReadRecoveryContext then prevented the same signature from ever being retried, permanently accepting the suspicious config on every subsequent launch. Only record the dedup signature when the backup restore actually succeeded. * fix(docker): restore config parent ownership * fix(pi-runner): flush blocks after compaction retry (openclaw#85288) (thanks @spacegeologist) Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior. Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body. Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings. Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out. What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path. Thanks @spacegeologist. Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com> * feat(gateway): forward OpenAI sampling params (openclaw#84094) Forward OpenAI-compatible frequency_penalty, presence_penalty, and seed params through the gateway/chat-completions path while keeping Responses untouched. Verification: - pnpm test src/gateway/openai-http.test.ts src/agents/pi-embedded-runner/extra-params.sampling.test.ts src/agents/openai-transport-stream.test.ts - CI passed on head 9abb946 after rerunning cancelled jobs: preflight, critical quality network-runtime-boundary, security high, checks, docs, Real behavior proof. Co-authored-by: lellansin <lellansin@gmail.com> * fix: correct build errors from cherry-pick merges - Add missing topP field to AgentStreamParams in shared-types.ts - Replace missing resolveAliasedParamValueFromKeys with existing resolveAliasedParamValue in extra-params.ts - Fix onBlockReplyFlush bare variable reference to params.onBlockReplyFlush in attempt.ts * fix: add missing topP to BaseStreamOptions * fix: add missing openai-http helpers (resolveResponseFormat, resolveErrorMessage, validateOpenAiSamplingParams) * fix(tests): revert context-engine test to origin/main state (ported tests need upstream infrastructure) * fix(tests): restore local import paths broken by upstream cherry-picks * fix(tests): fix remaining cherry-pick compat issues for gemmaclaw - openai-http.ts: add FailoverError import, pass streamParams through buildAgentCommandInput, add integer check for seed param, handle FailoverError format reason as 400 in catch block - openai-http.test.ts: add missing FailoverError import - dockerfile.test.ts: use gemmaclaw stage name base-\${OPENCLAW_VARIANT} instead of upstream base-runtime - test/scripts/install-sh.test.ts: remove test file added by cherry-pick 762ae06; it tests apt_get wrapper, npm freshness, macOS Homebrew, and duplicate-install detection from unported companion commits; file was never on gemmaclaw main --------- Co-authored-by: Gio Della-Libera <giodl73@gmail.com> Co-authored-by: Sebastien Tardif <SebTardif@ncf.ca> Co-authored-by: sallyom <somalley@redhat.com> Co-authored-by: Zee Zheng <zheng.zuo0@gmail.com> Co-authored-by: Lellansin Huang <Lellansin@gmail.com>
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
* fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns
Summary
OPENCLAW_HOMEcontract whenOPENCLAW_GIT_DIRis not set.install.shandinstall-cli.shdefaults for git checkout, CLI prefix, installer onboarding workspace, and legacy config checks withOPENCLAW_HOMEwhile preserving explicit overrides.Fixes #54014.
Verification
OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 CI=1 node scripts/run-vitest.mjs src/cli/update-cli.test.ts test/scripts/install-sh.test.ts test/scripts/install-cli.test.ts src/infra/home-dir.test.ts src/config/paths.test.ts src/agents/agent-scope.test.tsgit diff --check HEAD~1 HEADbash -n scripts/install.sh scripts/install-cli.shcorepack pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/cli/update-cli/shared.ts src/cli/update-cli.test.ts test/scripts/install-sh.test.ts test/scripts/install-cli.test.ts docs/help/environment.md docs/cli/update.md docs/install/installer.md docs/install/development-channels.mdcorepack pnpm exec oxlint src/cli/update-cli/shared.ts src/cli/update-cli.test.ts test/scripts/install-sh.test.ts test/scripts/install-cli.test.tscodex review --base origin/main-> no actionable regressionsblacksmith-testbox, idtbx_01ksb14y96m92ymhqsnh82gf32, Actions run https://github.com/openclaw/openclaw/actions/runs/26340143430, commandpnpm check:changed, exit 0Real behavior proof
Behavior addressed:
OPENCLAW_HOMEis no longer ignored by default dev checkout, installer onboarding, and CLI installer path defaults when explicit path overrides are absent.Real environment tested: WSL Ubuntu 24.04 durable checkout, branch
fix-54014-openclaw-home-paths, local head3b0d64eae6dbd0968d4252bcc7017408bdf046c8; broad validation on Blacksmith Testbox through Crabbox.Exact steps or command run after this patch: focused Vitest command above, shell syntax check, format/lint checks, Codex review, and Testbox
pnpm check:changedvianode scripts/crabbox-wrapper.mjs run --provider blacksmith-testbox ....Evidence after fix: regression tests prove
resolveGitInstallDir()uses$OPENCLAW_HOME/openclaw, creates the fresh custom-home parent before clone,install.shuses$OPENCLAW_HOMEfor git/workspace/onboarding defaults, andinstall-cli.shuses$OPENCLAW_HOMEfor default prefix/git paths.Observed result after fix: 7 focused test files passed with 291 tests; local static checks passed; Codex review found no actionable regressions; Testbox
pnpm check:changedpassed with exit 0.What was not tested: a live package install/update against an installed production OpenClaw binary was not executed; behavior is covered by path/default regression tests plus the changed-gate Testbox run.
2026-05-23 update
Addressed the ClawSweeper blockers after rebasing onto current
origin/main:scripts/install-cli.shdefault install prefix at$HOME/.openclaw;OPENCLAW_HOMEstill controls the local git checkout and related OpenClaw home paths.$HOME/.openclaw/openclaw.jsonor$HOME/.clawdbot/clawdbot.jsonexists andOPENCLAW_CONFIG_PATHis not explicit, so existing installs are not prompted again after settingOPENCLAW_HOME.Validation:
Installer behavior proof from temp dirs using the sourced installer paths:
This exercises the installer functions directly without doing a network package install.
2026-05-23 ShellCheck update
Fixed the installer tilde-match patterns flagged by Website Installer Sync ShellCheck (
SC2088) by using escaped literal\~patterns forOPENCLAW_HOMEvalues such as~/....Validation after this patch:
CI note: the prior run also showed shared unrelated failures in
check-lint,check-test-types, andcheck-additional-extension-bundledthat do not point at this PR's files, plus a gateway runtime shard no-output timeout.