Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Evidence updated in the PR body: added a before/after real-behavior proof through the actual package-launcher boundary — published |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 6:22 AM ET / 10:22 UTC. ClawSweeper reviewWhat this changesThis PR makes a package installation with saved Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer acceptance: the routing repair is correct and proven, but it intentionally changes existing package installs with a saved dev preference to use the Git update flow. Priority: P2 Review scores
Verification
How this fits togetherThe CLI updater combines command flags and the saved update channel to select either an npm package update or a Git checkout update. That selection then controls the installer and resulting OpenClaw version. flowchart LR
A[Update command] --> B[Requested flags]
C[Saved update channel] --> D[Effective channel]
B --> D
D --> E[Select package or Git update]
E --> F[Update execution]
F --> G[Updated installation]
Decision needed
Why: This is an intentional compatibility and operator-workflow change; source and tests establish correctness but cannot determine whether maintainers want existing saved preferences to alter installation mode. Before merge
Agent review detailsSecurityNone. PR surfaceSource -3, Tests +43, Docs +3, Other +42. Total +85 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: 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: Land only with explicit acceptance of the saved-dev package-to-Git transition and its documented one-off tag exception. Do we have a high-confidence way to reproduce the issue? Yes: current-main source proves the saved-dev path remains package-routed, and the PR supplies installed-package regression and exact-head Docker evidence for the repaired flow. Is this the best way to solve the issue? Yes: deriving one effective channel at the routing owner removes the inconsistent explicit-versus-saved distinction without altering the one-off tag contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2f3cd08d58c1. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (15 earlier review cycles; latest 8 shown)
|
|
Addressed the review's one actionable finding and rank-up move in 69c3827e5: the routing comment now states the documented dev-channel git-checkout contract instead of the absolute npm dist-tag claim. Re-ran the review's acceptance criteria on the new head — @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Pushed 683b47d57, absorbing the sibling-path P1 that ClawSweeper raised on the now-closed duplicate #123121 ("Preserve one-off tags before switching stored-dev installs"): |
|
Evidence section updated with the rebuilt-sandbox transcripts for the tag sibling path. @clawsweeper re-review |
|
On the |
683b47d to
2666045
Compare
|
The |
458c872 to
8f9cd3e
Compare
|
@clawsweeper re-review The stored-dev routing repair has been restored after an intentional hosted regression head reproduced the defect through the actual installed CLI. The PR body links that failure and describes the retained one-off-tag/explicit-dev compatibility boundary. The updated existing package lane covers five routing controls and the package→Git→package lifecycle; fresh exact-head GREEN validation is still pending. All original contributor commits remain intact. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Final exact head Actual executed merge The same installed-package lane failed before the fix because stored dev returned package mode and The compatibility interpretation is precise: this restores stable documentation's persistent-dev Git-checkout intent and corrects its contradictory package/dev table. It does not claim the stable stored-dev runtime already worked. No channel/configuration/default/migration is added; one-off package tags and explicit-dev precedence remain tested. The PR body links the exact stable documentation and addresses the latest ClawSweeper question. Refs #123073. The broader issue remains OPEN for its separate package-manager/workspace-install original-flow audit; this PR proves the stored-channel routing repair only. The final server squash preview preserves that non-closing reference and human contributor credit. Runtime net −3 lines removes duplicate channel calculation. Thanks @Chinmayrawat15 for the repair and @galli-personal for the report. |
…sted] A package-detected launcher with a stored update.channel: dev resolved the npm "dev" dist-tag (which does not exist -> ETARGET) because switchToGit only honored an explicitly requested --channel dev. Base the decision on the effective channel and collapse the duplicated selectedChannel/channel computation, which is provably identical in every reachable case. Refs openclaw#123073
Review finding: "dev" can exist as a rare npm dist-tag, so the comment must not claim it never does; the routing rationale is the documented dev-channel git-checkout contract.
…stalls --tag is documented as a one-run package-target override, so a stored dev channel must not divert a tagged update into the git flow (where the tag is ignored). An explicitly requested --channel dev still outranks the tag, matching existing explicit-channel behavior.
…IT_DIR The stored-dev routing case performs a real transactional clone. On the default <home>/openclaw that directory outlived the case and made a later test fail with "OPENCLAW_GIT_DIR appeared while cloning". Test Plan: node --import tsx scripts/test-projects.mts src/cli/update-cli.test.ts Failing set now matches clean origin/main exactly (3 pre-existing macOS $TMPDIR symlink failures, unrelated to this change). Assisted by an AI coding assistant; reviewed before submitting.
Temporary expected-failure verification for openclaw#123073. Restore only the routing owner to its pre-fix bytes while retaining the original contributor commits and adding installed-package regression coverage. This head must not merge; restore the reviewed fix and require hosted green proof after capturing the intended failure.
Restore the contributor's canonical effective-channel fix after the installed-package regression lane reproduced package routing for stored dev. Keep one-off tags on the package path and explicit dev precedence. Remove the obsolete source-text assertion now covered by installed CLI behavior and format the CI documentation table. Preserve all original contributor commits. Fresh hosted GREEN validation remains required. Co-authored-by: Chinmayrawat15 <[email protected]>
a359bd3 to
dc4b03e
Compare
dc4b03e to
d990054
Compare
|
Merged via squash.
|
…sted] (openclaw#123083) * fix(update): route stored dev channel to the git update flow [AI-assisted] A package-detected launcher with a stored update.channel: dev resolved the npm "dev" dist-tag (which does not exist -> ETARGET) because switchToGit only honored an explicitly requested --channel dev. Base the decision on the effective channel and collapse the duplicated selectedChannel/channel computation, which is provably identical in every reachable case. Refs openclaw#123073 * docs(update): state the dev-channel git contract in the routing comment Review finding: "dev" can exist as a rare npm dist-tag, so the comment must not claim it never does; the routing rationale is the documented dev-channel git-checkout contract. * fix(update): keep one-off --tag on the package path for stored-dev installs --tag is documented as a one-run package-target override, so a stored dev channel must not divert a tagged update into the git flow (where the tag is ignored). An explicitly requested --channel dev still outranks the tag, matching existing explicit-channel behavior. * test(update): scope the package-to-git clone to a per-case OPENCLAW_GIT_DIR The stored-dev routing case performs a real transactional clone. On the default <home>/openclaw that directory outlived the case and made a later test fail with "OPENCLAW_GIT_DIR appeared while cloning". Test Plan: node --import tsx scripts/test-projects.mts src/cli/update-cli.test.ts Failing set now matches clean origin/main exactly (3 pre-existing macOS $TMPDIR symlink failures, unrelated to this change). Assisted by an AI coding assistant; reviewed before submitting. * test(update): verify stored dev routing on installed packages Temporary expected-failure verification for openclaw#123073. Restore only the routing owner to its pre-fix bytes while retaining the original contributor commits and adding installed-package regression coverage. This head must not merge; restore the reviewed fix and require hosted green proof after capturing the intended failure. * fix(update): restore stored dev routing after regression proof Restore the contributor's canonical effective-channel fix after the installed-package regression lane reproduced package routing for stored dev. Keep one-off tags on the package path and explicit dev precedence. Remove the obsolete source-text assertion now covered by installed CLI behavior and format the CI documentation table. Preserve all original contributor commits. Fresh hosted GREEN validation remains required. Co-authored-by: Chinmayrawat15 <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Chinmayrawat15 <[email protected]>
Maintainer verification
Current head
d990054e1a12f6fa6d52c67a246d128555b1a486changes only the first commit message's issue reference from an automatic-closing keyword toRefs #123073. All six source trees, subjects, remaining message bytes, human author identities/dates/order, and current committer metadata are identical to the already-green predecessordc4b03e9043d3c5d4f5a1952977692c91a6a6429. The original objects are backed up. Issue #123073 remains OPEN for its separate package-manager/workspace-install symptom; this PR proves the stored-channel routing repair only. New exact-head CI has now completed GREEN, including the installed-package lane and aggregate gate; its exact executed merge is audited below.Predecessor
dc4b03e9043d3c5d4f5a1952977692c91a6a6429was a metadata-only cleanup of verified code heada359bd3c90fdee1f1d88188654023a0e29dbaf60. All six commit trees, human author identities/dates/order, subjects, human coauthors, and other message bytes are preserved; only three historical AI coauthor trailers and three session-link trailers were removed. The original objects are backed up for provenance. New commits record the maintainer as committer and do not carry invalidated old signatures. Its exact-head CI completed GREEN, as detailed below.The temporary expected-failure head reproduced the bug through the actual installed package. The restored code keeps @Chinmayrawat15's original routing fix and all four contributor changes with their author attribution. Verified code head
a359bd3c90fdee1f1d88188654023a0e29dbaf60completed GREEN CI, including the installed-package transition lane.The updater's owner computed a stored effective
devchannel but selected Git only for an explicit--channel dev. The fix uses one effective-channel calculation and routes stored dev to the existing Git updater. A one-off--tagstill selects the package path; explicit--channel devstill takes precedence. The production runtime change is +10/−13 (net −3), removing duplicate channel calculation without new config, storage, compatibility fallback, or protocol changes.Existing channel contract and compatibility
This repair restores the documented persistent-dev intent, not a claim that the stable stored-dev runtime previously worked. Stable
v2026.7.1-2documents a persistent moving Git checkout, says dev ensures a Git checkout, and specifies that channel selection persists while the next update uses that configured channel. Its package/dev table also contradicts that intent by listing a rare npm dev tag; this PR corrects that row and the broken routing owner. It adds no channel, configuration key, default, or migration. The tested one-off package-tag exception and explicit-dev precedence remain intact. This addresses ClawSweeper's compatibility question as restoration of the existing documented intent, not a newly invented product contract.Fresh regression evidence
Final-head GREEN: CI run 33163447163 and aggregate gate passed on exact head
d990054e1a12f6fa6d52c67a246d128555b1a486: 218 successful checks, 42 skipped, one neutral, zero pending and no product failures. Two superseded routine dispatch/label jobs are canceled. The installed-package Docker job passedupdate-channel-switchin 280 seconds and all three MCP lanes after source package build/integrity validation. Actual executed PR merge6b2382aaa696a83fe07ba87df941ec2a7bd3b70cmerges this head into51b857099f257a4c56b048e4c7cbaabc56562c1c. All eight audited execution-closure files are byte-identical to the preceding reviewed merge371a6fdbfbbf437a5cc46f5bbd0dcbd6121587cd; package2026.8.1selects the modern controls. The verified fail-fast five-control/two-transition result applies to this exact new-head run, with the same explicit limits below: no individual CLI JSON retained, fixture build/lint no-ops and placeholder UI, and no upstream clone/build or gateway restart claim.Code-identical predecessor GREEN: CI run 33160767990 and its aggregate gate passed on
dc4b03e9043d3c5d4f5a1952977692c91a6a6429. The rollup has 219 successful checks, 47 skipped, one neutral, and none pending; the only canceled entry is a superseded routine labeler job, not a product/merge gate. The installed-package rerun passedupdate-channel-switchin 286 seconds plus all three MCP lanes, after fresh package build and integrity checks. Its ordinary PR merge checkout is371a6fdbfbbf437a5cc46f5bbd0dcbd6121587cd(predecessor head into4ef3b14275f46ed7caf45ca60c4b774bd9a6ae9e). All eight audited execution-closure files are byte-identical to the earlier reviewed run, including runtime owner, runner, assertions, modern-package compatibility selection, scheduler, package harness, CLI wrapper, and Dockerfile; package version remains2026.8.1. The five-control/two-transition result and proof limits below therefore apply to that predecessor rerun too.After-fix GREEN: CI run 33157640257 completed with all 220 successful checks and no pending or failed checks, including the aggregate gate. The installed-package Docker job built and integrity-checked the candidate tarball, passed the three unchanged MCP lanes, and passed
update-channel-switchin 274 seconds.That successful lane enforces five real installed-CLI dry-runs: stored dev/no override → Git; explicit dev → Git; explicit dev plus tag → Git; one-off tag → package; explicit stable → package. Each asserts that dry-run overrides leave the stored dev preference unchanged. It then enforces successful no-flag package→Git and Git→package updates, checking returned update status, mode, persisted channel, and detected installation kind. The executed ordinary PR merge was
52245bb379bd2775a17b26176330f2425d5a863b(restored head into9ba97a4148a3f9b1510d8011f132453d2e93d75c); its runner/assertion bytes match the reviewed candidate, and its2026.8.1package does not take the legacy-skip branch. Successful CI output retains the fail-fast lane summary, not individual CLI JSON payloads; these case counts follow the verified executed script and its successful exit.The restored CLI shard passed 5,763 tests with 42 skipped, including the previously failing stored-dev case and tag controls. The Docker-helper suite passed all 209 tests, with another 133 tooling tests passing in that job. Formatting, types, lint, and all remaining CI gates passed.
Expected-RED Docker run built and installed the candidate package from the ordinary PR merge containing verification head
fe8d8c089f5239b6083a0b0361af1c715ef2f4a9. Package integrity checks and all three unchanged MCP lanes passed. After the package-beta operation, setting storedupdate.channel=devand running the installedopenclaw update --dry-run --json --no-restartreturnedeffectiveChannel: "dev"butupdateInstallKind: "package",switchToGit: false, andtag: "openclaw@dev". The assertion failed with'package' !== 'git'. The first of five controls failed; the later controls and mutating Git transitions were not reached on that deliberately broken head.The unit shard independently reproduced the stored-dev routing failure: 5,762 passed, 42 skipped, one failed. Its explicit-dev-plus-tag and stored-dev one-off-tag controls passed.
The Git fixture comes from the candidate package, deliberately stubs build/lint, and supplies placeholder UI assets; this proves packaged updater routing and lifecycle, not a live upstream clone or compilation. Commands use
--no-restart, so gateway restart is not claimed. Existing legacy package acceptance retains its explicit dev switch. Ordinary fork PR CI is secretless and uses the existing Docker job; only the narrow owner-path selection map changed, with no workflow or runner changes.The RED run also exposed an obsolete source-text assertion expecting the literal explicit-dev command, now replaced by real CLI behavior coverage; that single grep assertion was removed. A CI docs table received formatter-only padding. Five other jobs timed out downloading a dependency before tests; those are infrastructure failures, not routing evidence, and no dependency or timeout workaround was added.
The latest ClawSweeper review's after-fix proof/CI request and rank-up move are addressed by the completed run above. Its live probe stopped after waiting 30 seconds for a marker printed only after package build; its captured output was still building, not a failed updater transition. No production timeout was changed. Its serialized-state heuristic points at test-fixture assertions; this PR introduces no production stored-data/schema change requiring migration.
The original contributor explanation and earlier evidence are preserved below as historical context. Earlier pass counts, revision IDs, LOC totals, and beta observations do not establish proof for the current head; the current source defect is also present in stable
v2026.7.1-2.Refs #123073
This PR proves the stored-channel routing repair. Issue #123073 remains open: its separate package-manager/workspace-install symptom still needs an independent original-flow closure audit. Source-level package-manager observations below are not proof that the entire issue is resolved.
What Problem This Solves
openclaw updatewith a storedupdate.channel: "dev"and a package-detected launcher (npm/global install on PATH after a package→dev transition) never selects the git-checkout update flow. The command stays in package mode and resolves the npm dist-tagdev, which does not exist, so every ordinary no-flag follow-up update fails with:This strands operators on whatever commit their first
--channel devrun checked out, despite the documented contract that the dev channel ensures a git checkout (docs/install/updating.md).The other half of #123073 (
EUNSUPPORTEDPROTOCOLfrom plainnpm installagainst the pnpm workspace) is already fixed on current main:src/infra/update-package-manager.tsresolves the checkout's preferred manager via pnpm → Corepack → a temporary npm-installed pnpm. This PR repairs the remaining source-proven routing defect identified in the ClawSweeper issue review.Why This Change Was Made
switchToGitinsrc/cli/update-cli/update-command.tsonly honored an explicitly requested--channel dev(requestedChannel), while the stored config channel flowed into the effective channel and even into the dev-target resolution (readDevUpdateTargetOrExitalready runs forchannel === "dev" && requestedChannel !== "dev") — but never into the install-mode decision. The fix basesswitchToGiton the effective channel.The change is net-negative production LOC because the pre-existing
selectedChannel(extended-stable guard) andchannelcomputations are provably identical in every reachable case: they can only diverge through their fallback branches, which fire only when bothrequestedChannelandstoredChannelare null — and in that caseswitchToGit/switchToPackagewere both necessarily false, soupdateInstallKind === installKindand the expressions coincide. The duplicate computation is collapsed into onechannel, and the routing decision moves onto it. For package installsresolveEffectiveUpdateChannelcan only returnstable/beta/extended-stable, so the git switch still triggers exclusively from an explicit flag or explicitly storeddevconfig — no non-dev user changes routing.Explicit-channel behavior is unchanged:
--channel devstill switches to git, explicitbeta/stableon a git install still switches to package, storedbetaon package installs still resolves the beta dist-tag.User Impact
Operators who switched to the dev channel and still launch through the package-installed binary get working no-flag
openclaw updateruns again: the update routes to the git checkout flow (same path as an explicit--channel dev), instead of dying against a nonexistent npm dist-tag with no actionable message.--dry-runnow also reports the git route for this configuration. Reported by @galli-personal.Evidence
Regression test written first and confirmed failing on pre-fix code for the intended reason (
runGatewayUpdatenever invoked because routing stayed in package mode):After the fix, per the issue's acceptance criteria:
node scripts/run-vitest.mjs src/cli/update-cli.test.ts→ 241 passed (241) — full suite, including the new matrix casenode scripts/check-changed.mjs --dry-run -- src/cli/update-cli/update-command.ts src/cli/update-cli.test.ts→ gate plan enumerated; locally executed from it:scripts/run-oxlint.mjs(clean),oxfmt --check(clean),pnpm tsgo:core(clean),pnpm tsgo:core:test(clean)update-command.ts; tests +10/−1Real-behavior proof (package-launcher boundary, before/after)
Both runs use the same isolated sandbox: a real
npm install -ginto a throwaway prefix (true package-detected launcher) and an isolatedOPENCLAW_STATE_DIRwhoseopenclaw.jsonis exactly{ "update": { "channel": "dev" } }. Read-only--dry-runon both sides; no operator state or gateway involved.Before — published
[email protected]from npm (shipped behavior): stays in package mode and targets the nonexistent npmdevdist-tag (a real run then fails with the reportedETARGET; note the spurious downgrade warning caused by the failed tag resolution):After — this PR's build (packaged via
scripts/package-openclaw-for-docker.mjs, tarball integrity check passed, installed into a second isolated prefix): routes to the git flow:A real mutating update was intentionally not run on this workstation: the package update path may stop a detected managed gateway service, which is operator-owned here. The real-run
ETARGETfailure is already captured verbatim in #123073 by the reporter; the dry-runs above isolate exactly the routing decision this PR changes, through the real package-launcher boundary on both sides.Exact-head CI:
openclaw/ci-gatesuccess on6ecfe26d210cwith thechecks-node-compact-*vitest shards executed (verified attached, not just the rollup).Sibling path: one-off
--tagon a stored-dev install (added in 683b47d57)Same sandbox, rebuilt from the current head. The stored-dev git routing is unchanged, and an explicit one-off
--tagnow stays on the documented package path (with the normal downgrade guard engaging against the resolved target):An explicitly requested
--channel devstill outranks the tag (existing explicit-channel behavior, unchanged). This absorbs the P1 finding ClawSweeper raised on the closed duplicate #123121 ("Preserve one-off tags before switching stored-dev installs"); the regression case was proven failing before the carve-out (the git updater was invoked for a tagged run).