Skip to content

fix(local-ai): resolve physical CUDA and setup log paths - #1670

Merged
RomneyDa merged 2 commits into
mainfrom
openclaw/investigate-local-ai-setup-failure
Oct 7, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
openclaw/investigate-local-ai-setup-failure

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix the Get Started failure verify-local-ai-gpu-load: llama-server loaded CUDA from outside the managed runtime directory and the setup failure page's nonexistent log link.

  • CUDA module inspection returns physical paths. The installation receipt can retain a logical MSIX AppData alias. Resolve both existing files through handles before enforcing managed-runtime containment.
  • Replace LogFileLauncher's package-identity-based LocalCache path guess with resolution of the actual existing log file/directory. Package identity does not establish where a write landed.
  • Preserve prospective native Gateway state/config/workspace mapping in NativeGatewayDataPathMapper, independently of existing-log resolution. Cover missing targets and existing-profile mappings.
  • Move the existing native handle resolver from Local AI into OpenClaw.Shared.IO.WindowsExistingPathResolver, retaining the Local AI launch wrapper and its behavior. Receipt paths remain logical. External CUDA paths and resolution failures still fail closed.
  • Cover receipt aliases, external sibling directories, failed resolution, real Windows junctions, existing log paths, and missing logs.

At investigation start, checked main 5a8830e6 and Pedro's Local AI PRs; no matching fix was present. This PR is now merged at 3f91a30c801f8937a767f8198b320884d09c1933.

Required proof pools

  • windows-wsl-dgx-blackwell: Local AI GPU-load verification path changed.
  • windows-winui-interactive: setup failure log-link target changed.

Validation

  • Current-head local focused SetupEngine GPU verification and native setup/connection tests: 125 passed, 0 failed, 0 skipped.
  • Local focused Tray log/native path-mapper and resolver contract tests: 7 passed, 0 failed, 0 skipped.
  • git diff --check: passed.
  • Required native closeout passed in local Parallels Windows 11 ARM64, at exact merged commit 3f91a30c801f8937a767f8198b320884d09c1933:
    • ./build.ps1: passed (Shared, CLI, WinNode CLI, SetupEngine, WinUI ARM64).
    • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4,260 passed, 36 skipped, 0 failed.
    • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 3,996 passed, 0 skipped, 0 failed.
    • Test projects built first, with OPENCLAW_REPO_ROOT set. Skips are opt-in or unavailable native/GPU dependencies, not silently passed proofs.
    • Restored existing pre-openclaw-windows-app-e2e-2026-09-30 snapshot first. Initial build and Shared passed; Tray exposed absent system ARM64 VC++ DLLs (ONNX loader error 126). Installed Microsoft's ARM64 VC++ 14.51.36247.0 through official WinGet hash, Authenticode publisher, and restricted SYSTEM staging checks. The failing ONNX test passed, then all three required commands were rerun and passed. The successful rerun used the corrected guest, not a second clean-snapshot restore.
    • Full guest log: openclaw-windows-validation-20261007-014338.log; focused log: local-ai-1670-focused.log. Retained locally under the task proof directory.
  • Additional Parallels native focused proof at the same merged commit: 125 SetupEngine + 7 Tray + 1 real Windows junction test passed, 0 failed/skipped.
  • Earlier Azure Crabbox attempt was infrastructure-blocked, not a pass: lease cbx_aad66ed3ed29 (swift-hermit), missing .NET/Windows SDK/WebView2 and WinGet. Build run, prerequisite run. Lease released. Parallels supersedes that local closeout blocker.
  • PR-head native Windows GitHub CI is green: 19 successful checks, 5 skipped jobs. Includes CI Gate, core/CLI, Tray/setup/integration, UI/accessibility, setup/network/revocation E2Es, x64 publish, and ARM64/x64 MSIX packaging.
  • Rubber-duck / shared autoreview at P0-P3: production implementation accepted; one verified P2 in new test command quoting fixed using the repository's cmd.exe Arguments pattern. No additional review round claimed.

Real behavior proof

  • Regression coverage exercises physical/logical alias comparison without relaxing containment and ensures existing log targets exist.
  • Native Windows junction test resolves both an aliased directory and file through real OS handles. Passed in native Windows CI at initial head 550b31c4 (37 ms) and local Parallels at merged 3f91a30c (52 ms). PR-head CI and required native closeout are green.
  • ClawSweeper found the prospective-path caller regression at initial head. Fixed in 5ba6a33a by restoring its exact legacy mapping under the native setup owner; added missing state/config/workspace and existing-profile coverage plus a source boundary guard.
  • Not verified / blocked: packaged Get Started on the reporter's NVIDIA host and visible Explorer launch from the changed failure page. Parallels has no NVIDIA CUDA GPU; no after-change failure-page Explorer click proof was collected. Input screenshots establish the reported failure, not after-change proof.
  • No node/MCP command, gateway wire behavior, or telemetry changed.

@clawsweeper

clawsweeper Bot commented Oct 7, 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 7, 2026
@RomneyDa
RomneyDa marked this pull request as ready for review October 7, 2026 07:21
@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: 🦐 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 Oct 7, 2026
@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex review: needs changes before merge. Reviewed October 7, 2026, 3:37 AM ET / 07:37 UTC (Revision 2).

ClawSweeper review

What this changes

The PR compares physical CUDA runtime paths, resolves existing setup logs through Windows handles, and preserves separate mapping for native Gateway paths that do not yet exist.

Merge readiness

⛔ Needs changes before merge - 1 item remains

The fix remains useful, and the previous prospective-path regression is resolved. No blocking code defect was found, but the repository-required native validation remains explicitly blocked.

Priority: P2
Reviewed head: 5ba6a33a3ad30297307e82d7308736669c6c8eb1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused implementation resolves the prior finding and preserves containment; native closeout remains a validation requirement.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a MEMBER, so the external-contributor gate does not apply. The Windows handle resolver has initial-head native junction coverage; packaged CUDA verification and Explorer behavior remain explicitly blocked under repository proof policy. Prospective persisted paths retain the base mapping, with no stored-format change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a MEMBER, so the external-contributor gate does not apply. The Windows handle resolver has initial-head native junction coverage; packaged CUDA verification and Explorer behavior remain explicitly blocked under repository proof policy. Prospective persisted paths retain the base mapping, with no stored-format change.
Evidence reviewed 7 items Pinned introduced change: The complete introduced diff retains the existing handle resolver's implementation, adds physical-path comparison to GPU verification, and changes log resolution. The base still uses a lexical comparison against the logical receipt path, so the central fix is not already implemented there.
Previous finding resolved: ResolveDataPath now delegates to NativeGatewayDataPathMapper, whose mapping matches the removed base implementation independently of target existence. PrepareAsync constructs the environment before creating state/config and maps workspace prospectively. Added tests cover missing targets, existing paths, packaged paths, and unpackaged behavior, resolving the finding from #1670 (comment).
Containment and resolution failures: Both existing paths are resolved and normalized before strict descendant comparison. External sibling directories remain rejected, and resolution failures propagate into the existing verification failure path. Focused regression tests cover these cases.
Findings None None.
Security None None.

How this fits together

Local AI setup checks the CUDA library loaded by the managed inference process against its installed runtime. Setup diagnostics also translate Companion-visible log paths for Explorer, while native Gateway setup needs prospective paths before creating files.

flowchart TD
  A[Installation receipt] --> C[Resolve existing physical paths]
  B[Loaded CUDA library] --> C
  C --> D[Check runtime containment]
  D --> E[GPU verification result]
  F[Setup log path] --> C
  C --> G[Explorer log target]
  H[Prospective Gateway paths] --> I[Preserve package mapping]
Loading

Before merge

  • Complete next step (P2) - On a Windows host with the required prerequisites, run ./build.ps1 and the full Shared and Tray test commands required by AGENTS.md at the current head, confirm the junction regression executes, and report the results.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test LOC production +185/-148; tests +148/-0 Production changes extract the existing resolver and preserve prospective mapping; added tests cover alias containment and setup-path compatibility.

Technical review

Best possible solution:

Keep physical-path resolution shared while maintaining distinct owners for existing logs and prospective Gateway data paths.

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

Yes, source establishes the mismatch when a logical MSIX receipt path and physical process-module path name the same runtime. Packaged NVIDIA reproduction was not executed during this read-only review.

Is this the best way to solve the issue?

Yes, resolving existing objects before comparison is narrower than guessing redirected locations or weakening containment, and the separate mapper preserves prospective setup behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a MEMBER, so the external-contributor gate does not apply. The Windows handle resolver has initial-head native junction coverage; packaged CUDA verification and Explorer behavior remain explicitly blocked under repository proof policy. Prospective persisted paths retain the base mapping, with no stored-format change.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a focused repair to Local AI verification and setup diagnostics with no remaining demonstrated patch defect.
  • 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 author is a MEMBER, so the external-contributor gate does not apply. The Windows handle resolver has initial-head native junction coverage; packaged CUDA verification and Explorer behavior remain explicitly blocked under repository proof policy. Prospective persisted paths retain the base mapping, with no stored-format change.

Evidence

What I checked:

  • Pinned introduced change: The complete introduced diff retains the existing handle resolver's implementation, adds physical-path comparison to GPU verification, and changes log resolution. The base still uses a lexical comparison against the logical receipt path, so the central fix is not already implemented there. (src/OpenClaw.SetupEngine/LocalAiGpuVerification.cs:357, 5ba6a33a3ad3)
  • Previous finding resolved: ResolveDataPath now delegates to NativeGatewayDataPathMapper, whose mapping matches the removed base implementation independently of target existence. PrepareAsync constructs the environment before creating state/config and maps workspace prospectively. Added tests cover missing targets, existing paths, packaged paths, and unpackaged behavior, resolving the finding from fix(local-ai): resolve physical CUDA and setup log paths #1670 (comment). (src/OpenClaw.SetupEngine.UI/NativeGatewayPackageResolver.cs:110, 5ba6a33a3ad3)
  • Containment and resolution failures: Both existing paths are resolved and normalized before strict descendant comparison. External sibling directories remain rejected, and resolution failures propagate into the existing verification failure path. Focused regression tests cover these cases. (src/OpenClaw.SetupEngine/LocalAiGpuVerification.cs:362, 5ba6a33a3ad3)
  • Validation and proof disclosure: The captured PR body reports 125 focused SetupEngine tests and 7 focused Tray tests passing. Required native build stopped on missing .NET/Windows SDK prerequisites; prerequisite installation also failed, and full Shared/Tray closeout was not reached. The real Windows junction test passed at the initial head, while packaged NVIDIA setup and visible Explorer launch remain explicitly unverified. Captured source identity: 46431b56d1cf963732b3eeba0e728187ab1c11bfc4c2214de9e4d49cfc3be6e6. (5ba6a33a3ad3)
  • Current native CI: Current-head CI reports Core and CLI tests successful, with Tray/setup/integration tests and MSIX builds still running. These observations do not replace the separately declared blocked local closeout. (5ba6a33a3ad3)
  • Merged adjacent work: fix(local-ai): launch with physical MSIX paths #1610 (fix(local-ai): launch with physical MSIX paths) merged on October 2 and added physical-path resolution for process launch. It provides adjacent ownership context but does not implement the GPU verification and log changes requested here. (src/OpenClaw.Connection/LocalAi/LocalAiChildProcessPathResolver.cs, f879af8a5661)

Likely related people:

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

  • Report successful current-head native build and full Shared/Tray validation, including execution of the Windows junction regression.

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 (1 earlier review cycle)
  • reviewed 2026-10-07T07:25:24.732Z sha 550b31c :: blocked before merge. :: [P1] Preserve physical mapping for native setup paths that do not exist

@RomneyDa RomneyDa removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 7, 2026
@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 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. labels Oct 7, 2026
@RomneyDa
RomneyDa merged commit 3f91a30 into main Oct 7, 2026
32 checks passed
@RomneyDa
RomneyDa deleted the openclaw/investigate-local-ai-setup-failure branch October 7, 2026 07:51
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. 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