Skip to content

fix: Installed apps keeps an old version after ZIP updates - #2113

Draft
TheAngryPit wants to merge 8 commits into
openclaw:mainfrom
TheAngryPit:codex/issue1676-owned-successor-20261111
Draft

TheAngryPit wants to merge 8 commits into
openclaw:mainfrom
TheAngryPit:codex/issue1676-owned-successor-20261111

Conversation

@TheAngryPit

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes stale Installed apps versions after a successful in-app ZIP update. Related: #1676 and #1959 (fix: Installed apps shows an old version after in-app updates).

This is a separately maintained current-main continuation of #1959. The original publication route could not accept the follow-up; its original commits and credits are preserved here. #1959 remains open, and this PR makes no claim that it has been superseded or closed.

Original implementation and startup regression: @MertBasar0 and the retained @roboclaw-bot commits. The corrected report is from @Speculorum9. The retained #2050 uplift credits @karkarl and Copilot; that UI Automation repair is already on the base and adds no duplicate changes to this diff.

User Impact

Installed apps can show the version of the running production Companion after an in-app update. The repair preserves installation dates, uninstall commands and unrelated registration values. Signed Windows 11 upgrade and visible Settings verification remain unexecuted.

Why This Change Was Made

The ZIP updater replaces application files without running Inno again. Current main still has no registration refresh. A focused startup owner updates only DisplayVersion and DisplayName when an existing same-user Inno registration matches the running production executable. It runs after startup admission and before the completion marker.

Missing or mismatched registrations, portable copies, Dev, isolated and packaged builds remain unchanged. Registration creation and uninstall ownership stay with Inno; write failures produce recovery guidance without blocking startup.

Evidence

Base: 22c111d4c209f9e29c1fd0ad1ca03ff63b196b61. Candidate: c9437981f0db20473da74bae424849938c6e2dcc, tree b36d0dc15569af97a2f1910151fafa6079923cb6.

Live issue/source and merged-work checks found the metadata defect still open and its refresh owner absent on current main. The existing startup regression fails when the candidate-compiled test assembly reads that exact main startup source, where the refresh call is absent. All eight metadata tests pass on the candidate's pre-comment-cleanup parent. This is a source-contract check, not an installed upgrade reproduction.

The full build and 6,298 Tray cases passed at parent 21c539f01dd65027dcab1a5566ac08268fda0737. Shared has 12 host symlink-privilege failures, recorded below. The final commit removes only three XML documentation lines. Its WinUI build and all eight focused metadata tests passed. Historical Server 2025 update artifacts in #1959 remain origin evidence, not execution evidence for this candidate.

Local NoComments identified that documentation-only deletion. Robo-side Autoreview reviewed the exact final head and five-file delta against the stated base: scoped-clean, exit 0, no findings. Its TestAudit found no source findings across the eight metadata/startup methods; it executed no tests and explicitly leaves production lookup/ACL and runtime startup unqualified. Independent implementation/proof-plan review found no production-code defect and accepted the implementation for a draft PR, with production registry lookup, signed upgrade and Shared validation still unqualified. This is not a ready-to-merge claim.

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: signed production upgrade, registration preservation and uninstall continuity. Not run in this preparation.
  • windows-winui-interactive: visible Installed apps version and admitted startup behavior. Not run; GUI automation was outside this preparation's authorized scope.

Production-path proof requires a disposable/restorable Windows environment with a normal production profile. An isolated-profile launch deliberately excludes this repair through AppIdentity.IsIsolated; it cannot substitute for the signed upgrade proof. Keep that exclusion enabled.

Validation

Headless Windows x64 validation uses isolated test profile directories and the repository's normal build/test commands.

Command Revision Actual result
.\build.ps1 21c539f0 All five projects passed; 137.57s
dotnet test tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore 21c539f0 5,747 passed, 12 failed, 29 skipped
dotnet test tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore 21c539f0 6,298 passed, zero failed/skipped
dotnet test tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --filter FullyQualifiedName~InnoInstallationMetadataTests 21c539f0 Eight passed, zero failed/skipped
Existing startup-source regression with OPENCLAW_REPO_ROOT selecting exact current main main 22c111d4 source / 21c539f0 compiled tests One expected failure: refresh call absent
dotnet build src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj --no-restore -r win-x64 final c9437981 Passed; zero warnings/errors; 69.40s
Eight focused metadata tests rebuilt after comment cleanup final c9437981 Eight passed, zero failed/skipped

All 12 Shared failures throw "A required privilege is not held by the client" in CreateSymbolicLink during fixture construction. Neither the Shared source nor its tests changes in this PR. No privilege settings, assertions or skip policies were changed. The first build attempt also exposed missing platform environment variables in the task harness; restoring truthful process-local Windows_NT/AMD64 values allowed the existing Visual Studio resolver and normal build to pass without installation or build-property overrides.

No native UI, installed update, signing, paid pool or fork CI was run.

Real Behavior Proof

  • Environment tested: Native Windows x64, .NET SDK 10.0.403, task-owned worktree and isolated synthetic test profiles.
  • PR head or commit tested: Full suites at 21c539f01dd65027dcab1a5566ac08268fda0737; WinUI build and eight focused cases at final comment-only head c9437981f0db20473da74bae424849938c6e2dcc.
  • Exact steps or command run: The metadata test filter above uses real Windows registry APIs against uniquely named temporary fixture registrations; the startup-source case separately reads exact current main.
  • Evidence after fix: Eight metadata cases passed at both the full-suite parent and final head, including display-only writes, other-value/type preservation, idempotency, interrupted refresh, malformed/portable registrations, excluded process modes, missing records, warning recovery and startup admission order.
  • Observed result: The tested production helper reconciles synthetic matching registration display values and preserves excluded records. Full suites were not rerun after documentation-only cleanup; no installed upgrade success is claimed.
  • Screenshot or artifact links verified? (Yes/No/N/A): N/A. No screenshot or private local path is presented as public proof.
  • Not verified or blocked: Signed Windows 11 A-to-B installation/update, Settings pixels/DPI parity, uninstall execution, native UI Automation, Store/MSIX/ARM64 runtime, real Gateway credentials/chat migration, and complete proof pools.

Security Impact

  • New permissions or capabilities? (Yes/No): No.
  • Secrets or tokens handling changed? (Yes/No): No.
  • New or changed network calls? (Yes/No): No.
  • Command or tool execution surface changed? (Yes/No): No.
  • Data access scope changed? (Yes/No): Yes.
  • If any answer is Yes, explain the risk and mitigation: Write only two display values in a matching existing HKCU Inno registration. No registration creation or elevation; denied writes return recovery guidance.

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.

roboclaw-bot and others added 8 commits October 31, 2026 23:30
Worked on by:
- @MertBasar0

Co-authored-by: MertBasar0 <[email protected]>
OpenClaw-Publication: 47010fa4-3a86-447c-86ce-a6abffe97f49
Worked on by:
- @MertBasar0

Co-authored-by: MertBasar0 <[email protected]>
OpenClaw-Publication: 76ff21e2-713d-4aed-aa3e-ba97d1dcebd7
Co-authored-by: MertBasar0 <[email protected]>
Worked on by:
- @MertBasar0

Co-authored-by: MertBasar0 <[email protected]>
OpenClaw-Publication: de756344-b9e9-4cf2-aaab-89af7a9ff05d
…penclaw#2050)

Return the standard UIA disabled HRESULT so native clients do not substitute stale worker-thread COM error info. Retain deterministic stale-error, mounted-lifetime, and no-activation coverage.

Co-authored-by: Copilot App <[email protected]>
(cherry picked from commit 3435fba)
@clawsweeper

clawsweeper Bot commented Nov 11, 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 P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

Refresh the matching Inno installation’s displayed name and version after Companion completes admitted startup.

Example: An Inno-installed Companion updates from 2026.9.5-alpha.97 to 2026.9.8-1 through the ZIP updater.

  • Before: Companion runs 2026.9.8-1 while Installed apps and winget report 2026.9.5-alpha.97.
  • After: The next admitted startup refreshes the two display fields while preserving installation date and uninstall metadata.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) A useful, focused repair with no definite introduced defect, pending required production behavior and upgrade-preservation evidence.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Installed apps and winget show an older Companion version after a successful in-app update.
Reason: The corrected report establishes a concrete defect, and refreshing only matching installation display metadata directly addresses it.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: current main still has the confirmed metadata defect, and this focused repair introduces no definite correctness bug.

Priority: P2
Reviewed head: c9437981f0db20473da74bae424849938c6e2dcc

Before merge

  • Add real behavior proof - The supplied current-head evidence exercises the helper through synthetic registry fixtures, bypassing production registration lookup and installed startup; it does not demonstrate the signed upgrade or visible Installed apps result. Provide current-head screenshots or redacted runtime output for that path, redacting IPs, keys and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Provide a current-head signed Windows 11 upgrade from the latest stable release showing refreshed Installed apps values and preserved settings, installation date, uninstall metadata and uninstall behavior.
Agent review details

How this fits together

The ZIP updater replaces application files; the startup helper uses the running executable and version to reconcile an existing matching current-user Inno registration consumed by Windows Installed apps.

flowchart TD
  A[ZIP update] --> B[Companion restart]
  B --> C[Startup admission]
  C --> D[Installation metadata helper]
  D --> E[Matching existing HKCU registration]
  E --> F[Refresh two display fields]
  F --> G[Windows Installed apps]
Loading

Technical review

Best possible solution:

Land one guarded startup reconciliation that preserves Inno’s registration creation and uninstall ownership.

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

Current main has no registration refresh after the updater handoff, corroborated by the corrected Windows 11 report; this read-only review ran no reproduction or tests.

Is this the best way to solve the issue?

The smallest complete fix is the focused metadata owner called after startup admission; its guards and distinct preservation tests serve that repair without replacing the updater or migration detector.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • App startup composition keeps the original intent (17a8b03: The merged orchestration refactor retained startup ordering and service construction in App.)
  • Production and Dev installation identity keeps the original intent (dae64b6: Separate identities and installation state permit safe side-by-side Dev and release operation.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Scott Hanselman: Raw commit b5115e0 adds src/OpenClaw.Tray.WinUI/Services/UpdatumUpdateBackend.cs:12 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b5115e0e69af; files: src/OpenClaw.Tray.WinUI/Services/UpdatumUpdateBackend.cs)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #1676
Summary: This PR continues the original repair for the same confirmed stale-registration defect.

Members:

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

Labels

Label changes:

  • add P2: Successful updates leave misleading Windows inventory versions, but the reported Companion runtime remains usable.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: Successful updates leave misleading Windows inventory versions, but the reported Companion runtime remains usable.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Demonstrate the current candidate through the signed Windows 11 installation and ZIP-update path with existing registration and user state preserved.

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.

Reviewed November 11, 2026, 8:40 AM ET / 13:40 UTC.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to inactivity.
Please update it or it will be closed.

@github-actions github-actions Bot added the stale label Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. stale status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants