Skip to content

fix: restore doctor install-switch release proof - #116190

Merged
steipete merged 1 commit into
mainfrom
fix/doctor-install-switch-default-state
Jul 30, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/doctor-install-switch-default-state

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where the doctor install-switch Docker scenario asked OpenClaw to install a daemon service while inherited non-default state and config paths were active. The release candidate correctly rejected that unsafe service-install request, so the harness could not reach the install/doctor switch behavior it owns.

Why This Change Was Made

Each install-switch flow still creates and retains an isolated temporary HOME, then clears OPENCLAW_HOME, OPENCLAW_STATE_DIR, and OPENCLAW_CONFIG_PATH before invoking daemon and doctor commands. Those commands therefore use the default $HOME/.openclaw layout while remaining fully contained in the test home. Other scenario flows keep their intentional custom-state overrides.

User Impact

The release doctor install-switch lane now tests the supported default-state service lifecycle instead of being stopped by the product's non-default-path safety guard. There is no product runtime change.

Evidence

  • bash -n scripts/e2e/lib/doctor-install-switch/scenario.sh
  • focused test/scripts/docker-build-helper.test.ts: 175 passed
  • Oxfmt and git diff --check
  • Codex autoreview: clean, no accepted or actionable findings

@steipete steipete self-assigned this Jul 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Jul 30, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 29, 2026, 10:52 PM ET / July 30, 2026, 02:52 UTC.

ClawSweeper review

What this changes

The branch clears inherited OpenClaw state and config path variables before the Docker doctor install-switch flow installs the daemon and runs doctor repair, with a focused source-text regression assertion.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 3 items remain

Keep this PR open for maintainer handling: it carries the protected maintainer label, and the review sandbox prevented the required current-main, history, scoped-policy, and maintainer-note inspection needed for a merge verdict.

Priority: P3
Reviewed head: 09ea6b67ec41682e086295b236899417ba4044e6
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is narrowly scoped and has focused test evidence, but real Docker-scenario proof is absent and the required source-level review could not complete.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR body reports shell syntax and a focused test, but it does not include after-fix Docker install-switch output; add redacted terminal or log evidence showing the scenario reaches daemon installation and doctor repair successfully. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports shell syntax and a focused test, but it does not include after-fix Docker install-switch output; add redacted terminal or log evidence showing the scenario reaches daemon installation and doctor repair successfully. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items Protected maintainer handling: The provided GitHub context lists the maintainer label, which requires explicit maintainer handling rather than automated cleanup or closure.
Proposed scenario change: The supplied diff adds one environment reset directly after isolated test-state creation, before the daemon install command.
Focused assertion: The supplied diff adds an assertion that the environment reset appears exactly once in the doctor install-switch scenario text.
Findings None None.
Security None None.

How this fits together

The doctor install-switch release scenario creates an isolated test home, runs daemon installation and doctor repair commands, and verifies the supported service lifecycle. The state-path environment determines whether those commands use OpenClaw's default layout or trigger its non-default-path safety boundary.

flowchart LR
  A[Docker release scenario] --> B[Isolated test home]
  B --> C[State-path environment]
  C --> D[Daemon installation]
  D --> E[Default-layout safety decision]
  E --> F[Doctor repair]
  F --> G[Release proof result]
Loading

Decision needed

Question Recommendation
Does this release-test flow intentionally need to clear inherited state-path overrides so it can prove the supported default-layout daemon lifecycle, while retaining explicit coverage of the non-default-path rejection elsewhere? Accept the isolated default-layout proof: Merge after confirming sibling coverage retains the non-default-path safety-guard assertion and after-fix Docker scenario evidence is available.

Why: The protected maintainer label and uninspectable current-main safety-boundary implementation make this an owner-intent decision rather than an automated merge or repair decision.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports shell syntax and a focused test, but it does not include after-fix Docker install-switch output; add redacted terminal or log evidence showing the scenario reaches daemon installation and doctor repair successfully. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The test changes which configuration layout is active during service installation; without reviewing the product guard and sibling scenarios, it is not yet confirmed that this restores the intended default-layout proof without masking non-default-path safety coverage.
Agent review details

Security

None.

PR surface

Tests +5, Other +1. Total +6 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 5 0 +5
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 2 6 0 +6

Review metrics

Metric Value Why it matters
State-layout overrides 3 variables cleared in 1 release scenario These variables select the state/config layout used by daemon installation, so the change needs explicit safety-boundary coverage confirmation.

Merge-risk options

