Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesPreserve whitespace in Git checkout paths when discovering installation kind, Git identity, and update status. Example: Run openclaw update status --json from a checkout at "/tmp/openclaw ", whose directory name ends with a space.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a concrete bug still present on current main with a minimal shared-parser change; no actionable defects were found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherUpdate discovery consumes the installation root and Git subprocess output, then supplies installation kind and repository identity to status reporting and channel selection. flowchart LR
A[Update status CLI] --> B[Installation discovery]
B --> C[Git top-level output]
C --> D[Remove final LF]
D --> E[Canonical root comparison]
E --> F[Git identity and channel]
Technical reviewBest possible solution: Merge the focused parser correction once the existing exact-head CI gates pass. Do we have a high-confidence way to reproduce the issue? Current-main source shows the pathname loss directly, and the inspected contributor artifact demonstrates the baseline failure and exact-head correction through the real CLI; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete fix: preserve pathname bytes at the existing discovery owner while removing only Git's record terminator, without adding another parser or changing classification policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against af37a0013eef. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +7, Other +2. Total +10 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 10, 2026, 7:21 AM ET / 12:21 UTC. |
…pace Git appends one LF to rev-parse --show-toplevel output; trimming the whole line also strips meaningful trailing whitespace from the checkout path, so a source checkout under a whitespace-suffixed directory failed the toplevel comparison and the Control UI dev-gateway badge silently never rendered. Strip only the record terminator, matching the shipped project-checkout.ts wording and the approved openclaw#196654/openclaw#197973 predicate.
|
Thanks for the work here. We're closing this along with the other open PRs that apply the same change one call site at a time. This series changes symlink, physical-path and literal-path handling at each command separately; path resolution policy belongs in one shared owner and needs a maintainer decision. Please open one issue (or one PR at the shared owner) that covers the whole pattern, with a reproduction of real user-visible harm, instead of separate per-site PRs. Further per-site variants of this pattern will be closed. |
What Problem This Solves
Fixes:
openclaw update statusmistakes a Git checkout for a package installation when the checkout directory ends in whitespace. It drops the Git identity and can select the package update channel instead of the checkout's channel.User Impact
A checkout under a literal whitespace-suffixed directory retains its Git installation type and actual commit SHA. Ordinary checkouts, aliases and nested package installations retain their classification. This PR corrects read-only discovery; it does not run an update or change a service.
Why This Change Was Made
Remove only Git's final LF record terminator from the top-level path, preserving filesystem characters. One canonical ownership parser covers installation kind, identity and update status together (production +2/-1). The existing real-Git test table covers SPACE/TAB/LF/CR suffixes on POSIX and keeps ordinary Windows coverage, separate Git directories, aliases, nested packages and the no-Git-spawn guard (tests +22/-15, net 7 LF).
The dedicated test allocation is 7 LF and covers only this PR’s actual regression growth; the global baseline is untouched. No new dependency, config/default, protocol/schema, permission or upgrade/migration contract.
Evidence
Product head
f56e2bc9ad0faf3acffa753a97a23a1f686c82c2; BASEbaccc7e152916c7f4a48596b5cb544c12264ac54. The frozen collector invokes normally builtopenclaw.mjs --profile update-git-root-proof update status --json --timeout 3through actual Git discovery and JSON readback. It checks clean HEAD/build stamps and the raw Git path bytes; the physical test directory ends in an actual SPACE, rather than being a symlink alias.Set
EXPECT=redfor the clean baseline in the SPACE directory,EXPECT=greenfor the fixed head under the same physical name, andEXPECT=controlfor an ordinary directory. Use fresh output directories.installKind=package, no Git identity (8.803s).installKind=git,git.sha=f56e2bc9ad0faf3acffa753a97a23a1f686c82c2(6.509s).Inspectable complete CLI output, BASE/HEAD receipts, frozen replay and measured checks. Independent GPT-6.1 Sol code/CLI-proof review found no P0–P3 findings, using the user-authorized agent fallback rather than claiming an official autoreview-helper run.
Cleanup: owned CLI processes exited and isolated configuration stayed unchanged. Not tested: actual update/install/upgrade completion, production Gateway/channels, macOS/Windows live execution or upstream CI. Public registry timeouts and the intentionally closed isolated Gateway's diagnostic remain visible in the captured output; they are separate from installation classification.