fix(install-x64): guard openclaw config set against ConfigMutationConflictError#254
fix(install-x64): guard openclaw config set against ConfigMutationConflictError#254KrasimirKralev wants to merge 1 commit into
Conversation
β¦flictError Closes ID-Robots#193. Same bug class as ID-Robots#192 (fixed for the Jetson installer), in the x64 path. install-x64.sh:282 ran `config set gateway.controlUi.allowInsecureAuth` under `set -euo pipefail` with no retry β a ConfigMutationConflictError (OpenClaw 2026.6.x optimistic concurrency, from the live gateway or the CLI's own state migrations) aborted the install step mid-update. x64 has no gateway-pre-start.sh to defer these writes to, so the fix is the retry treatment: ported install.sh's oc_config_set (adapted to as_user), and routed all five config-set calls through it. - :282 (was unguarded β aborted on conflict) now retries 3x and only aborts on a genuine persistent failure β its original fail-loud semantics, minus the transient-conflict abort. - The four calls that took the opposite shortcut (2>/dev/null || true) β auth.mode, auth.token, allowInsecureAuth, dangerouslyDisableDeviceAuth β now retry and LOG on persistent failure (kept non-fatal with || true) instead of silently dropping the config with no trace.
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: π Files selected for processing (1)
π WalkthroughWalkthroughAdds an ChangesConfig Set Retry Handling
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Installer
participant oc_config_set
participant openclaw
Installer->>oc_config_set: gateway.auth.mode token
oc_config_set->>openclaw: config set (attempt 1)
openclaw-->>oc_config_set: ConfigMutationConflictError
oc_config_set->>openclaw: config set (attempt 2)
openclaw-->>oc_config_set: success
oc_config_set-->>Installer: return success
Possibly related PRs
π₯ Pre-merge checks | β 5β Passed checks (5 passed)
β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
π¦ ClawReviewClaws waving β here's what this change is about. Ports the At a glance
Good to know
β ClawReview π¦, scuttling off. General info only β see CodeRabbit for the detailed review. Conventions: docs. |
Closes #193.
Same bug class as #192 (fixed for the Jetson installer), now in the x64 path.
Problem
install-x64.sh:282ranconfig set gateway.controlUi.allowInsecureAuth true --jsonunderset -euo pipefailwith no retry β aConfigMutationConflictError(OpenClaw 2026.6.x optimistic concurrency, triggered by the live gateway or the CLI's own state migrations) aborts the install step mid-update. Four other calls (:354/369/371/372) took the opposite shortcut (2>/dev/null || true) β conflicts there were silently swallowed and the config just wasn't applied.Fix
x64 has no
gateway-pre-start.shto defer these writes to, so the fix is the retry treatment: portedinstall.sh'soc_config_set(adapted to x64'sas_user), and routed all five config-set calls through it.:282now retries up to 3Γ and only aborts on a genuine persistent failure β keeps its fail-loud intent, minus the transient-conflict abort.|| truecalls now retry and log on persistent failure (still non-fatal) instead of silently dropping config with no trace.Validation
bash -nclean. (No local node/bun on the dev box β installer behavior verified on device/CI per project convention.)Summary by CodeRabbit