Skip to content

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

Merged
shanselman merged 2 commits into
mainfrom
karkarl-fix-extended-stable-update-policy
Sep 11, 2026
Merged

shanselman merged 2 commits into
mainfrom
karkarl-fix-extended-stable-update-policy

Conversation

@karkarl

@karkarl karkarl commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Supersedes #1299.

A new PR was created from current main because the Gateway-aligned release tagging policy changed after #1299 was authored. This replacement uses trusted, explicit release markers (<!-- openclaw-update: ordinary --> or <!-- openclaw-update: security-critical -->) instead of broad free-text security classification, while preserving current main's correction-aware update ownership and fail-open behavior.

What Problem This Solves

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

Why This Change Was Made

The existing correction-aware update pipeline now defers an update only when official release metadata explicitly classifies it as ordinary and the authenticated Gateway reports extended-stable. Security and every uncertain or unavailable state keep the update visible. Release prose is not scanned for security keywords, and Gateway connection ownership remains in GatewayConnectionManager.

User Impact

Extended-stable users no longer see verified ordinary Windows companion update notices. Security-related, unclassified, malformed, unauthorized, and error states continue to show the update.

Evidence

Focused policy tests prove trusted ordinary/security classification, malformed and incomplete marker handling, authorization and RPC fail-open behavior, extended-stable boundaries, normal channels, correction fallback selection, and App ownership. A real loopback WebSocket test captured the authenticated client wire method update.status and parsed effectiveChannel=extended-stable.

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: capture the localized Skipped update state from a current-head Release build with controlled authenticated Gateway and official ordinary release metadata.

Validation

  • $env:OPENCLAW_REPO_ROOT=(Get-Location).Path; .\build.ps1: passed; Shared, CLI, WinNode CLI, SetupEngine, WinUI, docs, and proof-pool gates succeeded.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,944 passed, 34 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,884 passed, 0 skipped, 0 failed.
  • Focused tray policy/ownership suite: 112 passed, 0 failed.
  • Focused shared Gateway protocol suite: 36 passed, 0 failed.
  • Focused live update.status wire proof: 1 passed, 0 failed.
  • Rubber-duck rereview: clean after fixing duplicated security-marker handling.
  • Autoreview: Not verified / blocked by Codex API 401 Unauthorized; no findings were produced.

Real Behavior Proof

  • Environment tested: Windows 11 ARM64, isolated repository worktree.
  • PR head or commit tested: d73f7fbe0e8adf0af93bbbbabf6b02812c708f06.
  • Exact steps or command run: focused real WebSocket GatewayProtocolLiveRoundTripTests.NewProtocolMethods_RealWebSocketRoundTrip_SendCorrectWireFramesAndParseResponses with detailed console logging.
  • Evidence after fix: captured {"type":"req",...,"method":"update.status","params":{}}; response parsing returned effectiveChannel=extended-stable.
  • Observed result: the real operator client sends the canonical Gateway method; deterministic policy tests suppress only trusted explicitly ordinary metadata and preserve visibility for every pinned fail-open state.
  • Screenshot or artifact links verified? N/A.
  • Not verified or blocked: current-head localized WinUI Skipped screenshot. Debug/development builds skip release checks, and the Release path requires an authenticated admin-scoped Gateway plus official release metadata carrying the explicit ordinary marker. The windows-winui-interactive pool remains declared.

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 calls update.status only after handshake and only with operator.admin. Missing authorization and all protocol/transport failures keep the companion update visible. Release suppression requires trusted exact metadata and fails open on every ambiguous marker state.

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 and unclassified releases 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: b5d2b5fb-47b9-4337-af8b-d50fe686f9bc
@clawsweeper

clawsweeper Bot commented Sep 10, 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. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed September 11, 2026, 2:07 PM ET / 18:07 UTC (Revision 3).

ClawSweeper review

What this changes

Defers ordinary Windows update notices when official release markers and the connected Gateway’s extended-stable channel permit it, with localized status text and protocol tests.

Merge readiness

⛔ Blocked before merge - 5 items remain

Keep open: the requested behavior is absent from main, and the latest maintainer comment resolves the earlier direction objection. The reported single-line marker cases are fixed, but multiline and unterminated markers still defeat the promised fail-open behavior.

Priority: P2
Reviewed head: 8bc16582900960b94e720821e5c77c3996bd1994

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused implementation and substantial reported validation are offset by a remaining classifier defect and unverified startup compatibility.
Proof confidence 🌊 off-meta tidepool Not applicable: The collaborator exemption applies. Supplied Windows ARM64 loopback output supports the real client’s update.status framing and parsing at the earlier head, but its server does not authenticate and it does not exercise UpdateCoordinator suppression. The localized WinUI state is explicitly blocked; Release fresh-install and upgrade results remain unverified.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The collaborator exemption applies. Supplied Windows ARM64 loopback output supports the real client’s update.status framing and parsing at the earlier head, but its server does not authenticate and it does not exercise UpdateCoordinator suppression. The localized WinUI state is explicitly blocked; Release fresh-install and upgrade results remain unverified.
Evidence reviewed 9 items Applicable repository policy: Read the complete root AGENTS.md and proof-validation skill. Applied connection ownership, startup characterization, proof reporting, and isolated-validation guidance. No applicable nested AGENTS.md or maintainer-notes directory was found. No build or tests were run during this read-only review.
Remaining malformed-marker defect: The new marker-shaped regex requires a closing delimiter and uses dot without Singleline. A valid ordinary marker followed by a security-critical comment containing a newline, or an unterminated classification comment, leaves both the loose count and recognized count at one. Classification therefore remains Ordinary and the coordinator suppresses the update.
Re-review continuity: The exact-head GitHub commit patch confirms that the regex and three additional regression cases were introduced by the latest commit. The previously reported single-line malformed cases are addressed; the remaining finding concerns gaps in the newly added scanner.
Findings 1 actionable finding [P2] Reject multiline and unterminated classification comments
Security Needs attention Malformed security metadata can authorize deferral: A valid ordinary marker plus a multiline or unterminated security classification is accepted as Ordinary, weakening the intended security-update visibility safeguard.

How this fits together

The Windows updater selects releases from the official GitHub repository and presents download/install prompts. This change consults the existing Gateway connection before deciding whether to defer a selected release.

flowchart TD
 A[Official Windows release] --> B[Select compatible update]
 B --> C[Validate classification markers]
 D[Connected Gateway] --> E[Read authenticated update channel]
 C --> F{Verified ordinary and extended-stable?}
 E --> F
 F -->|Yes| G[Show deferred status]
 F -->|No or unavailable| H[Keep update visible]
Loading

Before merge

  • Reject multiline and unterminated classification comments (P2) - The new pattern uses .*? without Singleline and requires -->. A body containing &lt;!-- openclaw-update: ordinary -->\n&lt;!-- openclaw-update: security-critical\n--> therefore produces one loose match, one ordinary match, and zero security matches. An unterminated second classification comment has the same result. Classify returns Ordinary, so an extended-stable Gateway hides the update despite the documented malformed-metadata rule. Scan classification starts through completion and reject incomplete or multiline variants, with regression cases for both.
  • Resolve security concern: Malformed security metadata can authorize deferral - A valid ordinary marker plus a multiline or unterminated security classification is accepted as Ordinary, weakening the intended security-update visibility safeguard.
  • Resolve merge risk (P1) - Startup update checks now occur after onboarding and node/Gateway initialization; fresh-install and upgrade Release behavior has not been demonstrated.
  • Resolve merge risk (P1) - The PR body still describes its socket-only loopback test as authenticated proof, which overstates coverage of the production suppression decision.
  • Complete next step (P2) - Complete malformed-marker rejection, correct the loopback proof description, and provide fresh-install and upgrade Release startup results before merge.

Findings

  • [P2] Reject multiline and unterminated classification comments — src/OpenClaw.Tray.WinUI/Services/UpdateCheckPipeline.cs:47-50
  • [medium] Malformed security metadata can authorize deferral — src/OpenClaw.Tray.WinUI/Services/UpdateCheckPipeline.cs:48
Agent review details

Security

Needs attention: The release classifier still permits ambiguous security metadata to suppress an update; no dependency, credential, or execution-permission expansion was found.

Review metrics

Metric Value Why it matters
Production and test growth Production +279 net lines; tests +231 net lines; docs +11 Production growth implements the stated channel lookup, classification policy, and localized deferral behavior.

Merge-risk options

Maintainer options:

  1. Complete fail-open parsing and startup validation (recommended)
    Reject multiline and unterminated markers, add regression coverage, and document fresh-install and upgrade Release results before landing.

Technical review

Best possible solution:

Retain the approved explicit-marker policy, reject every incomplete classification marker, and establish Release startup compatibility while preserving existing connection ownership.

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

Yes, by source inspection: append a multiline or unterminated security-classification comment to a valid ordinary marker; the scanner ignores it and suppression remains enabled for extended-stable. This was not executed.

Is this the best way to solve the issue?

Not yet: the approved explicit-marker approach is focused, but the scanner does not fully enforce its malformed-metadata contract and the startup reorder lacks upgrade evidence.

Full review comments:

  • [P2] Reject multiline and unterminated classification comments — src/OpenClaw.Tray.WinUI/Services/UpdateCheckPipeline.cs:47-50
    The new pattern uses .*? without Singleline and requires -->. A body containing &lt;!-- openclaw-update: ordinary -->\n&lt;!-- openclaw-update: security-critical\n--> therefore produces one loose match, one ordinary match, and zero security matches. An unterminated second classification comment has the same result. Classify returns Ordinary, so an extended-stable Gateway hides the update despite the documented malformed-metadata rule. Scan classification starts through completion and reject incomplete or multiline variants, with regression cases for both.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded update-notification policy change with a concrete malformed-metadata defect.
  • merge-risk: 🚨 security-boundary: Malformed security classification can still be accepted as trusted ordinary metadata and suppress an update notice.
  • merge-risk: 🚨 compatibility: Moving update checks behind onboarding and connection initialization changes existing startup sequencing without fresh-install and upgrade runtime evidence.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The collaborator exemption applies. Supplied Windows ARM64 loopback output supports the real client’s update.status framing and parsing at the earlier head, but its server does not authenticate and it does not exercise UpdateCoordinator suppression. The localized WinUI state is explicitly blocked; Release fresh-install and upgrade results remain unverified.

Evidence

Security concerns:

  • [medium] Malformed security metadata can authorize deferral — src/OpenClaw.Tray.WinUI/Services/UpdateCheckPipeline.cs:48
    A valid ordinary marker plus a multiline or unterminated security classification is accepted as Ordinary, weakening the intended security-update visibility safeguard.
    Confidence: 0.99

What I checked:

  • Applicable repository policy: Read the complete root AGENTS.md and proof-validation skill. Applied connection ownership, startup characterization, proof reporting, and isolated-validation guidance. No applicable nested AGENTS.md or maintainer-notes directory was found. No build or tests were run during this read-only review. (AGENTS.md:86, 8bc165829009)
  • Remaining malformed-marker defect: The new marker-shaped regex requires a closing delimiter and uses dot without Singleline. A valid ordinary marker followed by a security-critical comment containing a newline, or an unterminated classification comment, leaves both the loose count and recognized count at one. Classification therefore remains Ordinary and the coordinator suppresses the update. (src/OpenClaw.Tray.WinUI/Services/UpdateCheckPipeline.cs:48, 8bc165829009)
  • Re-review continuity: The exact-head GitHub commit patch confirms that the regex and three additional regression cases were introduced by the latest commit. The previously reported single-line malformed cases are addressed; the remaining finding concerns gaps in the newly added scanner. (tests/OpenClaw.Tray.Tests/UpdateCheckPipelineTests.cs:51, 8bc165829009)
  • Maintainer direction clarified: The supplied September 11 comment confirms explicit release markers are the intended replacement policy: fix(update): suppress verified ordinary extended-stable notices #1392 (comment). It also reports an updated build, 3,946 shared tests passed and 32 skipped, and 2,887 tray tests passed. These are contributor-reported results, not reviewer executions. (8bc165829009)
  • Main and released behavior remain independent: Inspected UpdateCheckPipeline at fetched main and release commit c7c6fb0, supplied as v2026.7.1-4. Both select Windows releases without Gateway channel suppression. The related fix(update): suppress ordinary extended-stable notices #1299 (fix(update): suppress ordinary extended-stable notices) is closed unmerged and does not establish implementation. (src/OpenClaw.Tray.WinUI/Services/UpdateCheckPipeline.cs:28, c71121cdcdc9)
  • Proof covers transport, not authenticated suppression: The loopback helper explicitly waits only for an open socket, and its server returns configured payloads without completing hello-ok authentication. The captured PR body identifies d73f7fb as the tested revision and explicitly records the missing localized WinUI capture. Its real WebSocket evidence supports framing/parsing, not the coordinator’s authenticated decision or Release startup behavior. (tests/OpenClaw.Shared.Tests/GatewayProtocolLiveRoundTripTests.cs:363, 8bc165829009)

Likely related people:

  • karkarl: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shanselman: 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.

  • Reject multiline and unterminated classification comments with focused regression coverage.
  • Correct the authenticated-loopback claim and document current-head fresh-install and upgrade Release startup results, including the localized deferred state.

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 (2 earlier review cycles)
  • reviewed 2026-09-10T17:14:05.434Z sha d73f7fb :: blocked before merge. :: [P2] [P2] Reject malformed markers alongside a valid ordinary marker
  • reviewed 2026-09-10T18:11:01.323Z sha d73f7fb :: blocked before merge. :: [P2] [P2] Reject malformed markers alongside a valid ordinary marker

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. label Sep 10, 2026
…n marker

Classify() previously counted only exact-match occurrences of the recognized
ordinary/security-critical markers. A malformed or unknown 'openclaw-update:'
marker sitting alongside a valid ordinary marker silently vanished from the
count instead of being treated as ambiguous metadata, letting an update slip
through as verified-ordinary (and be suppressed for extended-stable Gateways)
even though the release body carried untrusted classification content.

Classify() now also counts any 'openclaw-update:' marker-shaped comment via a
looser regex and falls back to Unverified whenever that count exceeds the
exact-match count, preserving the fail-open contract documented in
docs/RELEASING.md for malformed or conflicting metadata.

Added regression tests for a valid ordinary marker combined with a
near-miss/malformed security marker and other marker-shape variants.
@shanselman

Copy link
Copy Markdown
Collaborator

Fixed the marker-classification gap flagged by review: \Classify()\ only counted exact-match occurrences of the recognized ordinary/security-critical markers, so a malformed or unrecognized \openclaw-update:\ marker sitting alongside a valid ordinary marker silently disappeared from the count instead of forcing the classification to fail closed (Unverified). A valid ordinary marker plus a near-miss/typo'd security marker (or any other unrecognized marker-shaped comment) now correctly falls back to Unverified per the documented fail-open contract.

Added regression coverage for that exact case plus other marker-shape variants (missing space, no leading space, unknown classification value).

On the maintainer-decision item: per @shanselman, the Gateway release tagging policy has since changed and this replacement (explicit trusted markers instead of free-text scanning) is the intended direction from Karen (karkarl), so the #1299-closure objection doesn't apply here as originally reasoned.

Validation on updated head: \�uild.ps1, Shared.Tests (3946 passed, 32 skipped), Tray.Tests (2887 passed, including 23 in the targeted UpdateCheckPipelineTests).

@shanselman
shanselman merged commit 7347631 into main Sep 11, 2026
34 of 36 checks passed
@shanselman
shanselman deleted the karkarl-fix-extended-stable-update-policy branch September 11, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants