Repository navigation
Description
Summary
scripts/install.ps1 publicly accepts -Tag, including beta/exact release selectors, but the Git install path never passes that value to Install-OpenClawFromGit. Fresh clones remain on the clone default branch and existing checkouts update their current branch, then build it regardless of the requested selector.
Frozen source reviewed at a434545620127a3105699513d662395a43b43eb1; current main was rechecked and still calls:
Install-OpenClawFromGit -RepoDir $GitDir -SkipUpdate:$NoGitUpdatewith no $Tag argument.
Deterministic sequence
- On Windows run
install.ps1 -InstallMethod git -Tag betaor-Tag <exact-version>. - The public parameter accepts the selector.
MaininvokesInstall-OpenClawFromGitwith only repo dir and skip-update.- The Git installer clones/pulls the current/default branch and builds it.
- Installation succeeds with bytes from a different ref than explicitly requested.
Owner / contract
scripts/install.ps1declares[string]$Tag = "latest"and documents it as a public parameter.- The npm path resolves and uses
$Tag. Install-OpenClawFromGitaccepts no tag/ref selector and only clones/pulls the current branch.Maindoes not pass$Tagto the Git path.- POSIX Git installer siblings explicitly resolve requested branch/beta/exact selectors before build.
Current PowerShell tests bind -Tag main but do not assert selected Git HEAD/ref.
Targeted live issue/PR searches found no exact existing root. This is distinct from Windows release-writer binding work and from npm tag handling.
Suggested repair
Pass the requested selector into the Git installer, resolve it to an exact remote/local ref, and check it out before dependency installation/build. Explicit selectors must fail loudly when unavailable rather than silently building another ref.
Regression
Use a fake-Git fixture with distinguishable refs and cover:
- default/latest behavior;
main;beta/ beta alias;- exact release version/tag;
- missing selector.
Assert selected HEAD equals the request and checkout occurs before pnpm/build/wrapper publication.
Risk
Review required: installer release selection and provenance. A successful-looking install can publish a different version/channel than the operator explicitly requested.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Aug 21, 2026
Codex review: this still needs some work. Reviewed September 27, 2026, 5:05 PM ET / 21:05 UTC.
Summary
Current main still ignores the requested tag on Windows Git installs. The merged related PR repairs POSIX ref selection, leaving this Windows behavior unresolved.
Reproducibility: yes. the current source gives a high-confidence path: invoke the Windows Git installer with -Tag beta or an exact version and inspect the checkout HEAD it builds. This read-only review did not run the Windows installer.
Root-cause cluster
Relationship:
canonicalCanonical: #127352
Summary: The merged POSIX ref-selection repair overlaps the installer problem but does not fix the Windows PowerShell path.
Members:
partial_overlap: fix(installer): avoid checking out the wrong Git ref during pinned installs #130907 - It repairs POSIX ref resolution and explicitly mentions this Windows issue, while leaving install.ps1 untouched.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Maintainer decision needed
Why: The PowerShell default is latest but currently follows the checkout, whereas the POSIX Git installers resolve latest to a published release when available; changing the implicit Windows default affects upgrades.
Next step
The protected maintainer and no-new-fix-pr labels, together with the implicit-default decision, call for owner-led handling before a focused Windows repair.
Review details
Best possible solution:
Resolve explicit Git selectors before dependency installation, show the chosen ref, and fail safely when it is unavailable or the existing checkout cannot switch without losing work.
Do we have a high-confidence way to reproduce the issue?
Yes, the current source gives a high-confidence path: invoke the Windows Git installer with -Tag beta or an exact version and inspect the checkout HEAD it builds. This read-only review did not run the Windows installer.
Is this the best way to solve the issue?
Yes for explicit selectors: resolve and verify the ref inside the existing PowerShell Git installer before building. The implicit default needs the owner choice recorded above.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 0d02ab7aaf65.
Label changes
Label changes:
No label changes.
Label justifications:
P2: An optional Windows Git install can successfully build the wrong requested release, with limited platform and install-method scope.impact:other: The installer can publish source bytes from a different ref than the operator selected.Evidence reviewed
What I checked:
scripts/install.ps1:7, 0d02ab7aaf65)scripts/install.ps1:1950, 0d02ab7aaf65)scripts/install.ps1:2341, 0d02ab7aaf65)docs/install/installer.md. (docs/install/installer.md:481, 0d02ab7aaf65)scripts/install-cli.sh:995, 0d02ab7aaf65)test/scripts/install-ps1.release.test.ts:1668, 0d02ab7aaf65)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.