Skip to content

fix(setup): ignore packaged toast activation argument - #1604

Merged
RomneyDa merged 2 commits into
mainfrom
fix/setup-ignore-toast-activation
Oct 2, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
fix/setup-ignore-toast-activation

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • strip the MSIX-owned -ToastActivated sentinel before tray startup arguments reach the setup parser
  • retain strict rejection of unknown setup arguments
  • read the packaged COM activation argument from the manifest and prove setup consumes it case-insensitively

Root cause and introduction

The regression was introduced on 2026-09-11 by #1328 (feat: add Microsoft Store MSIX packaging), merge commit bd9ce43b4d9c63fa90196a6a33b1c1be409850b2.

That PR added Arguments="-ToastActivated" to the packaged COM toast activator in src/OpenClaw.Tray.WinUI/Package.appxmanifest, but did not add that host-owned sentinel to SetupWindowArgumentProjection. On a first-run or incomplete install, the tray opened hosted setup and forwarded the token into SetupWindowCommandLine, whose strict parser correctly rejected the single-dash positional token. The result was the fatal Invalid setup arguments: Unexpected argument '-ToastActivated'. screen.

The affected v2026.9.5-alpha.84 release points to commit d090a8110fa3f8b9a4c2e09a3366570b7fb027f4, which contains that mismatch.

This remained latent through successful Store/MSIX use because it requires two conditions at once: Windows must cold-start the packaged COM toast activator (ordinary package launch does not supply -ToastActivated), and the profile must still require hosted setup. Configured profiles skip SetupWindow, while ordinary first launches have no toast sentinel. Existing tests asserted the manifest registration and setup projection independently, but had no cross-boundary case proving that the manifest-owned activation token is consumed before strict setup parsing.

Ownership and invariant

  • Old owner: hosted setup parser received the tray process command line after partial projection.
  • New owner: SetupWindowArgumentProjection consumes the packaged tray-host activation sentinel.
  • Preserved invariant: setup continues to fail closed for unknown or malformed setup arguments; only the manifest-owned host token is removed.

Required proof pools

  • windows-clean-installer-upgrade: the reported regression occurs on first launch of an installed MSIX.
  • windows-winui-interactive: current-head setup must visibly open without the fatal argument error.

Validation

  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter FullyQualifiedName~SetupWindowArgumentProjectionTests - passed, 30/30 at head cf83bb4d.
  • .agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-output - clean after the manifest-bound test update, no accepted/actionable findings; correctness confidence 0.95.
  • Exact-head Windows CI run 37004177002 passed: Tray, setup, and integration tests, UI, functional, and accessibility tests, Setup and connect E2E, security, fast validation, proof-pool contracts, and CI Gate are green.
  • Required local Windows ./build.ps1, Shared tests, and Tray tests: Not verified locally. Parallels could not boot because the host disk needs 9,973 MB more free space. Azure Crabbox then rejected spot capacity because the subscription has a 3-core low-priority quota and rejected every attempted on-demand Windows SKU in eastus, including the quota-compatible Standard_D2ads_v6 and Standard_B2ms, for capacity.

Real behavior proof

  • Project_RemovesPackagedToastActivationArgument reads the actual com:ExeServer/@Arguments value from Package.appxmanifest, projects OpenClaw.Tray.WinUI.exe <manifest-argument> --config=custom.json, and verifies that only the valid setup argument remains. This closes the cross-boundary coverage gap that allowed feat: add Microsoft Store MSIX packaging #1328 to ship.
  • Current-head packaged first-run screenshot: Not verified / blocked. Parallels lacks host disk capacity; Azure Crabbox lacks an allocatable interactive Windows SKU in the configured region. No adjacent automated result is presented as visible proof.

Review notes

Rubber-duck/autoreview found no actionable defects. The fix remains at the tray-to-setup argument ownership boundary rather than weakening SetupWindowCommandLine validation.

@clawsweeper

clawsweeper Bot commented Oct 2, 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.

@RomneyDa RomneyDa added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 2, 2026
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🦀 challenger crab Exceptional PR readiness: strong proof, clean patch, and convincing validation. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex review: needs changes before merge. Reviewed October 2, 2026, 8:04 AM ET / 12:04 UTC (Revision 3).

ClawSweeper review

What this changes

The PR removes Windows’ packaged toast activation argument before setup parses startup arguments and adds manifest-bound, case-insensitive regression coverage.

Merge readiness

⛔ Needs changes before merge - 1 item remains

The fix remains necessary on main, and no introduced correctness defect was found. The documented proof-pool blockers address the earlier request for explicit blocker reporting; required full Windows validation remains unverified.

Priority: P0
Reviewed head: cf83bb4dd0476816c2818ba3fc7e2af16a0369fe

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful cross-boundary regression coverage and no identified defect; required Windows closeout validation remains unverified.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the ordinary contributor proof gate. Its manifest-bound unit test covers argument projection, while packaged cold-start setup remains explicitly blocked by unavailable Windows capacity, as scoped policy permits; older packaging screenshots do not prove this fix. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the ordinary contributor proof gate. Its manifest-bound unit test covers argument projection, while packaged cold-start setup remains explicitly blocked by unavailable Windows capacity, as scoped policy permits; older packaging screenshots do not prove this fix. No stored-data contract changes.
Evidence reviewed 8 items Exact introduced change: The pinned introduction delta adds one host flag and 27 test lines. The existing case-insensitive filter consumes the sentinel without changing setup parser rules.
Main still needs the fix: The fetched main projection does not recognize -ToastActivated. The package manifest supplies that token, WindowManager forwards projected startup arguments, and SetupArgumentParser rejects single-dash positional arguments. These sources establish the reported mechanism without executing Windows.
Production setup boundary: The hosted setup window receives startup arguments through the existing projection owner. The PR preserves this ownership boundary rather than weakening the parser.
Findings None None.
Security None None.

How this fits together

Windows can start the packaged Companion through its toast activator. The tray filters process arguments before passing setup options to the hosted onboarding window’s strict parser.

flowchart LR
  A[Windows toast activation] --> B[Tray startup arguments]
  B --> C[Host argument filter]
  C --> D[Strict setup parser]
  D --> E[Setup window]
  D --> F[Argument error page]
Loading

Before merge

  • Complete next step (P2) - Complete the required full Windows build and Shared/Tray tests, and record results for the current head.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth production +1, tests +27 The production change is limited to the host-token allowlist, with manifest-bound coverage for the packaging boundary.

Technical review

Best possible solution:

Keep tray-owned activation tokens out of setup parsing while preserving strict rejection of unknown setup options.

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

Yes, source establishes the failure path: packaged toast cold-start supplies -ToastActivated, an incomplete profile opens hosted setup, and main’s parser rejects the unfiltered token. Windows runtime reproduction was not performed.

Is this the best way to solve the issue?

Yes. Consuming the manifest-owned token in the existing tray argument filter is a narrow repair that preserves setup’s strict parser and avoids a competing startup path.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • remove rating: 🦀 challenger crab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P0: The reported packaged cold-start path blocks incomplete-profile onboarding on a fatal argument page with no in-product recovery.
  • 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: The MEMBER-authored PR is exempt from the ordinary contributor proof gate. Its manifest-bound unit test covers argument projection, while packaged cold-start setup remains explicitly blocked by unavailable Windows capacity, as scoped policy permits; older packaging screenshots do not prove this fix. No stored-data contract changes.

Evidence

What I checked:

  • Exact introduced change: The pinned introduction delta adds one host flag and 27 test lines. The existing case-insensitive filter consumes the sentinel without changing setup parser rules. (src/OpenClaw.Tray.WinUI/Services/SetupWindowArgumentProjection.cs:8, cf83bb4dd047)
  • Main still needs the fix: The fetched main projection does not recognize -ToastActivated. The package manifest supplies that token, WindowManager forwards projected startup arguments, and SetupArgumentParser rejects single-dash positional arguments. These sources establish the reported mechanism without executing Windows. (src/OpenClaw.Tray.WinUI/Services/SetupWindowArgumentProjection.cs:5, 9ab23fcd2d46)
  • Production setup boundary: The hosted setup window receives startup arguments through the existing projection owner. The PR preserves this ownership boundary rather than weakening the parser. (src/OpenClaw.Tray.WinUI/Services/WindowManager.cs:879, cf83bb4dd047)
  • Current-head regression coverage: The new test reads the actual manifest activation argument and checks both its original and lowercase spelling while preserving --config=custom.json. The captured PR body reports 30/30 focused tests passing at this head. (tests/OpenClaw.Tray.Tests/SetupWindowArgumentProjectionTests.cs:55, cf83bb4dd047)
  • Validation and proof disposition: The complete captured PR body explicitly reports the full Windows build and Shared/Tray suites as unverified, with Parallels disk-capacity and Azure capacity/quota blockers. It also documents unavailable current-head packaged setup proof. Repository policy permits explicit visible-proof blockers and requires honest validation reporting. The author is MEMBER, so the ordinary external-contributor proof gate does not apply. (AGENTS.md, cf83bb4dd047)
  • Prepared media inspected: All four prepared images were inspected. They show Dev package naming, startup registration, packaged app information dated September 10, and camera consent from the related packaging PR. They do not demonstrate current-head toast activation reaching setup.

Likely related people:

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

  • Record current-head results for the required full Windows build and Shared/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 (2 earlier review cycles)
  • reviewed 2026-10-02T11:52:30.926Z sha 94551c5 :: needs changes before merge. :: none
  • reviewed 2026-10-02T11:55:31.083Z sha 94551c5 :: needs changes before merge. :: none

@RomneyDa
RomneyDa marked this pull request as ready for review October 2, 2026 11:53
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦀 challenger crab Exceptional PR readiness: strong proof, clean patch, and convincing validation. labels Oct 2, 2026
@RomneyDa
RomneyDa merged commit 407bc77 into main Oct 2, 2026
24 checks passed
@RomneyDa
RomneyDa deleted the fix/setup-ignore-toast-activation branch October 2, 2026 12:20
@RomneyDa

RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper could not start a re-review for this item.

Reason: re-review requires an open issue or PR.

@RomneyDa RomneyDa removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. 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