Skip to content

fix(update): route stored dev channel to the git update flow [AI-assisted] - #123083

Merged
steipete merged 6 commits into
openclaw:mainfrom
Chinmayrawat15:fix/update-stored-dev-channel-git-routing
Aug 28, 2026
Merged

steipete merged 6 commits into
openclaw:mainfrom
Chinmayrawat15:fix/update-stored-dev-channel-git-routing

Conversation

@Chinmayrawat15

@Chinmayrawat15 Chinmayrawat15 commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer verification

Current head d990054e1a12f6fa6d52c67a246d128555b1a486 changes only the first commit message's issue reference from an automatic-closing keyword to Refs #123073. All six source trees, subjects, remaining message bytes, human author identities/dates/order, and current committer metadata are identical to the already-green predecessor dc4b03e9043d3c5d4f5a1952977692c91a6a6429. 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 dc4b03e9043d3c5d4f5a1952977692c91a6a6429 was a metadata-only cleanup of verified code head a359bd3c90fdee1f1d88188654023a0e29dbaf60. 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 a359bd3c90fdee1f1d88188654023a0e29dbaf60 completed GREEN CI, including the installed-package transition lane.

The updater's owner computed a stored effective dev channel 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 --tag still selects the package path; explicit --channel dev still 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-2 documents 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 passed update-channel-switch in 280 seconds and all three MCP lanes after source package build/integrity validation. Actual executed PR merge 6b2382aaa696a83fe07ba87df941ec2a7bd3b70c merges this head into 51b857099f257a4c56b048e4c7cbaabc56562c1c. All eight audited execution-closure files are byte-identical to the preceding reviewed merge 371a6fdbfbbf437a5cc46f5bbd0dcbd6121587cd; package 2026.8.1 selects 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 passed update-channel-switch in 286 seconds plus all three MCP lanes, after fresh package build and integrity checks. Its ordinary PR merge checkout is 371a6fdbfbbf437a5cc46f5bbd0dcbd6121587cd (predecessor head into 4ef3b14275f46ed7caf45ca60c4b774bd9a6ae9e). 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 remains 2026.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-switch in 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 into 9ba97a4148a3f9b1510d8011f132453d2e93d75c); its runner/assertion bytes match the reviewed candidate, and its 2026.8.1 package 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 stored update.channel=dev and running the installed openclaw update --dry-run --json --no-restart returned effectiveChannel: "dev" but updateInstallKind: "package", switchToGit: false, and tag: "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.

AI-assisted contribution (Claude), human-reviewed and driven by @Chinmayrawat15, per CONTRIBUTING's AI policy.

What Problem This Solves

openclaw update with a stored update.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-tag dev, which does not exist, so every ordinary no-flag follow-up update fails with:

npm error code ETARGET
npm error notarget No matching version found for openclaw@dev

This strands operators on whatever commit their first --channel dev run checked out, despite the documented contract that the dev channel ensures a git checkout (docs/install/updating.md).

The other half of #123073 (EUNSUPPORTEDPROTOCOL from plain npm install against the pnpm workspace) is already fixed on current main: src/infra/update-package-manager.ts resolves 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

switchToGit in src/cli/update-cli/update-command.ts only honored an explicitly requested --channel dev (requestedChannel), while the stored config channel flowed into the effective channel and even into the dev-target resolution (readDevUpdateTargetOrExit already runs for channel === "dev" && requestedChannel !== "dev") — but never into the install-mode decision. The fix bases switchToGit on the effective channel.

The change is net-negative production LOC because the pre-existing selectedChannel (extended-stable guard) and channel computations are provably identical in every reachable case: they can only diverge through their fallback branches, which fire only when both requestedChannel and storedChannel are null — and in that case switchToGit/switchToPackage were both necessarily false, so updateInstallKind === installKind and the expressions coincide. The duplicate computation is collapsed into one channel, and the routing decision moves onto it. For package installs resolveEffectiveUpdateChannel can only return stable/beta/extended-stable, so the git switch still triggers exclusively from an explicit flag or explicitly stored dev config — no non-dev user changes routing.

Explicit-channel behavior is unchanged: --channel dev still switches to git, explicit beta/stable on a git install still switches to package, stored beta on 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 update runs 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-run now 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 (runGatewayUpdate never invoked because routing stayed in package mode):

FAIL src/cli/update-cli.test.ts > update-cli > routes a stored dev channel on package installs to the git update flow
AssertionError: expected undefined to be 'dev'

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 case
  • node 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)
  • Structured autoreview (uncommitted mode): clean, no accepted/actionable findings; TruffleHog clean
  • Production LOC delta: +5/−12 (net −7) in update-command.ts; tests +10/−1

Real-behavior proof (package-launcher boundary, before/after)

Both runs use the same isolated sandbox: a real npm install -g into a throwaway prefix (true package-detected launcher) and an isolated OPENCLAW_STATE_DIR whose openclaw.json is exactly { "update": { "channel": "dev" } }. Read-only --dry-run on both sides; no operator state or gateway involved.

Before — published [email protected] from npm (shipped behavior): stays in package mode and targets the nonexistent npm dev dist-tag (a real run then fails with the reported ETARGET; note the spurious downgrade warning caused by the failed tag resolution):

$ OPENCLAW_STATE_DIR=<sandbox>/state <sandbox>/prefix-published/bin/openclaw update --dry-run
Update dry-run
No changes were applied.

  Root: <sandbox>/prefix-published/lib/node_modules/openclaw
  Install kind: package
  Mode: npm
  Channel: dev
  Tag/spec: openclaw@dev
  Current version: 2026.8.1-beta.1
  Downgrade confirmation would be required in a real run.

Planned actions:
  - Run global package manager update with spec openclaw@dev

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:

$ OPENCLAW_STATE_DIR=<sandbox>/state <sandbox>/prefix-fixed/bin/openclaw update --dry-run
Update dry-run
No changes were applied.

  Root: <sandbox>/prefix-fixed/lib/node_modules/openclaw
  Install kind: package
  Mode: git
  Channel: dev
  Tag/spec: dev

Planned actions:
  - Switch install mode from package to git checkout (dev channel)
  - Run plugin update sync after core update

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 ETARGET failure 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-gate success on 6ecfe26d210c with the checks-node-compact-* vitest shards executed (verified attached, not just the rollup).

Sibling path: one-off --tag on 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 --tag now stays on the documented package path (with the normal downgrade guard engaging against the resolved target):

$ OPENCLAW_STATE_DIR=<sandbox>/state <sandbox>/prefix-fixed2/bin/openclaw update --dry-run
  Install kind: package
  Mode: git
  Channel: dev

$ OPENCLAW_STATE_DIR=<sandbox>/state <sandbox>/prefix-fixed2/bin/openclaw update --tag latest --dry-run
  Install kind: package
  Mode: npm
  Channel: dev
  Tag/spec: [email protected]
  Current version: 2026.8.1
  Target version: 2026.7.1-2
  Downgrade confirmation would be required in a real run.

An explicitly requested --channel dev still 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).

@clawsweeper

clawsweeper Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@Chinmayrawat15

Copy link
Copy Markdown
Contributor Author

Evidence updated in the PR body: added a before/after real-behavior proof through the actual package-launcher boundary — published [email protected] (npm prefix install, stored dev channel, isolated OPENCLAW_STATE_DIR) plans Mode: npm with spec openclaw@dev (the nonexistent dist-tag behind the reported ETARGET), while this PR's packaged build (scripts/package-openclaw-for-docker.mjs, integrity check passed) plans Mode: git with the package→git switch action. Exact-head CI is green with the checks-node-compact-* vitest shards verified attached.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 13, 2026
@clawsweeper

clawsweeper Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 6:22 AM ET / 10:22 UTC.

ClawSweeper review

What this changes

This PR makes a package installation with saved update.channel: dev use the Git checkout updater, while preserving one-off package-tag updates.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep 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
Reviewed head: dc4b03e9043d3c5d4f5a1952977692c91a6a6429
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The patch is a focused owner-level correction with strong packaged-install proof and coverage of the tag-precedence boundary.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Exact-head hosted packaged-install evidence demonstrates the saved-dev path entering the real Git updater and completing the checked transitions.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Exact-head hosted packaged-install evidence demonstrates the saved-dev path entering the real Git updater and completing the checked transitions.
Evidence reviewed 7 items Current-main defect: Current main selects the Git path only for an explicitly requested dev channel, then separately derives the effective saved channel; a saved dev channel on a package install therefore remains on the package path.
Introduced repair: The PR computes the effective channel once and routes saved dev to Git only when no one-off tag overrides it; explicit dev continues to take precedence.
Execution owner: The execution layer dispatches according to the selected update-install kind, so the routing decision reaches the existing Git updater rather than creating a parallel update path.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Should a package installation with saved update.channel: dev transition to the documented Git checkout updater when no one-off tag is supplied? Accept saved-dev Git routing: Adopt the effective-channel rule so saved and explicit dev preferences use the same Git update flow, while a one-off tag remains package-based.

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

  • Resolve merge risk (P1) - Merging changes the update mechanism for existing package installs with saved update.channel: dev: they will create and update a Git checkout instead of attempting an npm dist-tag update.
  • Complete next step (P2) - The repair and proof are ready; the remaining action is explicit maintainer acceptance of the existing-install compatibility change.
Agent review details

Security

None.

PR surface

Source -3, Tests +43, Docs +3, Other +42. Total +85 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 1 10 13 -3
Tests 3 46 3 +43
Docs 2 7 4 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 3 48 6 +42
Total 9 111 26 +85

Review metrics

Metric Value Why it matters
Production versus test delta production -3; regression, packaged-E2E, planner, and documentation coverage changed The routing owner is simplified while the behavior is covered at unit and packaged-install boundaries.
Saved-channel behavior 0 added, 1 changed, 0 removed A saved dev channel now changes package installs to Git routing unless a one-off tag is supplied.

Stored data model

Persistent data-model change detected: serialized state: scripts/e2e/lib/update-channel-switch/assertions.mjs. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #123073
Summary: This PR is the candidate repair for the stored-dev routing component of the updater report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Accept the saved-dev transition (recommended)
    Confirm that saved dev is a durable request for Git checkout updates and retain the tested tag override.
  2. Pause pending compatibility policy
    Do not merge if a saved dev preference must remain package-based for existing installations.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: The PR repairs a bounded but operator-visible updater-routing defect.
  • merge-risk: 🚨 compatibility: Saved preferences on existing package installs now select a different update mechanism.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Exact-head hosted packaged-install evidence demonstrates the saved-dev path entering the real Git updater and completing the checked transitions.
  • proof: sufficient: Contributor real behavior proof is sufficient. Exact-head hosted packaged-install evidence demonstrates the saved-dev path entering the real Git updater and completing the checked transitions.

Evidence

Acceptance criteria:

  • [P1] Review the exact-head packaged-update evidence.
  • [P1] Confirm the saved-dev package-to-Git compatibility contract.

What I checked:

Likely related people:

  • steipete: Peter Steinberger restored the canonical routing change in the exact PR head and recently maintained the surrounding updater path. (role: recent area contributor; confidence: high; commits: dc4b03e9043d, 4377b6423c8e; files: src/cli/update-cli/update-command.ts, src/cli/update-cli/update-command-execution.ts)

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 (15 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-18T19:45:12.783Z sha d17eda8936937c6212c54133b4abce0925979466 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-18T20:02:45.349Z sha 2877fdc1e32a1b4d4619fd194769e8f9a34d5e21 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T01:55:31.500Z sha 07c6eb3c04b74a141cd088b1b06a9de723ffadfb :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T02:37:38.941Z sha 07c6eb3c04b74a141cd088b1b06a9de723ffadfb :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T08:33:43.746Z sha fe8d8c089f5239b6083a0b0361af1c715ef2f4a9 :: needs real behavior proof before merge. :: [P1] Restore the updater routing before asserting the installed-package flow | [P1] Do not publish the Git-switch contract without its implementation
  • reviewed 2026-08-28T09:08:05.443Z sha a359bd3c90fdee1f1d88188654023a0e29dbaf60 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-28T09:35:27.006Z sha a359bd3c90fdee1f1d88188654023a0e29dbaf60 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T09:54:16.528Z sha dc4b03e9043d3c5d4f5a1952977692c91a6a6429 :: needs maintainer review before merge. :: none

@Chinmayrawat15

Copy link
Copy Markdown
Contributor Author

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 — node scripts/run-vitest.mjs src/cli/update-cli.test.ts 241/241 green, git diff --check clean. No behavior change (comment-only), so the prior real-behavior proof and transcripts remain valid for this head.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 13, 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:

@vincentkoc vincentkoc added the dedupe:parent Primary canonical item in dedupe cluster label Aug 13, 2026
@vincentkoc vincentkoc self-assigned this Aug 13, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 13, 2026
@Chinmayrawat15

Copy link
Copy Markdown
Contributor Author

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"): --tag is documented as a one-run package-target override, so a stored-dev package install now stays on the package path when an explicit tag is given — while an explicitly requested --channel dev still outranks the tag, matching existing explicit-channel behavior. Regression case added to the same matrix (proven failing pre-change: the git updater was invoked for a tagged run); full update-cli suite 242/242 green, tsgo core/core-test and format clean, fresh structured autoreview clean. Sandbox transcript for the tag path lands in the PR body Evidence section shortly.

@Chinmayrawat15

Copy link
Copy Markdown
Contributor Author

Evidence section updated with the rebuilt-sandbox transcripts for the tag sibling path. @clawsweeper re-review

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 13, 2026
@Chinmayrawat15

Copy link
Copy Markdown
Contributor Author

On the merge-risk: 🚨 compatibility item, one point worth having in a single place: this route change affects no working flow. Pre-fix, a stored-dev package-launcher update has no successful path on the changed route — the no-flag run resolves the npm dev dist-tag and fails with ETARGET before any install (transcript in the body, and verbatim in #123073). So the package→git switch applies only to invocations that currently error, restoring the documented dev contract (docs/install/updating.md). Every explicit escape existing users may rely on is preserved: --channel stable|beta|extended-stable still routes to the package path unchanged, and a one-off --tag now explicitly retains package mode via the carve-out with its own regression case. Both retained routes the review's merge item names (no-flag git route, explicit-tag package route) are covered by the matrix cases at src/cli/update-cli.test.ts:3830 and proven in the sandbox transcripts.

@Chinmayrawat15
Chinmayrawat15 force-pushed the fix/update-stored-dev-channel-git-routing branch from 683b47d to 2666045 Compare August 16, 2026 18:04
@Chinmayrawat15

Copy link
Copy Markdown
Contributor Author

The checks-node-compact-large-2 failure on the rebased head 26660450c is unrelated to this PR: the failing test is src/gateway/server-methods/agent.test.ts > gateway agent handler chat.abort integration > yields after the accepted ack before dispatching heavy agent work — a gateway-dispatch scheduling-order assertion, file-disjoint from this PR's diff (only src/cli/update-cli/*). The same three patches were green on the pre-rebase head (683b47d57, git range-diff confirms byte-identical patches), and the test passes locally against current-main content: node scripts/run-vitest.mjs src/gateway/server-methods/agent.test.ts -t "yields after the accepted ack" → 1 passed. The assertion (mock not-yet-called across an event-loop yield) is timing-sensitive under CI shard load. A re-run of the shard should clear it; happy to push a no-op rebase instead if that's preferred.

@Chinmayrawat15
Chinmayrawat15 force-pushed the fix/update-stored-dev-channel-git-routing branch 2 times, most recently from 458c872 to 8f9cd3e Compare August 18, 2026 06:03
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 28, 2026
@steipete

Copy link
Copy Markdown
Contributor

@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.

@clawsweeper

clawsweeper Bot commented Aug 28, 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.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 28, 2026
@steipete

steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Final exact head d990054e1a12f6fa6d52c67a246d128555b1a486 is GREEN: CI run, aggregate gate, and installed-package Docker proof. The rollup has 218 successful checks, 42 skipped, one neutral, none pending and no product failures; two superseded routine dispatch/label jobs are canceled. Docker passed the updater lane in 280 seconds and all three MCP lanes after source build and package integrity validation.

Actual executed merge 6b2382aaa696a83fe07ba87df941ec2a7bd3b70c contains the exact head. Its eight runtime/assertion/execution-closure files are byte-identical to the previously audited merge, and package 2026.8.1 selects all five routing controls plus the real no-flag package→Git and Git→package transitions. These counts follow the exact fail-fast executed source and successful lane exit; individual CLI JSON is not retained. The package-derived Git fixture intentionally stubs build/lint and supplies placeholder UI. This is packaged updater lifecycle proof, not a live upstream clone/build or gateway restart claim (--no-restart).

The same installed-package lane failed before the fix because stored dev returned package mode and openclaw@dev. The original restored code head passed 5,763 CLI tests (42 skipped), 209 Docker-helper tests and an additional 133 tooling tests; those owners also passed final-head CI. Fresh structured P2 and independent source/evidence reviews found no actionable source defect. Both metadata-only corrections were separately reviewed; all six code trees and human authorship are preserved, with original objects backed up.

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.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 28, 2026
Chinmayrawat15 and others added 6 commits August 28, 2026 02:39
…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]>
@steipete
steipete force-pushed the fix/update-stored-dev-channel-git-routing branch from a359bd3 to dc4b03e Compare August 28, 2026 09:46
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 28, 2026
@steipete
steipete force-pushed the fix/update-stored-dev-channel-git-routing branch from dc4b03e to d990054 Compare August 28, 2026 10:27
@steipete
steipete merged commit 3f749b9 into openclaw:main Aug 28, 2026
267 of 269 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes dedupe:parent Primary canonical item in dedupe cluster docker Docker and sandbox tooling docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: S 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.

3 participants