Skip to content

fix(update): reject mixed-case main package targets - #191994

Merged
vincentkoc merged 6 commits into
mainfrom
refactor-update-host-compatibility-20261103
Nov 3, 2026
Merged

vincentkoc merged 6 commits into
mainfrom
refactor-update-host-compatibility-20261103

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Package installs could admit MAIN, Main, or openclaw@MAIN into a retired GitHub-package path despite the intended main refusal. Windows task-preflight failures also recommended that unsupported install.

User Impact

These targets now fail before metadata lookup or staging, preserve recorded update status, and point to openclaw update --channel dev. Older installed CLIs need replacement before receiving this repair.

Why This Change Was Made

Reuse the existing case-insensitive classifier at admission and Windows guidance; delete the alias translation and its metadata exception. Explicit Git/artifact specs, overrides, and Git/dev selection retain their contracts. This completes #125949.

Production -3 lines; TypeScript tests zero net lines; packaged E2E +15. Counted-name budget 460 → 459 follows the deleted constant. No new config or migration. Release-note context: mixed-case main package targets receive supported dev-channel guidance.

Validation

  • Original production plus new regressions: 5 expected failures, covering admission/status and Windows guidance; lowercase and other selected rows pass.
  • Current-head CI passed the original ordered Doctor/Windows group 56/56, including all three signal variants and both new admission rows. Current-head lint also passed. The full CI run, including Docker seed, baseline ratchets and PostgreSQL conformance, passed.
  • Formatting, syntax, whitespace/privacy checks, signed hooks, and local ratchets passed. Formal local review and independent lifecycle review found no actionable issue. ClawSweeper's exact-head review of 74f536fa1219930b56c8b44fcc44fe2d8f91d95c has zero findings and no before-merge actions.
  • Package Acceptance passed build, integrity, npm 12 installation and all four first-attempt product lanes: onboarding, real local agent/model plugin-tool execution, installed MAIN refusal/channel switching, and published-upgrade preservation. Survivor baseline 2026.10.9 installed candidate 2026.10.10, with migration/survival assertions passing.
  • Package revision 2c91bb6 has identical production/E2E inputs to this head; reused-input proof, not a final-head package execution. Candidate SHA256: ca702f8fe3f91a913dd2b6cdb6a38ddf52600183706d13a13a8938ea92d6b674.
  • Diagnostic CI exposed a signal-fixture lifecycle gap: it invoked the updater without the executable's whole-command gate, allowing snapshot cleanup to cancel recovery reads. The test now models that existing gate and joins shutdown before ledger assertions and on rejection. All restoration assertions and repeated-signal ordering remain; production cleanup is unchanged.

Physical Windows was not exercised. Onboarding uses a mock model; the real-model plugin lane uses a local agent. Survivor proof is not a latest-as-of-dispatch claim.

Follow-up: a prior Docker seed job failed inside npm pack; its underlying cause remains unresolved. Current-head package preparation and seed scenarios pass.

Share package target admission with Windows recovery guidance and remove the retired bare-main GitHub package translation. Keep explicit Git and artifact specs intact.

Release note: package-installed updaters now reject MAIN, Main, and openclaw@MAIN with the same supported dev-channel guidance as main. Existing installed updaters need this CLI change before they benefit.
@vincentkoc vincentkoc self-assigned this Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes scripts Repository scripts docker Docker and sandbox tooling size: S labels Nov 3, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 3, 2026 15:08
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

Please review head 2c91bb6cc37b81df6117bbf7474d8367ee74d047: mixed-case main package-target refusal, removal of the retired source-package alias, and Windows dev-channel guidance. The packaged CLI refusal probe and latest-stable upgrade/live-agent package checks are running; no passing claim for pending jobs.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Reject mixed-case main package targets, remove their obsolete GitHub translation, and give Windows users supported dev-channel guidance.

