Skip to content

fix(migration): Store migration blocked for Native Gateway users and correction releases - #1675

Merged
RomneyDa merged 3 commits into
openclaw:mainfrom
natalie-aguinaldo:pr/1374
Oct 16, 2026
Merged

RomneyDa merged 3 commits into
openclaw:mainfrom
natalie-aguinaldo:pr/1374

Conversation

@natalie-aguinaldo

@natalie-aguinaldo natalie-aguinaldo commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Related: #1374

What Problem This Solves

Fixes: Store migration refuses to start for users who set up the Native Gateway, and treats stable correction releases such as v2026.9.8-1 as unsupported, so the Store app stays locked behind "Update Required" or a validation failure.

User Impact

User impact: people on a correction release, or with a Native Gateway set up, can now move from the Inno (.exe) app to the Store version and keep their existing gateway connection.

Why This Change Was Made

  • Native Gateway draft: Native setup intentionally keeps gateways\native-setup-draft.json after setup. The migration inventory treated it as an unexpected file and refused. It is now recognized by exact name, and checked for consistency during capture so a draft created mid-capture cannot slip through.
  • Correction releases: X.Y.Z-N now maps to Version(X,Y,Z,N). The installed source is only accepted when its FileVersion is the base X.Y.Z.0 and its ProductVersion carries the exact release identity (optional +build metadata allowed). Base releases reject a ProductVersion with a correction suffix.
  • Matching for draft and temp names is ordinal and case-sensitive. docs/RELEASING.md documents the draft and the correction-version floor.

Evidence

Real migration on a machine that reproduced both bugs: v2026.9.8-1 Inno app with a Native Gateway set up and the draft present. The migration offer appeared, validation succeeded, finalization completed after uninstall, and the Store-identity app reconnected to the same Native Gateway. Screenshots and the redacted log are under Real Behavior Proof.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-clean-installer-upgrade: Inno to Store MSIX migration path using a released Inno build as the source.

Validation

  • ./build.ps1: passed
  • Focused migration tests (OpenClaw.Connection.Tests migration classes): 285/285 passed
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4,262 passed, 35 skipped, 0 failed
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 3,996 passed, 0 failed
  • git diff --check: clean
  • Hanselman dual-model review (Opus 5.5 + GPT-6 Astra), two delta rounds: all findings fixed, final round clean on both models.

New tests cover: correction parsing and the version floor; FileVersion/ProductVersion provenance (matching, mismatched, missing, malformed, base vs correction); draft accepted as a file, rejected as a directory or reparse point, and a draft appearing mid-capture; case-variant and malformed draft/temp names.

Real Behavior Proof

  • Environment tested: Windows 11 VM, Inno OpenClaw Companion 2026.9.8-1 (DisplayVersion 2026.9.8-1, FileVersion 2026.9.8.0, ProductVersion 2026.9.8-1+2ba89f37...) with the Native Gateway set up on ws://127.0.0.1:63360 and native-setup-draft.json present. Target: production-identity migration-test MSIX (OpenClawFoundation.OpenClaw 2026.9.5.0, test-signed) built from this branch.
  • PR head or commit tested: 92f47c6e
  • Exact steps or command run:
    1. Removed the previously installed Store build (newer version blocked the test package) and confirmed no migration receipt.
    2. Add-AppxPackage -Path OpenClaw-MigrationTest-x64.msix -ForceApplicationShutdown, launched OpenClaw from Start.
    3. Chose Migrate, uninstalled OpenClaw Companion from Installed apps, chose Retry.
  • Evidence before fix:

Correction release v2026.9.8-1 installed, but the Store version told the user to update it to a supported version:

Before: correction release rejected

[17:45:54] Store migration startup admission: UpdateInno (receipt: False, source payload: True).
[17:46:52] Store migration startup admission: UpdateInno (receipt: False, source payload: True).

Native Gateway user: migration refused because the inventory rejected the retained gateways\native-setup-draft.json (expected a directory, found a file):

Before: native draft rejected

  • Evidence after fix:

Migration offer (previously Update Required / validation failure):

Migration offer

Validation succeeded with the draft present:

Validated, remove previous app

Uninstalling the previous Inno app:

Uninstall OpenClaw Companion

Store-identity app connected to the same Native Gateway after migration:

Connected after migration

Post-migration state (draft kept, receipt cleared by finalization, test package installed, no Inno uninstall entry):

Post-migration checks

Redacted tray log:

Migration log

[17:36:02] Store migration startup admission: ConsentRequired (receipt: False, source payload: False).
[17:36:16] Store migration preparation completed: [REDACTED_ID].
[17:36:16] Store migration completion recorded: [REDACTED_ID].
[17:37:16] Store migration startup admission: FinalizationRequired (receipt: True, source payload: False).
[17:37:16] Store migration finalized: [REDACTED_ID].
  • Observed result: full migration succeeded. Finalization re-captures the inventory and compares it to the receipt, so the draft passed both validation and finalization.
  • Screenshot or artifact links verified? Yes
  • Not verified or blocked: not run with a Store-signed package. The proof used a test-signed MSIX with the production identity, since a Dev identity cannot exercise migration.

Security Impact

  • New permissions or capabilities? No
  • Secrets or tokens handling changed? No
  • New or changed network calls? No
  • Command or tool execution surface changed? No
  • Data access scope changed? No
  • If any answer is Yes, explain the risk and mitigation: N/A

Compatibility and Migration

  • Backward compatible? Yes
  • Config or environment changes? No
  • Migration needed? No
  • If yes, list the exact upgrade steps: N/A

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

natalie-aguinaldo and others added 2 commits October 7, 2026 16:27
Allow the credential-free Native Gateway setup draft and its exact atomic-write temp siblings during Store migration inventory while continuing to reject unrelated files.

Co-authored-by: Copilot <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P1 Urgent regression or broken agent/channel workflow affecting real users now. proof: sufficient Contributor real behavior proof is sufficient. 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 Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR accepts stable correction releases and inventories the retained Native Gateway setup draft during Store migration.

Example: Migrate an Inno 2026.9.8-1 installation with gateways\native-setup-draft.json present.

  • Before: Migration stops at Update Required or fails inventory validation.
  • After: Migration accepts the matching release identity and validates the draft while preserving existing gateway state.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused repair with direct migration proof, meaningful regression coverage, and no identified defect.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The supplied Windows 11 run exercises migration from released Inno 2026.9.8-1 with the native draft present into a production-identity test-signed MSIX: inspected screenshots show successful validation, and inline runtime logs record completion and finalization. The migration logic remains unchanged at the reviewed merged head. Store-distributed signing was explicitly not exercised; remaining attachment retrieval failures are review-environment limitations.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users on a stable correction release or with completed Native Gateway setup cannot migrate to the Store app.
Reason: The patch reconciles existing release and setup contracts with migration validation without adding configuration or changing the migration workflow.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still needs this focused migration repair, and inspection found no actionable correctness or security defect.

Priority: P0
Reviewed head: b063ba80e619dee00aef17ef78d44cfffce418ce

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Automated base-fail/head-pass execution is not supplied; source inspection establishes the intended failures, and the supplied Windows migration journey demonstrates the repaired path.
Agent review details

How this fits together

Installation detection and inventory feed the Store migration workflow, which records consent and completion, verifies Inno removal, and finalizes preserved user state.

flowchart TD
  A[Inno installation] --> B[Installation detector]
  B --> C[Store migration workflow]
  D[Existing user state] --> E[Migration inventory]
  E --> C
  C --> F[Protected migration records]
  F --> G[Removal verification and finalization]
Loading

Technical review

Best possible solution:

Land the existing repair so supported users can finish migration through Migrate and Retry without editing files or settings.

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

Current-main source deterministically rejects the reported correction version and setup-created draft; supplied screenshots and the independent report confirm those failures, but this review executed no reproduction.

Is this the best way to solve the issue?

The existing owners are the right repair boundary: recognize supported release identities and the exact setup descriptor while preserving strict validation.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Strict gateway inventory changes intended behavior with a stated reason (5a59535: Migration inventories bounded, coherent state and rejects unexpected filesystem entries before recording completion.)
  • Numeric-only migration version policy changes intended behavior with a stated reason (5a59535: Stable source validation excludes unsupported prerelease identities; the PR explains the repository's stable correction format and verifies its executable identity.)
  • Native setup draft path keeps the original intent (dba8121: Native setup retains a durable recovery descriptor; extracting its filename into a shared constant preserves that storage contract.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Natalie Aguinaldo: Raw commit 244f684 adds src/OpenClaw.Connection/Migration/InnoInstallationDetector.cs:140 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 244f684ef291; files: src/OpenClaw.Connection/Migration/InnoInstallationDetector.cs)
  • Karen: Raw commit dba8121 adds src/OpenClaw.SetupEngine/NativeGatewaySetupService.cs:65 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: dba81213371c; files: src/OpenClaw.SetupEngine/NativeGatewaySetupService.cs)

Review metrics

Metric Value Why it matters
Production and regression coverage Production +164/-13 lines; tests +242/-6 lines The added coverage protects release identity, inventory consistency, unsafe filesystem entries, and correction-version admission.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Label justifications:

  • P0: Supported Store migration blocks ordinary users without effective in-product recovery; the independent report requires manually moving an application-owned file.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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-10-08T00:45:54.624Z sha 92f47c6 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-08T00:56:43.117Z sha 92f47c6 :: needs maintainer review before merge. :: none

Reviewed October 16, 2026, 4:29 PM ET / 20:29 UTC (Revision 3).

@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. and removed P1 Urgent regression or broken agent/channel workflow affecting real users now. labels Oct 8, 2026
@karkarl

karkarl commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Global triage: HOLD_FOR_AUTHOR. Take confidence 10%; recommendation confidence 99%; effort medium; risk high.

Reviewed exact head 92f47c6e6345. GitHub currently reports BLOCKED with 26 passing, 2 failing, and 0 pending checks. proof label is sufficient. Durable automated signal: Codex review: needs maintainer review before merge..

Author: update from current main, resolve conflicts or branch-policy blockers, then rerun exact-head validation and request review.

This is a triage classification, not a merge action. No branch changes were made.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 16, 2026
@RomneyDa
RomneyDa merged commit 4244a48 into openclaw:main Oct 16, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants