Skip to content

fix(update): report dirty checkouts as failed updates - #144836

Merged
RomneyDa merged 1 commit into
mainfrom
fix/update-dirty-dev-checkout
Sep 14, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/update-dirty-dev-checkout

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Small follow-ups: #147544 protects clone publication; #147562 verifies Git rollback; #147621 preserves launcher identity; #147629 installs dirty dev checkouts separately; #147677 adds shell-installer support; #147653 adds Windows npm support.

What Problem This Solves

An edited development checkout produces a successful clean-check indicator and a skipped update, obscuring that the requested update failed.

User Impact

The clean check reports failure and explains that installation has not started and local changes remain intact. Existing skipped records also get useful guidance.

Why This Change Was Made

Classify the Git status result before publishing progress. Automatic relocation and launcher recovery are separate changes linked above.

Evidence

Runner and terminal-report regressions fail on main. All 199 focused tests pass, including the CLI failure path and unchanged service. Independent P0–P2 review is clean. Changed checks and CI pass.

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@RomneyDa
RomneyDa marked this pull request as ready for review September 11, 2026 10:08
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes size: XL maintainer Maintainer-authored PR labels Sep 11, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 9:58 PM ET / September 14, 2026, 01:58 UTC (Revision 12).

ClawSweeper review

What this changes

The PR reports edited Git checkouts as failed updates and provides preservation and retry guidance in progress output, CLI results, stored reports, and documentation.

Merge readiness

✅ Ready for maintainer review

The reporting defect remains on current main and in v2026.9.4. This focused, maintainer-authored PR remains useful; no blocking correctness findings were identified.

Priority: P2
Reviewed head: a97ffc21895b822e7937a9258aee95bac151cb09

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused reporting repair with meaningful regression coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate and introduces no authority change. Focused coverage exercises Git classification and terminal reporting; the earlier published-driver Docker result concerns an older, broader revision and is not claimed as current-head runtime proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate and introduces no authority change. Focused coverage exercises Git classification and terminal reporting; the earlier published-driver Docker result concerns an older, broader revision and is not claimed as current-head runtime proof.
Evidence reviewed 7 items Current main still has the reporting defect: Current main publishes the ordinary Git command result before returning status skipped with reason dirty; the source-change recheck also returns skipped.
Latest supplied release retains the same behavior: The v2026.9.4 source also runs the ordinary clean-check step and returns skipped/dirty. The release source was read through GitHub after local historical-object inspection failed.
Classification precedes progress publication: The new step classifies nonempty successful Git status output as failure before emitting completion. The existing result object is retained in the step list, and the updater returns before initial mutation admission.
Findings None None.
Security None None.

How this fits together

The Git updater checks the installed checkout before preparing and activating an update. Its classified results feed CLI progress, terminal output, and update history.

flowchart TD
  A[Update request] --> B[Inspect Git checkout]
  B --> C{Local changes?}
  C -->|Yes| D[Record failed clean check]
  D --> E[Show preservation and retry guidance]
  C -->|No| F[Prepare and validate candidate]
  F --> G[Existing activation workflow]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +19, Tests +36, Docs 0. Total +55 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 3 28 9 +19
Tests 4 50 14 +36
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 79 24 +55

Review metrics

None.

Technical review

Best possible solution:

Keep clean-check classification with the Git updater and use the existing reporting owner for consistent, preservation-focused recovery guidance.

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

Yes, from source: successful Git status output containing local changes publishes a successful clean-check step and then returns skipped/dirty on current main. No runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Yes. Classifying the clean check before publishing completion follows the existing step-owner pattern and fixes the misleading result without adding another update path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3cfc0ade66c6.

Labels

Label justifications:

  • P2: This corrects misleading failure reporting for edited development checkouts while preserving the existing refusal behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate and introduces no authority change. Focused coverage exercises Git classification and terminal reporting; the earlier published-driver Docker result concerns an older, broader revision and is not claimed as current-head runtime proof.

Evidence