Example: A package-installed user runs openclaw update --tag MAIN --yes --json.

  • Before: MAIN bypasses the lowercase refusal and reaches the obsolete GitHub-package path.
  • After: The command returns unsupported-package-target before metadata lookup or staging and recommends openclaw update --channel dev.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair with reusable installed-package proof and meaningful admission and recovery regressions.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): Package Acceptance exercised the installed CLI's MAIN refusal and channel preservation in Docker using production/E2E inputs verified unchanged at this head, resolving the prior rank-up request; detailed log downloads were sandbox-blocked, and physical Windows execution is not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Mixed-case main update targets reach an unsupported package path, and Windows recovery can recommend that same path.
Reason: The maintainer-authored change completes an established refusal contract and preserves the supported alternatives.

Merge readiness

✅ Ready for maintainer review

This PR completes the existing main-target refusal with a focused fix; no actionable defect was found, and current-head CI remains pending.

Priority: P2
Reviewed head: 74f536fa1219930b56c8b44fcc44fe2d8f91d95c

Before merge

None.

Findings

None.

Agent review details

How this fits together

The update CLI normalizes target input, selects package or Git installation, and admits supported targets before metadata lookup, staging, and activation.

flowchart LR
A[Update CLI input] --> B[Normalize target and select channel]
B --> C[Package target admission]
C --> D[Structured refusal and dev guidance]
C --> E[Metadata and package staging]
B --> F[Git checkout and build flow]
Loading

Technical review

Best possible solution:

Use the shared classifier at admission and Windows guidance while retaining explicit package specs and the existing Git/dev owner.

Do we have a high-confidence way to reproduce the issue?

Current main visibly admits MAIN through its case-sensitive refusal and then recognizes it in the obsolete case-insensitive package translation; no target code was executed during this review.

Is this the best way to solve the issue?

The patch is the smallest complete fix: reuse one classifier, remove its obsolete translation, and correct the affected guidance without changing explicit-spec or Git/dev contracts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 45c571ed441b.

Provenance checked

  • Main shorthand admission keeps the original intent (fix: stop --tag main from failing during npm pack #125949: Reject the impossible main package shortcut before mutation and direct users to the Git/dev flow while retaining explicit specs.)
  • Main package translation and metadata exception changes intended behavior with a stated reason (5a7aba9: Support package-manager main installs without requiring a source checkout; the later narrow refusal retired that shortcut.)
  • Windows manual recovery guidance keeps the original intent (e664e7c: Provide actionable recovery after Task Scheduler denies update control.)
  • Signal-test command lifetime keeps the original intent (98813c2: Retain admitted CLI work through cleanup before natural process exit; the fixture now models the existing executable command gate.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 5a7aba9 adds src/infra/update-global.ts:104 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5a7aba94a2bf; files: src/infra/update-global.ts)
  • Peter Steinberger: Raw commit e664e7c adds src/cli/update-cli/update-command-windows-preflight.ts:53 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e664e7ceff1b; files: src/cli/update-cli/update-command-windows-preflight.ts)

PR surface

Source -3, Tests 0, Other +15. Total +12 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 14 17 -3
Tests 4 42 42 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 17 2 +15
Total 10 73 61 +12

Review metrics

Metric Value Why it matters
Production versus regression proof Production +14/−17; tests and E2E +58/−43 Production shrinks, TypeScript tests remain net zero, and the E2E growth exercises refusal through the installed CLI.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: Previously admitted mixed-case main inputs now fail immediately; the maintainer-authored change explicitly accepts this extension of the existing refusal and provides dev-channel guidance.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This repairs a bounded advanced update-target failure with a supported alternative.
  • merge-risk: 🚨 compatibility: Previously admitted mixed-case main inputs now fail immediately; the maintainer-authored change explicitly accepts this extension of the existing refusal and provides dev-channel guidance.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-03T15:15:00.852Z sha 2c91bb6 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-03T15:47:02.959Z sha 23c19b6 :: needs maintainer review before merge. :: none

Reviewed November 3, 2026, 11:56 AM ET / 16:56 UTC (Revision 3).

Lower the counted-name budget after retiring the main package-spec constant. Share Windows table outcome assertions and default the tag at the callback boundary, preserving every admission case without growing TypeScript test lines. Remove the now-unneeded allocation.
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review head 23c19b6a68f4a38649d288f918ee2d28e0dfa475. The follow-up changes only ratchet metadata and test organization: counted names now 459/459, TypeScript tests net zero, all seven Windows admission rows and assertions retained. Formal follow-up review found no actionable findings. Production updater and packaged E2E files are identical to 2c91bb6.

The PR body records the original, still-unattributed Bun SIGBREAK failure and the stopped/queued replay (no tests executed). Fresh ordinary CI is running. Package Acceptance at the unchanged production/harness revision has passed build, integrity, npm install, onboarding, and real local-model/plugin-tool execution; channel switching/MAIN refusal and latest-stable upgrade preservation remain running. No passing claim for those pending lanes.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
Retain the mocked updater output on the original signal-test promise so its cleanup await cannot replace the diagnostic with a bare exit exception. Use the same promise wrapper in the adjacent no-restart test, preserving assertions and the test-line budget.
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head fb18f7c885fdcd455209eba430b713ea39c8b380. The production/E2E inputs remain identical to package-tested 2c91bb6; all four completed package lanes and the MAIN/preservation receipts are recorded in the PR body (survivor baseline 2026.10.9, candidate 2026.10.10).

CI at 4f1e6fc passed the original ordered Doctor/Windows group 56/56, including SIGBREAK restoration and both new admission rows. The signal fixture now models the executable's whole-command gate and joins shutdown before ledger assertions and on rejection. Latest follow-up only makes the finalizer return no value, repairing its concrete no-misused-promises diagnostic; independent source review, formatting, signed hooks and zero-net-test-line ratchet passed.

Fresh automatic CI is pending. The prior Docker seed job stopped during npm pack with npm's internal-error message, before seed scenarios; its cause remains unknown and no inherited-failure exemption is claimed. Please assess the complete current change and remaining actionable findings/rank-up moves; no merge has been submitted.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@vincentkoc
vincentkoc enabled auto-merge (squash) November 3, 2026 17:15
@vincentkoc
vincentkoc merged commit ad5218d into main Nov 3, 2026
153 of 154 checks passed
@vincentkoc
vincentkoc deleted the refactor-update-host-compatibility-20261103 branch November 3, 2026 17:24
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
* fix(update): reject mixed-case main package targets

Share package target admission with Windows recovery guidance and remove the retired bare-main GitHub package translation. Keep explicit Git and artifact specs intact.

Release note: package-installed updaters now reject MAIN, Main, and openclaw@MAIN with the same supported dev-channel guidance as main. Existing installed updaters need this CLI change before they benefit.

* test(update): keep target admission coverage within ratchets

Lower the counted-name budget after retiring the main package-spec constant. Share Windows table outcome assertions and default the tag at the callback boundary, preserving every admission case without growing TypeScript test lines. Remove the now-unneeded allocation.

* test(update): expose Windows recovery failures

Retain the mocked updater output on the original signal-test promise so its cleanup await cannot replace the diagnostic with a bare exit exception. Use the same promise wrapper in the adjacent no-restart test, preserving assertions and the test-line budget.

* test(update): retain command through signal cleanup

* test(update): discard signal cleanup exit result

* test(update): join signal cleanup outside promise finalizer
RomneyDa added a commit that referenced this pull request Nov 16, 2026
Retain the package refusal and channel-switch checks for pre-#191994 candidates without enabling frozen scenario omissions.

Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 16, 2026
* fix(ci): match update refusal probe to selected candidate

Retain the package refusal and channel-switch checks for pre-#191994 candidates without enabling frozen scenario omissions.

Co-authored-by: RomneyDa <[email protected]>

* test: include selected update contract in parent admission fixture

The default parent admission fixture must include both committed source files now consumed by the update refusal contract. The exact failed parent case fails before and passes after this fixture-only change.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
…00043)

* fix(ci): match update refusal probe to selected candidate

Retain the package refusal and channel-switch checks for pre-openclaw#191994 candidates without enabling frozen scenario omissions.

Co-authored-by: RomneyDa <[email protected]>

* test: include selected update contract in parent admission fixture

The default parent admission fixture must include both committed source files now consumed by the update refusal contract. The exact failed parent case fails before and passes after this fixture-only change.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[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 docker Docker and sandbox tooling 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: 🐚 platinum hermit Good normal PR readiness with ordinary 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.

1 participant