Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 2:09 PM ET / 18:09 UTC. ClawSweeper reviewWhat this changesThe PR makes the POSIX installer honor an explicit Git checkout target instead of replacing it with the checkout detected from the caller’s directory. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessNo blocking correctness finding: this is a focused repair for a current-main installer bug, with a coherent precedence rule and boundary coverage. Keep it open for normal exact-head CI and maintainer handling. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe POSIX installer combines environment and command-line checkout selectors with current-directory checkout detection, then chooses one target for installation. That target controls dependency installation, builds, launcher creation, and the final source-install summary. flowchart LR
A[Environment selector] --> C[Parse installer options]
B[Command-line selector] --> C
D[Current-directory checkout] --> E[Detect checkout]
C --> F[Choose Git installation target]
E --> F
F --> G[Install build and launcher]
G --> H[Final source-install summary]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +78, Other 0. Total +78 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one explicit-target precedence rule in the POSIX installer, while preserving detected-checkout reuse only when no nonempty target was supplied. Do we have a high-confidence way to reproduce the issue? Yes—current main has a direct source-reproducible path: run a Git install from checkout A while selecting checkout B, and the unconditional detected-checkout assignment selects A. Is this the best way to solve the issue? Yes—the explicit-selection marker is the narrow owner-boundary fix; it avoids a downstream workaround and preserves the documented no-selector convenience behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e06e80495550. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
Co-authored-by: Andy Ye <[email protected]>
a39513c to
d613aa5
Compare
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Running the POSIX installer from an existing OpenClaw checkout silently replaced an explicit
--git-dir,--dir, orOPENCLAW_GIT_DIRdestination with the checkout detected from the current working directory. The install plan advertised the requested directory, but dependencies, builds, the installed wrapper, and final checkout summary all belonged to the wrong directory.Related #127361.
Repair
Record whether the checkout target was explicitly supplied when reading the environment and parsing CLI options. Prefer that explicit target over current-directory detection; preserve automatic checkout reuse when no nonempty target was supplied, including the existing empty-option behavior. CLI options continue to override the environment, and repeated options retain last-value precedence.
Use the existing
final_git_diras the single authoritative target for installation and the final operator summary, and remove the redundant single-use default variable and duplicate temporary target. Production delta: +7/-7 lines (net zero).Evidence
--dir, spaces, environment-only targets, an explicit path equal to the computed default, repeated flags, relative paths, implicit checkout reuse, and empty-target compatibility.node scripts/run-vitest.mjs test/scripts/install-sh.test.ts test/scripts/install-cli.test.ts(218 tests).pnpm lint:scripts, targeted formatting checks, andbash -n scripts/install.shpass.Actual standalone-installer reproduction used two real, separate checkout-shaped directories with spaces, an isolated
HOME, the normal Bash entrypoint, a real Node runtime and generated launcher, and fail-closed local package-manager/Git shims that disallowed network or repository mutation:Original fix and regression direction by @TurboTheTurtle; contributor credit is preserved in the commit trailer.