Skip to content

fix: apply doctor service identity per flow - #116265

Merged
steipete merged 1 commit into
mainfrom
fix/doctor-default-service-identity
Jul 30, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/doctor-default-service-identity

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the remaining doctor install-switch failure in the proxy-environment flow. Canonical service identity was bundled into one state-creation helper, which obscured the required transition and did not reliably apply after each flow's own test-state initialization.

Why This Change Was Made

The scenario now separates concerns:

  • each of the three daemon-service flows creates its own isolated test state;
  • use_default_service_identity then selects the OS account HOME and USERPROFILE, clears the canonical account's prior service artifacts, and removes OpenClaw path overrides;
  • the intentional cross-state approval flow does not call this helper and retains its custom-state contract.

A focused guard requires exactly three identity-helper calls and checks they immediately follow per-flow state creation.

User Impact

Doctor-switch release validation can exercise the normal, proxy-cleanup, and wrapper-persistence service paths without weakening product safety or changing the intentional cross-state scenario. 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: 177 passed
  • Oxfmt and git diff --check
  • Codex autoreview: clean, no accepted or actionable findings

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 30, 2026
@steipete steipete self-assigned this Jul 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jul 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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. 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 30, 2026, 2:38 AM ET / 06:38 UTC.

ClawSweeper review

What this changes

The PR updates the doctor install-switch Docker scenario so each normal service flow creates its own isolated state before switching to the default OS service identity, with a focused source guard for that ordering.

Merge readiness

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

Keep this PR open for normal maintainer review. The patch cleanly separates per-flow test-state creation from adopting the canonical service account, but the supplied evidence is static/suite validation rather than an after-fix doctor install-switch run; the protected maintainer label also requires explicit maintainer handling.

Priority: P3
Reviewed head: 6fc69dfb1a71dfcb399df6ca7ac1309d5b7754db

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and its static guard matches the claimed structure, but merge-quality evidence is capped by the absence of real after-fix scenario proof.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR provides syntax and focused test results, but no after-fix Docker scenario transcript, redacted logs, or artifacts showing the altered doctor install-switch flows; add real evidence and redact private paths, endpoints, or credentials. 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 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR provides syntax and focused test results, but no after-fix Docker scenario transcript, redacted logs, or artifacts showing the altered doctor install-switch flows; add real evidence and redact private paths, endpoints, or credentials. 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 Patch separates state creation from identity selection: The proposed scenario creates switch-${name} state immediately before applying the default service identity in each of the normal, proxy-environment, and wrapper flows; the identity helper now owns only canonical-home cleanup and environment selection.
Focused guard covers the intended source invariant: The updated test checks the renamed identity helper, the canonical-home environment cleanup, one state-create/identity adjacency, and exactly three helper calls.
Provided validation is not a real scenario run: The PR body reports bash -n, a focused test suite, formatting, and diff checks, but does not include a redacted Docker doctor install-switch transcript, log, or artifact showing the three changed flows after the fix.
Findings None None.
Security None None.

How this fits together

The doctor install-switch scenario validates how OpenClaw installs and repairs its gateway service in Docker under several environment conditions. Each flow prepares state and environment variables, executes install/doctor commands, then inspects the resulting service artifacts and logs.

flowchart TD
  A[Doctor switch scenario] --> B[Create flow-specific test state]
  B --> C[Adopt canonical OS service identity]
  C --> D[Run install or doctor command]
  D --> E[Inspect service artifacts and logs]
  E --> F[Release-validation result]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR provides syntax and focused test results, but no after-fix Docker scenario transcript, redacted logs, or artifacts showing the altered doctor install-switch flows; add real evidence and redact private paths, endpoints, or credentials. 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 source guard does not demonstrate that the Docker scenario actually completes all three altered flows with the intended canonical service identity, so a release-validation false positive remains possible until a real after-fix run is shown.
  • Complete next step (P2) - This is an open implementation PR with a contributor-side real-behavior proof gap, not a discrete repair task for an automated fix lane.
Agent review details

Security

None.

PR surface

Tests +1, Other +2. Total +3 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 8 7 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 7 5 +2
Total 2 15 12 +3

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the per-flow state creation plus canonical identity helper split, and add redacted after-fix Docker doctor install-switch evidence covering the normal, proxy-environment, and wrapper flows before merge.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the per-flow state creation plus canonical identity helper split, and add redacted after-fix Docker doctor install-switch evidence covering the normal, proxy-environment, and wrapper flows before merge.

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

No high-confidence runtime reproduction was provided. The source diff clearly identifies the affected three scenario flows, but the available evidence does not include a completed current-head Docker doctor install-switch execution.

Is this the best way to solve the issue?

Yes, conditionally. Splitting flow-local state creation from canonical service identity selection is the narrowest maintainable boundary shown by the patch, provided a real scenario run confirms each changed flow.

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

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

Labels

Label changes:

  • add P3: This is a small release-validation harness correction with no claimed runtime product behavior change.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • 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 provides syntax and focused test results, but no after-fix Docker scenario transcript, redacted logs, or artifacts showing the altered doctor install-switch flows; add real evidence and redact private paths, endpoints, or credentials. 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-validation harness correction with no claimed runtime product behavior change.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides syntax and focused test results, but no after-fix Docker scenario transcript, redacted logs, or artifacts showing the altered doctor install-switch flows; add real evidence and redact private paths, endpoints, or credentials. 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:

  • Patch separates state creation from identity selection: The proposed scenario creates switch-${name} state immediately before applying the default service identity in each of the normal, proxy-environment, and wrapper flows; the identity helper now owns only canonical-home cleanup and environment selection. (scripts/e2e/lib/doctor-install-switch/scenario.sh:157, 6fc69dfb1a71)
  • Focused guard covers the intended source invariant: The updated test checks the renamed identity helper, the canonical-home environment cleanup, one state-create/identity adjacency, and exactly three helper calls. (test/scripts/docker-build-helper.test.ts:4390, 6fc69dfb1a71)
  • Provided validation is not a real scenario run: The PR body reports bash -n, a focused test suite, formatting, and diff checks, but does not include a redacted Docker doctor install-switch transcript, log, or artifact showing the three changed flows after the fix. (6fc69dfb1a71)
  • Repository inspection limitation: The review environment rejected read-only shell commands before repository files or git history could be inspected, so current-main provenance and feature-history ownership could not be independently confirmed beyond the supplied PR context.

Likely related people:

  • steipete: The supplied PR context identifies this person as the author, assignee, and author of the focused doctor install-switch change; current-main history could not be independently inspected in this read-only environment. (role: current doctor-scenario contributor; confidence: low; commits: 6fc69dfb1a71; 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.

  • Run the Docker doctor install-switch scenario at the PR head and attach a redacted terminal transcript or logs showing the normal, proxy-environment, and wrapper flows complete.
  • Include the observed service-artifact assertions or relevant final log lines so reviewers can verify that canonical identity is applied after each flow-local state setup.

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 the per-flow identity boundary now; beta.6 Full Release Validation will provide the after-fix doctor-switch Docker artifact.

The optional Rank-up moves are intentionally deferred because the trusted scenario correction must first be on main to validate the release candidate. The patch changes only the Docker harness, preserves the intentional cross-state flow, and leaves product safety untouched. Exact-head CI run 30519992581 is fully green, including openclaw/ci-gate; the focused Docker helper suite passed all 177 tests and autoreview reported no findings. The release owner explicitly requested immediate landing.

@steipete
steipete merged commit 3e67671 into main Jul 30, 2026
111 of 117 checks passed
@steipete
steipete deleted the fix/doctor-default-service-identity branch July 30, 2026 07:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to Hackerismydream/openclaw that referenced this pull request Jul 30, 2026
* origin/main: (24 commits)
  fix(e2e): apply default service identity per flow (openclaw#116265)
  chore(android): record 2026.7.4 Play metadata
  fix(ci): accept one verified Telegram SUT launch (openclaw#116267)
  chore(android): prepare 2026.7.4 Play release
  fix(e2e): align service account state (openclaw#116254)
  refactor(qa): remove live-channel scenario registries and wrappers (openclaw#115752)
  fix(ci): let trusted Telegram QA stage runtime (openclaw#116252)
  fix(plugins): plugin install survives pnpm-only overrides (openclaw#116245)
  test(qa): recognize internal image completions (openclaw#116234)
  fix(test): review Codex runtime scan chunks (openclaw#116212)
  fix(systemd): clear start-limit latch before gateway start (openclaw#116178)
  fix(security): expose every executable call in plugin scans (openclaw#116222)
  chore(sdk): repin the API baseline after the resolver signature change
  test(e2e): delay the draft-proof final answer past the start gate
  fix(channels): resolve tool progress against the caller's stream mode
  fix(ci): satisfy docs formatting, lint, and the SDK API baseline
  test(e2e): add a progress-draft scenario to the mock provider
  docs(telegram): call out the changed default preview on upgrade
  refactor(channels): render the progress label as a block, not a line
  fix(channels): show tool lines under the progress status headline
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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