Maintainer options:

  1. Prove both layout contracts before merge (recommended)
    Confirm the default-layout service lifecycle passes in this isolated scenario and that a sibling scenario still proves the non-default-path install guard.
  2. Pause for owner direction
    Do not merge if the intended location of non-default-path guard coverage is unclear or no longer exists.

Technical review

Best possible solution:

Preserve the focused default-layout setup only if a maintainer confirms that the product safety guard is exercised elsewhere, then attach redacted after-fix Docker scenario output proving daemon installation and doctor repair complete in the isolated home.

Do we have a high-confidence way to reproduce the issue?

Not applicable for a user-facing bug: this PR repairs release-scenario coverage. The reported harness failure is plausible from the supplied PR body, but the sandbox prevented independent source and Docker-scenario inspection.

Is this the best way to solve the issue?

Unclear: the environment reset is a narrow plausible repair, but confirmation requires comparison with the daemon-install safety guard and sibling scenarios that retain custom-state coverage.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against 859280ee1199.

Labels

Label changes:

  • add P3: This is a small release-test proof repair with no stated production-runtime behavior change.
  • add merge-risk: 🚨 compatibility: The scenario now selects the default state/config layout for service installation, and the intended relationship to non-default-path safety coverage remains unverified.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports shell syntax and a focused test, but it does not include after-fix Docker install-switch output; add redacted terminal or log evidence showing the scenario reaches daemon installation and doctor repair successfully. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is a small release-test proof repair with no stated production-runtime behavior change.
  • merge-risk: 🚨 compatibility: The scenario now selects the default state/config layout for service installation, and the intended relationship to non-default-path safety coverage remains unverified.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports shell syntax and a focused test, but it does not include after-fix Docker install-switch output; add redacted terminal or log evidence showing the scenario reaches daemon installation and doctor repair successfully. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Protected maintainer handling: The provided GitHub context lists the maintainer label, which requires explicit maintainer handling rather than automated cleanup or closure.
  • Proposed scenario change: The supplied diff adds one environment reset directly after isolated test-state creation, before the daemon install command. (scripts/e2e/lib/doctor-install-switch/scenario.sh:142, 09ea6b67ec41)
  • Focused assertion: The supplied diff adds an assertion that the environment reset appears exactly once in the doctor install-switch scenario text. (test/scripts/docker-build-helper.test.ts:4373, 09ea6b67ec41)
  • Inspection blocker: Read-only commands could not execute because the sandbox failed before command execution with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted; source, git history, scoped AGENTS policies, maintainer notes, and current-main comparison therefore remain unverified.

Likely related people:

  • steipete: The supplied context attributes the only commit in this narrowly scoped doctor install-switch repair to steipete; the required feature-history search could not run to establish broader ownership. (role: proposed patch author and likely recent area contributor; confidence: low; commits: 09ea6b67ec41; files: scripts/e2e/lib/doctor-install-switch/scenario.sh, test/scripts/docker-build-helper.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add redacted after-fix output from the Docker doctor install-switch scenario.
  • Confirm a sibling path still exercises the non-default state-path daemon-install rejection.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Release-owner decision: land this harness correction now; the immediately following beta.6 release validation will provide the after-fix Docker scenario proof.

The optional Rank-up moves are addressed as follows:

  • Non-default service-install rejection remains covered independently in src/cli/daemon-cli/install.test.ts, src/infra/gateway-supervision.test.ts, src/commands/doctor-gateway-services.test.ts, and src/commands/doctor-gateway-daemon-flow.test.ts; this PR does not weaken that product boundary.
  • The full doctor install-switch Docker path is the release lane this harness repair unblocks. Running a duplicate package/Docker cycle before landing would not test the release candidate with the trusted main harness. The release owner explicitly accepts landing the six-line test-only correction, with Full Release Validation as the real after-fix proof.

Exact-head CI run 30509451949 is green, including openclaw/ci-gate; the focused Docker helper suite passed all 175 tests and autoreview reported no findings.

@steipete
steipete merged commit 9c3503a into main Jul 30, 2026
109 of 118 checks passed
@steipete
steipete deleted the fix/doctor-install-switch-default-state branch July 30, 2026 03:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to zhangguiping-xydt/openclaw that referenced this pull request Jul 30, 2026
* origin/main:
  style: format dynamic route coverage (openclaw#116197)
  docs: clarify dynamic deep link loading
  test: cover dynamic route startup reconnect
  refactor: keep dynamic route identity page-owned
  docs: note dynamic deep link loading
  fix: load dynamic deep links once
  fix(e2e): use default state for daemon switch (openclaw#116190)
  docs: clarify Buzz typing cadence (openclaw#116194)
  docs: document Buzz typing indicators
  feat: add Buzz typing indicators
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant