Skip to content

improve: stage session dependencies for local development builds - #54

Merged
paulcam206 merged 1 commit into
docs/session-runtimefrom
improve/session-local-deployment
Sep 17, 2026
Merged

paulcam206 merged 1 commit into
docs/session-runtimefrom
improve/session-local-deployment

Conversation

@paulcam206

@paulcam206 paulcam206 commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

A loose-layout Developer Mode registration was not runnable end to end because local deployment did not stage the MXC runtime or publish the session host that the isolated lifecycle requires.

User Impact

Deploy-LocalPackage.ps1 now stages the MXC runtime and publishes the session host into the loose layout, with fixture coverage. A Developer Mode registration can therefore run the session-enabled package rather than only resemble package content.

Why This Change Was Made

The completed operator path is: run clawctl setup; start or reuse the isolated agent session; route openclaw into it; use clawctl pwsh for an interactive shell; start the gateway with clawctl gateway-service start; recover it after sign-in; collect redacted evidence with clawctl collect-logs; then use clawctl teardown or clawctl setup --fresh when appropriate.

This layer closes the local-development deployment gap by making the loose layout contain the MXC runtime and the published session host needed by that path. Fixture coverage verifies the composition boundary rather than a live installation.

At this point an operator can see setup and recovery state, use owned gateway controls, receive partial-collection warnings, and get explicit cleanup failures. It does not claim a pristine machine after --fresh, nor replace the pinned CLI backfill with the unreleased Microsoft.Mxc.Sdk.

Review fixes addressed

The production MXC staging adapter no longer interprets stale $LASTEXITCODE from an earlier native command as staging failure. A behavioral fixture executes the real adapter against a verified cached runtime while stale native failure state is present.

Current validation

Current layer head: cce2b02f3acd5791654b7a6b1a5a9c27db5ff63b. This layer is included in the final integrated stack tip cce2b02f3acd5791654b7a6b1a5a9c27db5ff63b rebased onto 685ee93b7ebbec1e784205a3544c460bea740e11.

Integrated local gates: exact .NET SDK 10.0.100; Test-DotNetQuality.ps1 with 0 warnings/errors; full solution tests 642/642; NativeAOT x64 and ARM64 publishes for both launcher and session host; NativeAOT CLI, deployment, MXC, signing, runtime-input, release-identity, bundle, isolation-plugin, and packaging-relevance policy suites.

Live x64 MXC evidence: final-tip Developer Mode deployment registered OpenClaw.Gateway_0.1.2451.40134_x64__kaa03rpbbqef6 from workflow payload run 35191206689; openclaw --version returned OpenClaw 2026.9.4 (3a9d69d); clawctl status confirmed the isolated session was running. Earlier final-tip validation also exercised setup, Node.js 24.20.0 reuse, package-qualified activation, detached gateway launch, and redacted diagnostics collection.

Signed package evidence: local NativeAOT x64 and ARM64 packages and a multi-architecture bundle were composed and test-signed. Elevated upgrade validation passed all four proof-release transitions (v0.0.0.0 and v0.0.0.1, standalone and bundle), retained package-family LocalState in every transition, and accepted fresh standalone and bundle installs. The temporary certificate and test package were removed, then the Developer Mode registration was restored.

Layer 12 of 12. Parent: #53 - docs/session-runtime

@clawsweeper

clawsweeper Bot commented Sep 15, 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 commented Sep 15, 2026

Copy link
Copy Markdown

Codex review: needs changes before merge. Reviewed September 17, 2026, 4:01 PM ET / 20:01 UTC (Revision 27).

ClawSweeper review

What this changes

The PR includes the isolated-session runtime and helper in local development packages, targets setup to the registered package, and aligns launcher runtime preparation.

Merge readiness

Needs changes before merge - 1 item remains

This remains a useful, distinct layer of the open session-runtime stack. The introduced patch has no blocking correctness findings, and the supplied Windows deployment evidence supports its behavior.

Priority: P2
Reviewed head: cce2b02f3acd5791654b7a6b1a5a9c27db5ff63b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused integration with relevant Windows behavior evidence and no blocking introduced defect.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The supplied head-specific Windows observations connect local package assembly and package-qualified setup to a successful x64 registration and running isolated session, with fresh-install and upgrade preservation evidence; these runs were reported by the contributor, not executed during this read-only review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The supplied head-specific Windows observations connect local package assembly and package-qualified setup to a successful x64 registration and running isolated session, with fresh-install and upgrade preservation evidence; these runs were reported by the contributor, not executed during this read-only review.
Evidence reviewed 8 items Verified review boundary: The pinned parent-to-head diff changes four files with 297 additions and 22 deletions. The full local source and introduced test changes were inspected; prerequisite stack changes were not attributed to this layer.
Default branch and release still lack session staging: The default-branch deployment path publishes only the launcher and fingerprints its existing inputs; it does not stage MXC or publish the session helper. The supplied latest release points to this same revision.
Release identity checked: The fetched default-branch revision is tagged v2026.9.4-msix.0; the requested deployment integration is therefore absent from both that revision and this release.
Findings None None.
Security None None.

How this fits together

The local deployment script combines downloaded OpenClaw content, pinned runtimes, and compiled Windows executables into a Developer Mode registration. Package-qualified setup then prepares that registration for running OpenClaw.

flowchart TD
  A[OpenClaw payload] --> D[Local package assembly]
  B[Pinned Node and MXC runtimes] --> D
  C[Launcher and session helper builds] --> D
  D --> E[Developer Mode registration]
  E --> F[Package-qualified setup]
  F --> G[Runnable isolated session]
Loading

Before merge

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production +210/-18 (net +192); tests +84/-2 (net +82); script documentation net +1 Production growth implements runtime composition and package activation, with focused deployment fixtures.

Technical review

Best possible solution:

Keep local development packages consistent with the session-enabled package layout by reusing the pinned runtime verifier and package-qualified setup.

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

Not applicable as a released-feature regression: this layer integrates the pending isolated-session capability into local deployment, and the parent source visibly lacks its required staging.

Is this the best way to solve the issue?

Yes. Reusing the existing runtime verifier and package layout conventions is a focused solution; the launcher overload also follows the runtime-preparation pattern already used by the stack's production entrypoint.

AGENTS.md: not found in the target repository.

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

Labels

Label justifications:

  • P2: This is a bounded improvement to the Windows local-development deployment workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The supplied head-specific Windows observations connect local package assembly and package-qualified setup to a successful x64 registration and running isolated session, with fresh-install and upgrade preservation evidence; these runs were reported by the contributor, not executed during this read-only review.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied head-specific Windows observations connect local package assembly and package-qualified setup to a successful x64 registration and running isolated session, with fresh-install and upgrade preservation evidence; these runs were reported by the contributor, not executed during this read-only review.

Evidence

What I checked:

  • Verified review boundary: The pinned parent-to-head diff changes four files with 297 additions and 22 deletions. The full local source and introduced test changes were inspected; prerequisite stack changes were not attributed to this layer. (scripts/LocalPackage.psm1:759, cce2b02f3acd)
  • Default branch and release still lack session staging: The default-branch deployment path publishes only the launcher and fingerprints its existing inputs; it does not stage MXC or publish the session helper. The supplied latest release points to this same revision. (scripts/LocalPackage.psm1:594, 685ee93b7ebb)
  • Release identity checked: The fetched default-branch revision is tagged v2026.9.4-msix.0; the requested deployment integration is therefore absent from both that revision and this release. (685ee93b7ebb)
  • Runtime acquisition and activation safeguards: The new adapter calls the existing Get-MxcRuntime.ps1 verifier, which checks archive integrity and allowlisted file hashes without npm lifecycle execution. Setup resolves the current user's matching registered package family and Control application before activation, then holds a process handle through waiting and exit-code retrieval. (scripts/LocalPackage.psm1:14, cce2b02f3acd)
  • Real Windows deployment and upgrade evidence: The complete supplied PR body, captured under sourceRevision 40b26273beb014fea262dc1b855244f259bca3a48d29b3d025607be11dd52345, identifies this head and reports a final-tip x64 Developer Mode registration, OpenClaw version output, and an isolated session running. It also reports package-qualified setup, Node reuse, four signed baseline upgrade transitions retaining LocalState, and fresh standalone/bundle installs. These observations cover deployment composition and setup beyond a generic version smoke. (cce2b02f3acd)
  • Review continuity: The previous completed review contained no findings. The earlier retained process-handle finding is addressed by OpenProcess, WaitForSingleObject, GetExitCodeProcess, and finally-based handle disposal. Local comparison with the previous reviewed SHA failed because that object could not be retrieved; no unchanged-code or late-finding claim relies on that comparison. (scripts/LocalPackage.psm1:101, cce2b02f3acd)

Likely related people:

  • Paul Campbell: Raw commit 814b02a adds scripts/LocalPackage.psm1:304 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 814b02ac7876; files: scripts/LocalPackage.psm1)

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 (26 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-17T16:11:56.416Z sha 24b444a :: blocked before merge. :: [P2] Retain the activated process handle before reading its exit code
  • reviewed 2026-09-17T16:23:29.169Z sha 0fa0c1f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T16:38:41.017Z sha b47dea4 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T16:56:29.446Z sha 5944bb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T17:05:05.582Z sha 5944bb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T19:01:43.007Z sha 5a1509c :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T19:22:08.760Z sha 525977b :: needs changes before merge. :: none
  • reviewed 2026-09-17T19:40:18.239Z sha fb3e16b :: needs changes before merge. :: none

@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch from 60987c6 to ed194d9 Compare September 15, 2026 20:32
@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch from ed194d9 to 4a1e68e Compare September 15, 2026 20:41
@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch from 4a1e68e to dc5b5fe Compare September 15, 2026 20:57
@clawsweeper clawsweeper Bot added 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. and removed 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. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Sep 15, 2026
@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch from 3425d08 to 6898b55 Compare September 17, 2026 01:51
@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch 4 times, most recently from 3f7328d to 24b444a Compare September 17, 2026 16:06
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. 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. and removed 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. proof: sufficient Contributor real behavior proof is sufficient. labels Sep 17, 2026
@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch from 24b444a to 0fa0c1f Compare September 17, 2026 16:18
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. 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. and removed 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. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Sep 17, 2026
@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch from 0fa0c1f to da94098 Compare September 17, 2026 16:27
@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch from da94098 to b47dea4 Compare September 17, 2026 16:33
@paulcam206
paulcam206 force-pushed the improve/session-local-deployment branch from b47dea4 to 5944bb8 Compare September 17, 2026 16:51
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 97c31f3f-0c7b-43e8-b979-6418dcb7fedc
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. proof: sufficient Contributor real behavior proof is sufficient. 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