What I checked:

  • Current main still has the reporting defect: Current main publishes the ordinary Git command result before returning status skipped with reason dirty; the source-change recheck also returns skipped. (src/infra/update-runner-git.ts:373, 3cfc0ade66c6)
  • Latest supplied release retains the same behavior: The v2026.9.4 source also runs the ordinary clean-check step and returns skipped/dirty. The release source was read through GitHub after local historical-object inspection failed. (src/infra/update-runner-git.ts:358, 3a9d69db306c)
  • Classification precedes progress publication: The new step classifies nonempty successful Git status output as failure before emitting completion. The existing result object is retained in the step list, and the updater returns before initial mutation admission. (src/infra/update-runner-git-steps.ts:19, a97ffc21895b)
  • Existing failure semantics remain consistent: The shared outcome classifier already treats skipped/dirty as a failed attempt. CLI finalization handles both error and actionable skipped results as failures, so this patch aligns their presentation without introducing a new refusal policy. (src/shared/update-outcome.ts:29, a97ffc21895b)
  • Meaningful regression coverage: Inspected coverage checks failed progress completion, unreadable and timed-out status commands, preserved edits during candidate validation, unchanged service-stop behavior, and matching JSON/history guidance for error and legacy skipped results. The captured PR body reports 199 focused tests passing; this read-only review did not execute tests. (src/infra/update-runner.test.ts:860, a97ffc21895b)
  • Scope and review continuity: The pinned introduced diff contains the reporting repair, not the earlier relocation or launcher changes. The previous completed review covers this same head and lists no findings. The body explicitly assigns relocation to fix(update): preserve dirty checkouts by installing dev separately #147629; the historical Windows and full-service relocation gaps concern that separate work. (a97ffc21895b)

Likely related people:

  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-12T06:29:00.031Z sha 33ea0a9 :: blocked before merge. :: none
  • reviewed 2026-09-12T07:25:40.239Z sha 33ea0a9 :: blocked before merge. :: none
  • reviewed 2026-09-12T07:42:07.649Z sha 0ce58eb :: blocked before merge. :: none
  • reviewed 2026-09-12T07:57:05.876Z sha 0ce58eb :: blocked before merge. :: none
  • reviewed 2026-09-13T23:25:50.392Z sha a97ffc2 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T23:48:42.254Z sha a97ffc2 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T00:21:51.851Z sha a97ffc2 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T01:02:14.628Z sha a97ffc2 :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the fix/update-dirty-dev-checkout branch from 2be0971 to 33ea0a9 Compare September 12, 2026 05:50
@RomneyDa

Copy link
Copy Markdown
Member Author

Addressed the review findings in 33ea0a9 and resolved the main conflicts.

  • A runtime-copy failure after checkout publication now recovers the verified original runtime before launcher activation, including installer wrappers with no prior npm package entry. The full CLI regression reproduces the stopped-service failure before the fix and now verifies restart through the original entrypoint.
  • Recognize genuine npm Windows cmd-shim output, verify its target/Node/package owner again before mutation, and retain the launcher prefix across repeat updates. Custom or changed launchers still refuse admission.
  • Updated the six stale dirty-refusal expectations that failed CI. Rebased after the unrelated deploy-graph timeout.
  • Moved retained Git launcher verification into the existing npm recovery owner and removed duplicate retirement/verification-result code to satisfy the existing file-size limits.

Proof: all 501 CLI tests passed; after cleanup, 290 owner tests and 45 relevant CLI cases passed. The initial launcher/relocation/transaction run passed 88 tests. Runtime build, all changed-file checks, and fresh final P1 review passed. Windows admission uses actual generated shim fixtures; native cmd.exe/live Gateway execution is not claimed. No database schema or persistent-store semantics changes.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 12, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 12, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

The completed re-review confirms both code findings are fixed. CI is now green for 33ea0a93f4ae.

The published-updater cell requested in review also passed after that review completed: Docker job installed [email protected], built the package from CI merge 2668f0f30503 containing this PR head, and passed package integrity plus legacy-operator-state with automatic authenticated restart. This proves the existing published first hop; the new dirty-checkout behavior becomes available once the updated updater is installed.

Native Windows remains a disclosed proof gap. The PR's Windows matrix was skipped. A focused native attempt could not allocate: the repository wrapper expects a broker readiness field absent from Crabbox 0.56.0's successful Azure doctor response. No remote Windows execution occurred. Existing launcher fixtures and the full CLI relocation/recovery regressions pass; they do not establish native cmd.exe or full-service recovery. The body now records the precise evidence and limits.

@RomneyDa
RomneyDa force-pushed the fix/update-dirty-dev-checkout branch from 0ce58eb to a97ffc2 Compare September 13, 2026 23:19
@RomneyDa RomneyDa changed the title fix(update): preserve edited dev checkouts during updates fix(update): report dirty checkouts as failed updates Sep 13, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. label Sep 13, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 14, 2026
@RomneyDa
RomneyDa merged commit 7798573 into main Sep 14, 2026
216 of 218 checks passed
@RomneyDa
RomneyDa deleted the fix/update-dirty-dev-checkout branch September 14, 2026 20:13
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants