Skip to content

fix(local-ai): launch with physical MSIX paths - #1610

Merged
RomneyDa merged 2 commits into
mainfrom
openclaw/investigate-transient-llama-dll-installation-errors
Oct 2, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
openclaw/investigate-transient-llama-dll-installation-errors

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • resolve Local AI executable, working-directory, model, draft-model and preset paths through open handles before native launch
  • pass physical paths behind MSIX filesystem virtualization only at the child-process boundary
  • keep persisted manifests and rollback ownership on their existing logical paths
  • reject path-resolution failures through the existing startup cleanup path instead of surfacing a Windows loader modal

The packaged Companion can validate files through its logical MSIX filesystem view while llama-server.exe receives a different native child-process view. That allowed the launcher to start without finding adjacent llama-server-impl.dll. This uses the physical path returned for the already-open file or directory handle, matching the cross-package path contract already used by native Gateway launches.

Required proof pools

  • windows-clean-installer-upgrade: packaged MSIX filesystem virtualization and an existing Local AI installation are part of the failing boundary.

Validation

  • dotnet test tests/OpenClaw.Connection.Tests/OpenClaw.Connection.Tests.csproj --filter 'FullyQualifiedName~LocalAiPortLifecycleTests' --no-restore: 109 passed, 0 failed
  • native Windows focused tests on exact pre-rebase tree: 2 passed, 0 failed (Crabbox run); AWS m7i.4xlarge, lease cbx_a6ff0e4de59e, Windows normal mode, lease released after proof
  • prior-head GitHub CI: CI Gate, Core/CLI, Tray/setup/integration, setup/connect E2E, network/revocation E2E, CodeQL and security all passed; exact rebased-head CI is running
  • required local Windows ./build.ps1, Shared tests and Tray tests: Not verified / blocked. Parallels needs 81.5 GB more host disk; the Crabbox stock image lacks the Windows SDK and winget, so scripts/setup-dev.ps1 cannot provision the full build prerequisites
  • full Connection suite on macOS: not applicable as merge evidence; 279 Windows-only migration tests failed on unsupported Windows principal/registry APIs

Real behavior proof

  • current-head regression forces logical-to-physical path translation and verifies the child receives the physical executable, working directory and --models-preset path
  • the generated preset contains the same child-visible physical model path used by health probing
  • the readiness probe explicitly records the physical model path, covering the downstream onboarding failure where a second chooser pass reports that AI verification is unavailable
  • production resolver opens existing files/directories and uses GetFinalPathNameByHandleW, so the child receives the on-disk path behind MSIX redirection
  • native Windows production resolver and launch projection: 2 focused tests passed on Crabbox at the same source tree as current head
  • packaged current-head Local AI launch/model readiness for fresh and existing installs: Not verified / blocked by unavailable packaged Windows environment

Review

  • initial AutoReview identified two accepted findings: translate the model path inside the preset and keep executable path resolution inside startup cleanup handling
  • both findings are fixed in the published head
  • ClawSweeper found no actionable correctness or security defect on the pre-rebase tree; its remaining request is packaged fresh/existing-install proof
  • pre-assertion rebased-head AutoReview: clean, no actionable findings, patch correct (0.82 confidence)
  • latest-head AutoReview and ClawSweeper closeout: pending

@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 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. 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 Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed October 2, 2026, 12:52 PM ET / 16:52 UTC (Revision 4).

ClawSweeper review

What this changes

The PR resolves Local AI launch and recovery paths to physical Windows locations while preserving logical installation receipts.

Merge readiness

⛔ Blocked before merge - 3 items remain

The change remains useful: pinned main still launches with logical paths and probes recovery using the receipt path. No actionable correctness defect was found, but the previously requested packaged compatibility proof and required Windows validation remain unresolved.

Priority: P2
Reviewed head: 69a5e6d5f7a39abb562819055bb42501f178f809

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, coherent repair with no supported correctness finding; packaged compatibility and required Windows validation remain landing gates.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER author is exempt from the ordinary external-contributor proof gate. Reported Windows resolver tests and fake-host launch/recovery coverage support the implementation but do not demonstrate packaged llama-server launch, adjacent DLL visibility, model readiness, or upgrade recovery; those scoped verification gaps remain in risks. Logical receipt contracts are unchanged.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER author is exempt from the ordinary external-contributor proof gate. Reported Windows resolver tests and fake-host launch/recovery coverage support the implementation but do not demonstrate packaged llama-server launch, adjacent DLL visibility, model readiness, or upgrade recovery; those scoped verification gaps remain in risks. Logical receipt contracts are unchanged.
Evidence reviewed 8 items Pinned introduction: Read the complete six-file introduced diff between the supplied main and PR head. Production changes translate launch paths and recovery model identity; no dependency, workflow, or package-source changes are introduced.
Launch identity and cleanup: Startup resolves primary and draft models before generating the preset, resolves the preset, executable, and working directory before process creation, and retains preparation failures inside existing startup cleanup handling. Readiness subsequently uses the retained physical model identity.
Recovery preserves receipt ownership: Recovery resolves the original model before probing; IO or access failures preserve the replacement receipt through the existing warning path. The manifest format and logical ownership paths are unchanged.
Findings None None.
Security None None.

How this fits together

Companion starts and monitors a managed llama-server process using installed runtime and model receipts. Its launch preset and readiness probes must identify the same files that the native process sees behind MSIX filesystem virtualization.

flowchart TD
  A[Installation receipts] --> B[Validate runtime and models]
  B --> C[Resolve physical paths]
  C --> D[Write launch preset]
  D --> E[Start native AI server]
  E --> F[Verify model readiness]
  C --> G[Probe recovery endpoint]
  F --> H[Publish managed AI endpoint]
Loading

Before merge

  • Resolve merge risk (P1) - Packaged fresh and existing installations have not demonstrated adjacent runtime DLL visibility, physical preset/model readiness, and recovery receipt behavior under MSIX virtualization.
  • Resolve merge risk (P1) - The required Windows build, Shared tests, and Tray tests remain explicitly blocked in the submitted validation record.
  • Complete next step (P2) - Complete the declared packaged fresh/existing-install proof and publish the required Windows build, Shared-test, and Tray-test results.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth production +165/-16, tests +158/-1, docs +6/-0 Production growth implements the native path resolver and boundary projections, with focused launch and recovery coverage.

Merge-risk options

Maintainer options:

  1. Verify the packaged boundary (recommended)
    Use the declared installer-upgrade pool to establish fresh and existing-install launch, readiness, and recovery behavior before landing.

Technical review

Best possible solution:

Keep physical path translation at native launch and recovery boundaries, with logical receipts preserved and packaged installation compatibility verified.

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

Unclear: source establishes the logical/native path mismatch mechanism, but the submitted evidence does not reproduce the failure or demonstrate recovery in a packaged MSIX installation.

Is this the best way to solve the issue?

Yes: resolving existing handles at the child-process boundary is a focused approach that preserves receipt ownership; packaged compatibility still needs verification.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded repair to managed Local AI launch and recovery.
  • merge-risk: 🚨 compatibility: Existing packaged installations will use newly resolved physical launch and recovery paths whose MSIX behavior remains unverified.
  • 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 author is exempt from the ordinary external-contributor proof gate. Reported Windows resolver tests and fake-host launch/recovery coverage support the implementation but do not demonstrate packaged llama-server launch, adjacent DLL visibility, model readiness, or upgrade recovery; those scoped verification gaps remain in risks. Logical receipt contracts are unchanged.

Evidence

What I checked:

  • Pinned introduction: Read the complete six-file introduced diff between the supplied main and PR head. Production changes translate launch paths and recovery model identity; no dependency, workflow, or package-source changes are introduced. (69a5e6d5f7a3)
  • Launch identity and cleanup: Startup resolves primary and draft models before generating the preset, resolves the preset, executable, and working directory before process creation, and retains preparation failures inside existing startup cleanup handling. Readiness subsequently uses the retained physical model identity. (src/OpenClaw.Connection/LocalAi/LlamaServerRuntimeService.cs:502, 69a5e6d5f7a3)
  • Recovery preserves receipt ownership: Recovery resolves the original model before probing; IO or access failures preserve the replacement receipt through the existing warning path. The manifest format and logical ownership paths are unchanged. (src/OpenClaw.SetupEngine/LocalAiRecoveryPolicy.cs:276, 69a5e6d5f7a3)
  • Still necessary on pinned main: Main builds the preset from the existing runtime model path without the new child-path resolution, and its recovery probe passes original.ModelPath directly. These checks do not establish the fix in the latest release. Release-blob inspection failed because the promisor remote returned HTTP 403. (src/OpenClaw.SetupEngine/LocalAiRecoveryPolicy.cs:267, 65300da42b5a)
  • Submitted proof and prior review continuity: The captured PR body reports 109 focused tests and two native Windows focused tests from Crabbox run run_41eaf649c1a63dd734792811c6ad7de3, AWS lease cbx_a6ff0e4de59e. The changed launch test uses a fake process host and injected path translation; recovery tests use a recording client. The body explicitly marks packaged fresh/existing-install launch and readiness, full Windows build, Shared tests, and Tray tests blocked. The previous completed review assessed this same head, had no findings, and requested those outstanding checks. Source revision: 00ea6efe241abfd75598b9ad049058a3dd72f845e5ca4b3b8794071d5c798348. (tests/OpenClaw.Connection.Tests/LocalAiPortLifecycleTests.cs:346, 69a5e6d5f7a3)
  • Packaged proof boundary: The selected windows-clean-installer-upgrade pool covers exact signed artifacts for clean installation and previous-version upgrade. Pools require maintainer scheduling and capacity; adjacent hosted tests do not establish this packaged boundary. (docs/PROOF_POOLS.md:19, 69a5e6d5f7a3)

Likely related people:

  • Dallin Romney: Raw commit 65300da adds src/OpenClaw.Connection/LocalAi/LlamaServerRuntimeService.cs:32 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 65300da42b5a; files: src/OpenClaw.Connection/LocalAi/LlamaServerRuntimeService.cs)
  • karkarl: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Scott Hanselman: 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 packaged fresh and existing-install launch, model readiness, and recovery with redacted diagnostic evidence.
  • Publish results for the required Windows build, Shared tests, and Tray tests.

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 (3 earlier review cycles)
  • reviewed 2026-10-02T16:06:43.444Z sha e897693 :: blocked before merge. :: none
  • reviewed 2026-10-02T16:32:46.686Z sha de1053d :: blocked before merge. :: none
  • reviewed 2026-10-02T16:39:02.603Z sha 69a5e6d :: blocked before merge. :: none

@RomneyDa
RomneyDa force-pushed the openclaw/investigate-transient-llama-dll-installation-errors branch 4 times, most recently from 8ec1b90 to de1053d Compare October 2, 2026 16:34
Reuse the native child-process path resolver before checking the original endpoint during rollback. Preserve logical receipts and fail closed with the existing warning on IO or access errors. Cover physical identity, unhealthy endpoints, resolution failures, absent endpoints, and cancellation.

Co-authored-by: Copilot App <[email protected]>
@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 2, 2026
@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
@RomneyDa
RomneyDa merged commit f879af8 into main Oct 2, 2026
27 checks passed
@RomneyDa
RomneyDa deleted the openclaw/investigate-transient-llama-dll-installation-errors branch October 2, 2026 16:54
@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

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: 🐚 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.

2 participants