Skip to content

fix: keep Companion usable when Windows blocks the updater - #1731

Merged
shanselman merged 2 commits into
mainfrom
shanselman-updater-startup-resilience
Oct 15, 2026
Merged

shanselman merged 2 commits into
mainfrom
shanselman-updater-startup-resilience

Conversation

@shanselman

@shanselman shanselman commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #1153. Startup-resilience fix only; dependency trust and SAC acceptance remain open.

What Problem This Solves

Fixes: Companion terminates before startup when Windows blocks the optional updater dependency.

User Impact

User impact: dependency-load failures are contained and reported with an official manual-download link instead of preventing startup. No settings, pairing, gateway data, or OS security policy changes. Normal installer/archive I/O errors remain retryable instead of disabling the updater for the session.

Why This Change Was Made

Old owner: App's static updater initializer. New owners: UpdateBackendLoader and non-inlined ReleaseUpdateBackendFactory; vendor types stay inside UpdatumUpdateBackend. Preserved invariant: normal updater check/download/install behavior remains; Store/dev/Debug skip loading it. Ledger and regression guards protect the boundary. This does not make unsigned dependencies trusted or bypass SAC.

Evidence

24 regression cases cover dependency failures including the reported HRESULT, real missing-assembly loading, cached unavailability, successful reuse, installer/archive I/O distinction, and architecture/recovery guards.

Independent rubber-duck review completed with no blocking findings. Its file-I/O classification concern was addressed and re-reviewed. Runtime proof on final head used the actual production Release app with Updatum.dll omitted: startup and MCP navigation succeeded, update check displayed the recovery dialog, and the process remained responsive. This directly exercises vendor type loading, unlike the unit test's explicit Assembly.Load call.

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

Validation

Validated final tree eaa6f7d on Windows, OPENCLAW_REPO_ROOT set to worktree and OPENCLAW_TRAY_DATA_DIR to isolated profile. Fresh test projects were built first. The classifier initially missed an assembly identity without Version; corrected Culture/PublicKeyToken recognition, reran the failed suite, then reran every required command successfully.

  • .\build.ps1: passed (win-arm64).
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 4,311 passed, 36 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 4,035 passed, 0 failed, including all 24 updater regression cases.
  • .\build.ps1 -Project WinUI -Configuration Release: passed (win-arm64).
  • git diff --cached --check: passed before commit.

The initial head's complete CI passed. New-head CI must pass independently; previous-head CI is not claimed for eaa6f7d.

Real Behavior Proof

  • Environment tested: local Windows, unpackaged win-arm64 production Release, dedicated profile/local roots, MCP-only on loopback port 18865; no real profile or gateway changes.
  • PR head or commit tested: eaa6f7d (final code rebuilt before proof).
  • Exact steps or command run: copied Release output with robocopy <Release-output> <isolated-payload> /E /XF Updatum.dll; launched isolated executable; authenticated tools/list; tools/call for app.navigate with {"page":"settings"}; launched the same isolated executable with argument openclaw://check-updates to forward into that process; queried only its process-id-scoped UIAutomation descendants. Stopped both proof processes afterward.
  • Evidence after fix:
MissingUpdater: True
Exited: False
app.navigate: {"navigated":true,"page":"settings"}
Forwarder exited: True
ControlType.Window, Offscreen=False: Couldn't check for updates
ControlType.Text, Offscreen=False:
Something went wrong while checking for updates.

Automatic updates are unavailable because an updater component could not be loaded. You can keep using OpenClaw and download updates from the official releases page.

https://github.com/openclaw/openclaw-windows-node/releases/latest
ControlType.Hyperlink, Offscreen=False: Open official releases
Process Responding: True
  • Observed result: absent Updatum.dll no longer kills App initialization or a manual update check; visible recovery text and link are rendered while the app remains responsive.
  • Screenshot or artifact links verified? (Yes/No/N/A): N/A. Copied live UI diagnostics above; raw selected UIA JSON/logs retained in session artifacts. No unrelated desktop capture.
  • Not verified or blocked: actual SAC-On enforcement, signed dependency/release trust, x64 runtime, and opening the external hyperlink. Missing-assembly proof is not SAC acceptance; keep Windows Hub v2026.7.1 is blocked by Smart App Control because OpenClaw.Chat.dll is unsigned #1153 open.

Security Impact

  • New permissions or capabilities? (Yes/No): No
  • Secrets or tokens handling changed? (Yes/No): No
  • New or changed network calls? (Yes/No): Yes
  • Command or tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any answer is Yes, explain the risk and mitigation: user-initiated link to fixed official GitHub releases/latest URL; existing updater network behavior retained. No policy bypass.

Compatibility and Migration

  • Backward compatible? (Yes/No): Yes
  • Config or environment changes? (Yes/No): No
  • Migration needed? (Yes/No): 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.

Defer optional updater loading behind a non-inlined boundary, preserve channel admission, and report dependency failures with a manual release link. Related: #1153.

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

Copilot-Session: c56fb343-33d6-4687-8cd1-09c034d881d8
@shanselman shanselman added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 15, 2026
Distinguish assembly identity failures from installer/archive file I/O while preserving rooted DLL policy failures.

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

Copilot-Session: c56fb343-33d6-4687-8cd1-09c034d881d8
@shanselman
shanselman marked this pull request as ready for review October 15, 2026 03:20
@clawsweeper

clawsweeper Bot commented Oct 15, 2026

Copy link
Copy Markdown

ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment @clawsweeper review. Please avoid repeated requests while a review is queued or running; agents should not request reviews automatically.

@shanselman
shanselman merged commit b5115e0 into main Oct 15, 2026
30 checks passed
@shanselman
shanselman deleted the shanselman-updater-startup-resilience branch October 15, 2026 03:42
@shanselman shanselman removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant