Repository navigation
fix: keep Companion usable when Windows blocks the updater - #1731
Merged
Merged
Conversation
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
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
marked this pull request as ready for review
October 15, 2026 03:20
|
ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment |
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Scope
winnodeRequired proof pools
windows-winui-interactive: current-head updater-unavailable UI and manual release link; isolated live UIA evidence collected below.windows-11-sac-on: startup with updater denied under actual SAC enforcement. Not verified; full trust acceptance remains separate work under Windows Hub v2026.7.1 is blocked by Smart App Control because OpenClaw.Chat.dll is unsigned #1153.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
robocopy <Release-output> <isolated-payload> /E /XF Updatum.dll; launched isolated executable; authenticatedtools/list;tools/callforapp.navigatewith{"page":"settings"}; launched the same isolated executable with argumentopenclaw://check-updatesto forward into that process; queried only its process-id-scoped UIAutomation descendants. Stopped both proof processes afterward.Yes/No/N/A): N/A. Copied live UI diagnostics above; raw selected UIA JSON/logs retained in session artifacts. No unrelated desktop capture.Security Impact
Yes/No): NoYes/No): NoYes/No): YesYes/No): NoYes/No): NoYes, 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
Yes/No): YesYes/No): NoYes/No): NoReview Conversations