Skip to content

feat: add dev/release side-by-side app identity - #922

Merged
steipete merged 3 commits into
openclaw:mainfrom
karkarl:karkarl-dev-release-side-by-side-identity
Jul 6, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
karkarl:karkarl-dev-release-side-by-side-identity

Conversation

@karkarl

@karkarl karkarl commented Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Dev and release builds previously shared package/runtime state, so installing or testing one could disrupt the other. This makes the two variants genuinely side-by-side safe while preserving the contributor's compile-time identity design. Thanks @karkarl for the foundation.

What changed

  • Separate display/package/installer identities, install paths, data roots, mutexes, protocol handlers, autostart registry values, and scheduled tasks.
  • Exact protocol ownership: release accepts openclaw://; dev accepts openclaw-dev://.
  • Separate app-owned WSL gateways: OpenClawGateway on 18789 and OpenClawGateway-Dev on 18790.
  • Variant-aware onboarding, wizard log tailing, gateway registry/settings, updater behavior, in-app removal, and installer cleanup.
  • Target-only WSL cleanup: no global WSL shutdown; exact distro matching prevents release cleanup from touching dev keepalive processes.
  • Generated MSIX manifests under obj; dev packaging no longer mutates or leaks into the tracked release manifest.
  • Dev/release-aware local Inno build helper with published-identity validation.

Validation

  • AutoReview: no accepted/actionable findings.
  • Windows 11 ARM64 VM, exact head:
    • full repository build: pass
    • Shared tests: 2692 passed, 31 skipped
    • SetupEngine tests: 376 passed
    • Tray tests: 1535 passed
    • native UI tests: 94 passed
    • Dev build: 0 warnings, 0 errors
  • Dev and release processes launched simultaneously with distinct titles, data roots, registry protocol handlers, and deep-link routing.
  • Dev MSIX identity/protocol: OpenClaw.Companion.Dev / openclaw-dev; subsequent release package remained OpenClaw.Companion / openclaw and the source manifest remained unchanged.
  • Local Apple-silicon VM cannot provide nested virtualization for real WSL2; exact-head Windows CI setup E2E remains the authoritative WSL install/connect proof.

@clawsweeper

clawsweeper Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 11:30 PM ET / 03:30 UTC.

Summary
The PR adds compile-time dev/release identity separation across installer/MSIX packaging, data directories, deep links, autostart, WSL gateway setup/cleanup, updater behavior, and focused tests.

Reproducibility: not applicable. this is a feature PR rather than a bug report. The review checked the current PR head source, diff, comments, and reported validation instead of reproducing a failing current-main path.

Review metrics: 2 noteworthy metrics.

  • Diff size: 56 files changed, +825/-296. The change spans installer, setup engine, tray runtime, shared parsing, scripts, resources, and tests, so runtime proof needs to cover more than one code path.
  • CI status at review: 4 success, 2 skipped, 2 in progress. The final merge gate still depends on the remaining Build and Test jobs finishing cleanly.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add a ## Real behavior proof section with current-head redacted terminal/log/screenshot evidence for dev and release side-by-side state.
  • Let the remaining Build and Test/setup-connect E2E checks complete cleanly or update the PR with the final passing links.
  • After updating the PR body, ClawSweeper should re-review automatically; if not, ask a maintainer to comment @clawsweeper re-review.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body reports a Windows VM run and side-by-side observations, but it lacks an after-fix artifact, transcript, log, terminal output, screenshot, or recording that directly shows the changed runtime state; redact private paths, IPs, endpoints, and tokens before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The PR touches compatibility-sensitive installer, setup, data-root, credential, protocol, autostart, and uninstall surfaces; prose validation is not enough to prove all of those runtime boundaries on the current head.
  • [P1] At last read, the main Build and Test job and setup-connect E2E check were still in progress, so the final CI signal was not settled.

Maintainer options:

  1. Add current-head identity proof (recommended)
    Add a PR-body Real behavior proof section with redacted terminal/log/screenshot evidence showing release and dev installed or launched side-by-side with distinct data roots, protocol handlers, mutexes, autostart names, gateway records, and MCP token paths.
  2. Accept maintainer-owned proof risk
    A maintainer could accept the prose VM validation as enough, but then owns any upgrade or credential isolation miss that CI and unit tests did not exercise.
  3. Pause until CI is settled
    Wait for the remaining Build and Test and setup-connect E2E checks to complete before making the merge decision.

Next step before merge

  • [P1] No narrow repair job is queued because I found no discrete code defect; the next action is contributor or maintainer proof/CI follow-up for a compatibility-sensitive PR.

Security
Cleared: The diff touches installer, PowerShell cleanup, MSBuild manifest generation, and credential paths, but I found no concrete new security or supply-chain defect in the patch.

Review details

Best possible solution:

Land the AppIdentity-based implementation after the PR body includes current-head side-by-side runtime proof and the remaining CI/setup-connect gates finish cleanly.

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

Not applicable: this is a feature PR rather than a bug report. The review checked the current PR head source, diff, comments, and reported validation instead of reproducing a failing current-main path.

Is this the best way to solve the issue?

Yes for the code path inspected: a central AppIdentity contract is the narrow maintainable way to keep dev/release identity decisions consistent. Merge readiness still depends on current-head runtime proof for the Windows install/launch surfaces.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add merge-risk: 🚨 compatibility: Merging changes install identity, package identity, paths, protocol registration, autostart, WSL distro naming, and uninstall cleanup, which can affect existing installs and upgrades.
  • add merge-risk: 🚨 auth-provider: The change intentionally separates gateway registry, device identity, and MCP token state, so a missed path could cross-contaminate credentials between dev and release builds.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body reports a Windows VM run and side-by-side observations, but it lacks an after-fix artifact, transcript, log, terminal output, screenshot, or recording that directly shows the changed runtime state; redact private paths, IPs, endpoints, and tokens before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This is a normal-priority feature/compatibility improvement with meaningful but bounded blast radius for dev and release installs.
  • merge-risk: 🚨 compatibility: Merging changes install identity, package identity, paths, protocol registration, autostart, WSL distro naming, and uninstall cleanup, which can affect existing installs and upgrades.
  • merge-risk: 🚨 auth-provider: The change intentionally separates gateway registry, device identity, and MCP token state, so a missed path could cross-contaminate credentials between dev and release builds.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body reports a Windows VM run and side-by-side observations, but it lacks an after-fix artifact, transcript, log, terminal output, screenshot, or recording that directly shows the changed runtime state; redact private paths, IPs, endpoints, and tokens before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

What I checked:

  • Variant identity contract: The PR head adds AppIdentity with dev/release-specific display name, package identity, autostart task, data directory, mutex, protocol scheme, WSL distro, gateway port, and data-directory resolution helpers. (src/OpenClaw.Tray.WinUI/AppIdentity.cs:9, ce5983ea4512)
  • Deep-link isolation repaired: DeepLinkParser now accepts an explicit scheme and tray startup/handler paths parse only AppIdentity.ProtocolScheme, addressing the prior openclaw-dev parser blocker. (src/OpenClaw.Shared/DeepLinkParser.cs:16, ce5983ea4512)
  • Settings and credential roots are variant-aware: SettingsManager defaults now resolve through AppIdentity.ResolveRoamingDataDirectory, and NodeService.McpTokenPath composes from SettingsManager.SettingsDirectoryPath, so the main tray credential/MCP token paths follow the build identity. (src/OpenClaw.Tray.WinUI/Services/SettingsManager.cs:188, ce5983ea4512)
  • Installer and autostart split: installer.iss defines separate dev/release AppId, install directory, mutex, autostart value, scheduled task name, WSL distro, protocol, and output suffix, and passes those values to gateway cleanup. (installer.iss:3, ce5983ea4512)
  • MSIX manifest no longer mutates tracked source: The project generates a versioned/channel-specific manifest under obj and replaces the AppxManifest item with that generated file before packaging. (src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj:109, ce5983ea4512)
  • Maintainer review context: A prior review comment said the feature direction is useful but must be all-or-nothing across credentials, settings, protocol, startup, and manifest mutation; the current head targets each listed blocker. (ce5983ea4512)

Likely related people:

  • Scott Hanselman: git blame shows the current main installer, startup task, deep-link parser, and app data-path baselines used by this PR trace to commit 4166e0f. (role: introduced current baseline; confidence: high; commits: 4166e0fd63f8; files: installer.iss, src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Tray.WinUI/Services/SettingsManager.cs)
  • steipete: Recent main history includes the Windows gateway onboarding work in adcb4c3, and the current PR branch’s repair commit reworks the setup/tray identity boundary. (role: recent adjacent contributor; confidence: high; commits: adcb4c378f90, 6c922fca0637; files: src/OpenClaw.SetupEngine.UI/SetupWindow.xaml.cs, src/OpenClaw.SetupEngine/Program.cs, src/OpenClaw.Tray.WinUI/App.xaml.cs)
  • karkarl: Current main includes the real-process Windows accessibility scan work, and the first PR commit introduced the AppIdentity side-by-side approach under review. (role: recent adjacent contributor; confidence: medium; commits: e0a2301ce2e8, 86c5021c8b2d; files: tests/OpenClaw.Tray.UITests/AccessibilityAppFixture.cs, src/OpenClaw.Tray.WinUI/AppIdentity.cs, installer.iss)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (2 earlier review cycles)
  • reviewed 2026-07-02T23:05:11.496Z sha d15a393 :: needs real behavior proof before merge. :: [P1] Isolate the settings store before claiming dev separation | [P1] Do not let Debug builds steal the release protocol handler | [P1] Teach the parser about the dev protocol | [P2] Avoid leaving dev protocol in the source manifest
  • reviewed 2026-07-06T03:18:46.412Z sha 6c922fc :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added 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. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. labels Jul 2, 2026
@shanselman

Copy link
Copy Markdown
Collaborator

Hi Karen — bot review with Scott's maintainer feedback included. This is a really useful feature direction, and the central AppIdentity idea is a good instinct. The reason we cannot take it yet is that side-by-side identity has to be all-or-nothing: if even one credential, settings, protocol, or startup surface is still shared, dev builds can affect a user's release install.

The blockers I see:

  1. openclaw-dev:// is registered/accepted, but still rejected by the parser. The PR wires dev links into installer/startup handling, but OpenClaw.Shared.DeepLinkParser still only accepts openclaw://. That means dev Start Menu links and protocol activations like openclaw-dev://setup can pass the outer startup check and then no-op when parsed.

  2. Dev/release data isolation is incomplete. The PR adds dev DataPath/IdentityDataPath, but many important paths still flow through SettingsManager.SettingsDirectoryPath, which remains %APPDATA%\OpenClawTray. That includes settings, gateways.json, per-gateway/device identity migration paths, MCP token path (NodeService.McpTokenPath), and other credential/state surfaces. A dev build can still read or mutate release gateway/MCP state.

  3. Auto-start is not fully split. The registry Run value is variant-aware, but the scheduled-task fallback uses the shared task name in WindowsStartupTaskRegistration, so dev and release can overwrite each other's auto-start registration.

  4. The MSIX manifest patch mutates the source manifest in place. The dev identity target writes directly to Package.appxmanifest. That can leave a dirty worktree or accidentally carry a dev protocol/name into a later release build if not restored or generated into an intermediate file.

  5. There are a few smaller cleanup items. For example MyAutoStartName is defined in installer.iss but not used, and a few log strings still hardcode openclaw://.

Bot-ready repair prompt you can give your coding agent:

Please repair PR #922 for OpenClaw side-by-side dev/release identity. The goal is complete isolation between release and dev builds, while preserving release defaults.

Requirements:
1. Define one variant-aware identity/data contract and route all identity-sensitive paths through it. Cover settings, logs, gateways.json, gateway identity directories, legacy identity migration paths, MCP token path, voice/model/cache paths, diagnostics/config folder links, and any other app-data paths currently using SettingsManager.SettingsDirectoryPath or hardcoded OpenClawTray.
2. Make deep-link handling variant-aware end to end. `openclaw-dev://` must parse and route correctly in dev builds. Release must continue to use `openclaw://`. If dev intentionally accepts release links as an alias, normalize that intentionally and add tests.
3. Make unpackaged protocol registration variant-aware. Debug/dev builds must not overwrite the release `openclaw://` handler.
4. Make scheduled-task auto-start names variant-aware, including cleanup/migration behavior for existing release task names.
5. Fix MSIX manifest patching so dev identity/protocol changes do not dirty or permanently mutate source-controlled `Package.appxmanifest`. Patch a generated copy or restore the original values after packaging.
6. Add focused tests for release and dev identities: data roots, protocol parsing/registration strings, autostart names, installer protocol/mutex/AppId/start-menu links, and MCP token path separation.
7. Add `## Real behavior proof` to the PR body showing release and dev builds installed or launched side-by-side with separate data roots, mutexes, protocol handlers, and auto-start names.
8. Run .\build.ps1, Shared tests, Tray tests, and any targeted installer/identity tests.

This is not a rejection of the feature. It is the right kind of feature, but the boundary is security/compatibility-sensitive, so we need it complete before merge.

karkarl and others added 2 commits July 6, 2026 02:33
Enable Dev and Release builds to coexist on the same machine (similar
to WinUI Gallery). Debug/DevBuild=true builds get:

- Display name: 'OpenClaw Companion (Dev)' / 'OpenClaw Tray (Dev)'
- MSIX package identity: OpenClaw.Companion.Dev
- Separate data directory: %LOCALAPPDATA%\OpenClawTray-Dev
- Separate auto-start registry key: OpenClawTray-Dev
- Separate single-instance mutex: OpenClawTray-Dev
- Separate protocol handler: openclaw-dev://
- Separate installer AppId and install directory

Add AppIdentity.cs with compile-time constants controlled by the
DEV_BUILD define (auto-set for Debug configuration, or explicitly
via /p:DevBuild=true).

Update csproj with PatchDevAppxManifestIdentity MSBuild target that
patches the MSIX manifest for dev MSIX builds.

Update installer.iss to support /DDevBuild=1 preprocessor flag for
producing a side-by-side dev installer.

Co-authored-by: Copilot App <[email protected]>
@steipete
steipete force-pushed the karkarl-dev-release-side-by-side-identity branch from d15a393 to 6c922fc Compare July 6, 2026 03:13
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. and removed 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. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. labels Jul 6, 2026
@steipete
steipete merged commit dae64b6 into openclaw:main Jul 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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