Skip to content

fix(update): suppress ordinary extended-stable notices - #1299

Closed
shanselman wants to merge 1 commit into
mainfrom
shanselman-extended-stable-update-suppression
Closed

shanselman wants to merge 1 commit into
mainfrom
shanselman-extended-stable-update-suppression

Conversation

@shanselman

Copy link
Copy Markdown
Collaborator

Supersedes #1141.

What Problem This Solves

Fixes an issue where Windows companion users following a Gateway's extended-stable channel would still receive ordinary companion update prompts before that Gateway channel was ready to advance.

Why This Change Was Made

This is a clean current-main replacement for #1141. It keeps GatewayConnectionManager.OperatorClient as the sole authenticated operator-client owner, consumes Core's optional update.status.effectiveChannel contract, and suppresses only a trusted ordinary Windows release after complete release-lineage inspection. It does not add a parallel Gateway client or restore stale App-owned connection fields.

Pinned invariant: extended-stable suppresses only an ordinary update after trusted Windows release metadata is available. Missing, unauthorized, malformed, error, security, CVE, GHSA, and incomplete-history states remain visible and fail safe.

Gateway / release state Result
effectiveChannel=extended-stable + trusted complete ordinary release metadata Suppress the ordinary companion prompt
Missing or non-string effectiveChannel Keep the update visible
Unauthorized / missing operator.admin scope Keep the update visible
RPC timeout, transport error, or Gateway error Keep the update visible
Missing or malformed release metadata Keep the update visible
Full release page cannot reach the installed version Treat lineage as incomplete; keep the update visible
Security marker, security, CVE-, or GHSA- in any eligible newer release Keep the update visible

Ownership remains unchanged: GatewayConnectionManager owns operator/node connection state, UpdateCoordinator reads its current OperatorClient, and App remains the composition root.

User Impact

Extended-stable users no longer see ordinary Windows companion update prompts ahead of their Gateway channel. Security-sensitive and uncertain updates remain visible.

Evidence

  • Focused policy/ownership suite: 107 passed.
  • Focused real WebSocket protocol suite: 4 passed. Wire output included {"type":"req",...,"method":"update.status","params":{}}; Gateway errors propagated for caller fail-safe handling.
  • Current-head version-spoofed Release process connected through the configured GatewayConnectionManager path to a controlled loopback Gateway and completed hello-ok with granted operator.admin, operator.pairing scopes.
  • Final Codex autoreview: clean, no accepted/actionable findings, overall confidence 0.87.
  • Final rubber-duck review: clean, no remaining blocking or high-confidence in-scope issues.

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-winui-interactive: the Command Center update state gains a localized visible Skipped result for extended-stable suppression.

Validation

  • .\build.ps1: passed; Shared, CLI, WinNode CLI, SetupEngine, and WinUI built successfully; documentation gates passed.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,875 passed, 32 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,841 passed, 0 failed.
  • dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore --no-build: 1,025 passed, 0 failed. The prebuilt suite bounded an unrelated MSBuild/GitVersion hang seen when rebuilding this project concurrently.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --no-build --filter "FullyQualifiedName~GatewayProtocolLiveRoundTripTests": 4 passed, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --no-build --filter "FullyQualifiedName~UpdateCheckPipelineTests|FullyQualifiedName~AppRefactorContractTests": 107 passed, 0 failed.
  • python .agents\skills\autoreview\scripts\autoreview --mode local --stream-engine-output: clean, no accepted/actionable findings.

Real Behavior Proof

  • Environment tested: Windows 11 x64; isolated tray data; controlled loopback Gateway on 127.0.0.1:18799.
  • PR head or commit tested: 0f4dd6cb22a3911c73e0f2e84916b9e7da974601.
  • Exact steps or command run: built Release with version metadata 0.6.10, launched the task-built unpackaged app against the controlled Gateway, and ran real WebSocket update.status round-trip tests.
  • Evidence after fix: runtime log recorded the current worktree Release executable, signed operator connect, hello-ok, and granted operator.admin, operator.pairing; focused wire proof recorded an update.status request and parsed effectiveChannel=extended-stable while preserving Gateway errors.
  • Observed result: current connection ownership and protocol invocation are proven; policy tests prove suppression only for complete trusted ordinary metadata and visibility for every pinned fail-safe state.
  • Screenshot or artifact links verified? N/A.
  • Not verified or blocked: native UI Automation resolved the installed packaged companion instead of the task-built unpackaged controlled instance, so a current-head screenshot of the final localized Skipped Command Center state was not captured. The windows-winui-interactive pool remains declared for that visible proof. Gateway/protocol and policy behavior are verified.

Security Impact

  • New permissions or capabilities? No
  • Secrets or tokens handling changed? No
  • New or changed network calls? Yes
  • Command or tool execution surface changed? No
  • Data access scope changed? No
  • If any answer is Yes, explain the risk and mitigation: the existing authenticated operator client now calls update.status. The call requires an already-granted operator.admin scope; missing scope and all errors fail safe by leaving updates visible. No user content or credentials are added to telemetry or logs.

Compatibility and Migration

  • Backward compatible? Yes
  • Config or environment changes? No
  • Migration needed? No
  • If yes, list the exact upgrade steps: N/A. Older Gateways that omit effectiveChannel retain the existing visible update behavior.

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.

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

Copilot-Session: 743435ea-9eaa-409a-9d6c-64abdf3f8c61
@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

@shanselman shanselman added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. 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 Sep 2, 2026
@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed September 4, 2026, 7:44 AM ET / 11:44 UTC.

ClawSweeper review

What this changes

The PR delays automatic Windows companion update checks until an authenticated Gateway reports its channel, suppressing ordinary releases for extended-stable while keeping security and uncertain updates visible.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open. This collaborator-owned PR is not on current main and currently has merge conflicts plus a failed test check; source review found no discrete introduced correctness defect.

Priority: P2
Reviewed head: 0f4dd6cb22a3911c73e0f2e84916b9e7da974601

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has focused fail-safe logic and substantial targeted coverage, but must be refreshed against current main before it can land.
Proof confidence 🌊 off-meta tidepool Not applicable: This collaborator-authored PR is exempt from the external-contributor proof gate; its supplied current-head loopback Gateway trace exercises the real update.status path, while the absent WinUI capture is accurately recorded as an explicit repository-policy blocker.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This collaborator-authored PR is exempt from the external-contributor proof gate; its supplied current-head loopback Gateway trace exercises the real update.status path, while the absent WinUI capture is accurately recorded as an explicit repository-policy blocker.
Evidence reviewed 5 items Fail-safe update suppression: The coordinator suppresses only when the channel is extended-stable and the pipeline has not classified the available release history as security-critical; unavailable status falls back to the normal updater.
Security-lineage coverage: Focused tests cover an intervening eligible security release, unavailable release metadata, incomplete history, and extended-stable suppression boundaries.
Current-main comparison: Raw tree comparison shows current main retains the pre-PR blobs for App, UpdateCoordinator, and UpdateCheckPipeline, so this implementation is not already present on main.
Findings None None.
Security None None.

How this fits together

The tray app connects through the Gateway connection manager, then checks GitHub releases to offer companion updates. This change uses the authenticated Gateway channel as an additional input to the update-prompt decision.

flowchart LR
  A[Tray startup] --> B[Gateway connection manager]
  B --> C[Authenticated update channel]
  A --> D[Release metadata]
  C --> E[Update decision]
  D --> E
  E --> F[Prompt or skipped status]
Loading

Before merge

  • Resolve merge risk (P1) - GitHub currently reports the branch as conflict-dirty with a failed test check, so its behavior must be revalidated after a rebase.
  • Resolve merge risk (P1) - Full current-main text inspection for affected blobs was blocked by missing partial-clone objects and unavailable network resolution; raw blob comparison still confirms main does not contain this PR implementation.
  • Complete next step (P2) - Rebase onto current main, resolve the current merge conflict, and re-run the required build and shared/tray test suites so the failed test check reflects the refreshed head.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta production +456/-60, tests +308/-16 The substantial test addition covers the expanded release-selection and Gateway-channel policy.
Affected files 19 files The change spans tray startup, shared Gateway protocol, release policy, localization, documentation, and focused tests.

Root-cause cluster

Relationship: canonical
Canonical: #1299
Summary: This PR is the active replacement for the earlier closed-unmerged implementation attempt.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebase the focused channel-aware update path onto current main, resolve conflicts without restoring parallel Gateway-client ownership, then validate the required build and shared/tray suites.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebase the focused channel-aware update path onto current main, resolve conflicts without restoring parallel Gateway-client ownership, then validate the required build and shared/tray suites.

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

Yes, source and supplied loopback-Gateway evidence establish the update.status and suppression path, although the declared WinUI screenshot remains explicitly blocked.

Is this the best way to solve the issue?

Yes, subject to rebase validation: the change keeps the connection manager as the sole operator-client owner and fails safe when channel or release metadata is unavailable.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 35cb92dcf28d.

Labels

Label justifications:

  • P2: The PR changes Windows companion update prompting for extended-stable users with a bounded user-facing blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This collaborator-authored PR is exempt from the external-contributor proof gate; its supplied current-head loopback Gateway trace exercises the real update.status path, while the absent WinUI capture is accurately recorded as an explicit repository-policy blocker.

Evidence

What I checked:

Likely related people:

  • shanselman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Karen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • AlexAlves87: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Rebase onto current main, resolve the merge conflict, and re-run the required build plus shared and tray test suites.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-02T19:51:20.752Z sha 0f4dd6c :: needs maintainer review before merge. :: none

@shanselman

Copy link
Copy Markdown
Collaborator Author

Maintainer decision: approve channel-aligned companion update notices for an authenticated Gateway reporting extended-stable. The merge invariant is the one pinned and tested in this PR: suppress only an ordinary update after complete trusted release-lineage inspection; security, CVE, GHSA, missing, unauthorized, malformed, incomplete-history, transport-error, and Gateway-error states remain visible. Proceed subject to required CI and the declared UI-proof disposition.

@shanselman shanselman added status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. and removed status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. labels Sep 4, 2026
@shanselman

Copy link
Copy Markdown
Collaborator Author

Closing #1299 (fix(update): suppress ordinary extended-stable notices) as superseded by the current-main release policy, with no replacement code needed.

The reported behavior can still occur, but it is now intentional rather than a supported bug:

  • improve(setup): install latest stable Gateway from npm #1312 (improve(setup): install latest stable Gateway from npm), merged as 912a1050515d3e045a6ce0f27aa29391f55868fb, changed managed Gateway setup to resolve npm latest independently. Explicit selectors such as extended-stable remain Gateway package choices, not Windows Hub update channels.
  • fix(setup): complete npm latest Gateway landing #1381 (fix(setup): complete npm latest Gateway landing), merged as 61ccb91e49b89cdbc2b715d40758ae9e1cd2b2dc, completed and repaired that policy on current main.
  • docs/VERSIONING.md now states that Windows Hub release tags are an independent version domain and that managed Gateway setup resolves npm latest independently.
  • docs/RELEASING.md repeats that Gateway versions are a separate domain and that a Windows Hub release does not select a Gateway package version.
  • docs/adr/0001-gateway-release-policy.md records the superseding decision: normal setup uses npm latest; extended-stable is only an optional upstream Gateway selector.
  • Current UpdateCheckPipeline evaluates published Windows Hub stable releases and correction ordering only. It has no Gateway channel/status dependency.

The stale head 0f4dd6cb22a3911c73e0f2e84916b9e7da974601 implements the opposite coupling by adding update.status, delaying startup checks for an operator handshake, changing protocol surfaces, App startup, localized UI, and release-history classification across 19 files. It is also conflicting with current main and its test check failed. Rebasing or recreating that design would contradict the merged npm-latest and independent-version-domain policy.

Disposition: no current-main code, protocol, App.xaml.cs, localization, or test changes. The old suppression design is closed as policy-superseded.

@shanselman shanselman closed this Sep 10, 2026
@shanselman shanselman removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 10, 2026
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: 🐚 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.

1 participant