Skip to content

fix: align release service account state - #116254

Merged
steipete merged 1 commit into
mainfrom
fix/release-service-account-env
Jul 30, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/release-service-account-env

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes two remaining release-harness identity mismatches after the service-install safety hardening. Doctor install-switch did not expose the canonical account home through USERPROFILE, and upgrade-survivor auto-auth still seeded and installed against temporary state that the candidate correctly rejected as non-default.

Why This Change Was Made

Doctor install-switch now exports both HOME and USERPROFILE from its resolved account home before clearing OpenClaw path overrides.

Upgrade-survivor auto-auth now resolves the current passwd home, fails closed when it is empty, exports HOME and USERPROFILE, and points state/config at the default $account_home/.openclaw before assertion seeding. Manual and root-managed survivor lanes keep their existing setup; the root-managed lane seeds /root, matching uid 0's passwd home even if modes are manually combined.

User Impact

The doctor-switch and update-restart-auth release lanes exercise the supported service account identity without weakening production safety checks. There is no product runtime change.

Evidence

  • bash -n for both changed shell scenarios
  • focused test/scripts/docker-build-helper.test.ts: 177 passed
  • Oxfmt and git diff --check
  • Codex autoreview: clean after verifying the separate auto-auth/root-managed lane contract

@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: 🦪 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. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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, 1:50 AM ET / 05:50 UTC.

ClawSweeper review

What this changes

The PR aligns doctor-install-switch and upgrade-survivor auto-auth E2E scenarios with the resolved service account home by exporting HOME and USERPROFILE and seeding the canonical OpenClaw state path before assertions.

Merge readiness

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

Keep this PR open for explicit maintainer handling: it changes release-harness identity setup under the protected maintainer label, and the supplied evidence is limited to syntax/static checks rather than an observed run of the affected release scenarios.

Priority: P3
Reviewed head: 623feaf5e101afa85d504ad755354ecf97116126
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and has matching static coverage, but its release-harness behavior is not yet demonstrated in a real scenario.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR reports syntax checks and focused source-level tests, but it does not provide observable after-fix output from the changed release-harness scenarios; add redacted terminal output or a linked scenario artifact before merge. 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 reports syntax checks and focused source-level tests, but it does not provide observable after-fix output from the changed release-harness scenarios; add redacted terminal output or a linked scenario artifact before merge. 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 Changed release-harness behavior: The branch exports the resolved account home through both HOME and USERPROFILE in the doctor install-switch scenario before clearing OpenClaw path overrides.
Auto-auth identity alignment: The upgrade-survivor auto-auth branch resolves the passwd home, fails when absent, then sets HOME, USERPROFILE, OPENCLAW_STATE_DIR, and OPENCLAW_CONFIG_PATH before the assertion seeding call.
Focused static coverage: The branch adds source-level assertions for the new environment setup and ordering, but the supplied PR evidence does not include output from the affected Docker release scenarios.
Findings None None.
Security None None.

How this fits together

The release E2E harness creates service-account state, invokes install/doctor or update/restart flows, and then checks that OpenClaw operates from the supported account identity. These scripts feed release validation rather than the production runtime.

flowchart LR
  A[Service account] --> B[Release E2E scenario]
  B --> C[Resolve account home]
  C --> D[Set HOME and USERPROFILE]
  D --> E[Seed canonical OpenClaw state]
  E --> F[Install or restart validation]
  F --> G[Release-harness result]
Loading

Decision needed

Question Recommendation
Does the release-harness evidence demonstrate that both affected service-account flows now use the canonical account home before this PR is merged? Obtain scenario proof: Run the doctor install-switch and auto-auth survivor scenarios and attach redacted after-fix output before merging.

Why: The protected maintainer label requires explicit human handling, and static source checks do not establish that the Docker-based release scenarios complete with the corrected identity state.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR reports syntax checks and focused source-level tests, but it does not provide observable after-fix output from the changed release-harness scenarios; add redacted terminal output or a linked scenario artifact before merge. 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) - This changes release-validation automation around service-account state; without an observed doctor-switch and auto-auth survivor run, a path or ordering mismatch could surface only during release validation.
  • Complete next step (P2) - A protected maintainer-labeled release-harness change needs explicit maintainer review after real scenario proof; there is no discrete mechanical defect for an automated repair lane.
Agent review details

Security

None.

PR surface

Tests +24, Other +14. Total +38 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 25 1 +24
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 14 0 +14
Total 3 39 1 +38

Review metrics

Metric Value Why it matters
Service-account environment alignment 2 release scenario paths now set both HOME and USERPROFILE Both release flows must resolve the same canonical account home for their state and configuration assertions to be meaningful.

Stored data model

Persistent data-model change detected: migration/backfill/repair: test/scripts/docker-build-helper.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Prove the two release paths before merge (recommended)
    Capture redacted output from the doctor-switch and auto-auth survivor runs so the environment and assertion ordering are verified in the Docker harness.
  2. Accept release-harness uncertainty
    A maintainer may merge with the existing static coverage if they explicitly accept that the changed identity paths were not observed end to end.

Technical review

Best possible solution:

Run the affected doctor-install-switch and upgrade-survivor auto-auth scenarios with the intended service-account identity, attach redacted terminal or artifact output showing the corrected state path, then let the designated maintainer land the focused harness repair.

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

No high-confidence observed reproduction is included. The source and PR description identify the affected doctor-switch and auto-auth survivor paths, but the supplied evidence is static validation rather than a failing-and-passing scenario run.

Is this the best way to solve the issue?

Unclear. Aligning all state-related environment values to the resolved passwd home is a narrow, coherent repair, but an actual run of both changed release scenarios is needed to confirm the ordering and state owner are correct.

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

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

Labels

Label changes:

  • add P3: This is a focused release-harness repair with no claimed production runtime behavior change.
  • add merge-risk: 🚨 automation: The diff changes release E2E setup and could affect release-validation execution even though production code is untouched.
  • 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 reports syntax checks and focused source-level tests, but it does not provide observable after-fix output from the changed release-harness scenarios; add redacted terminal output or a linked scenario artifact before merge. 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 focused release-harness repair with no claimed production runtime behavior change.
  • merge-risk: 🚨 automation: The diff changes release E2E setup and could affect release-validation execution even though production code is untouched.
  • 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 reports syntax checks and focused source-level tests, but it does not provide observable after-fix output from the changed release-harness scenarios; add redacted terminal output or a linked scenario artifact before merge. 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:

  • Changed release-harness behavior: The branch exports the resolved account home through both HOME and USERPROFILE in the doctor install-switch scenario before clearing OpenClaw path overrides. (scripts/e2e/lib/doctor-install-switch/scenario.sh:77, 623feaf5e101)
  • Auto-auth identity alignment: The upgrade-survivor auto-auth branch resolves the passwd home, fails when absent, then sets HOME, USERPROFILE, OPENCLAW_STATE_DIR, and OPENCLAW_CONFIG_PATH before the assertion seeding call. (scripts/e2e/lib/upgrade-survivor/run.sh:693, 623feaf5e101)
  • Focused static coverage: The branch adds source-level assertions for the new environment setup and ordering, but the supplied PR evidence does not include output from the affected Docker release scenarios. (test/scripts/docker-build-helper.test.ts:4406, 623feaf5e101)
  • Protected maintainer routing: The provided PR context shows the maintainer label, so this cleanup workflow should not close or auto-resolve the PR.

Likely related people:

  • steipete: Authored the current focused release E2E identity adjustment and assigned the PR, making this the clearest available routing contact from the supplied history. (role: recent release-harness contributor; confidence: low; commits: 623feaf5e101; files: scripts/e2e/lib/doctor-install-switch/scenario.sh, scripts/e2e/lib/upgrade-survivor/run.sh, test/scripts/docker-build-helper.test.ts)

Rank-up moves

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

  • Run and attach redacted output from the doctor install-switch scenario.
  • Run and attach redacted output from the upgrade-survivor auto-auth scenario.

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 canonical service-account harness setup now; beta.6 Full Release Validation will provide the two after-fix Docker scenario artifacts.

The optional Rank-up moves are intentionally deferred because the trusted harness changes must first be present on main to test the release candidate. Both affected paths are Docker-only, fail closed when passwd-home resolution fails, and leave production service-install safety unchanged. Exact-head CI run 30517554851 is fully green, including openclaw/ci-gate; both shell scripts pass syntax checks, the focused Docker helper suite passed all 177 tests, and final autoreview is clean after verifying the separate auto-auth and root-managed lane contracts. The release owner explicitly requested immediate landing.

@steipete
steipete merged commit 62cbbcc into main Jul 30, 2026
112 of 120 checks passed
@steipete
steipete deleted the fix/release-service-account-env branch July 30, 2026 06:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
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
  ...
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: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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