Skip to content

feat: add managed local AI with llama-server - #1178

Merged
karkarl merged 27 commits into
openclaw:mainfrom
joelagnel:feature/local-ai-llama-server-code-only
Aug 21, 2026
Merged

feat: add managed local AI with llama-server#1178
karkarl merged 27 commits into
openclaw:mainfrom
joelagnel:feature/local-ai-llama-server-code-only

Conversation

@joelagnel

@joelagnel joelagnel commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where Windows users who wanted local inference had no guided,
hardware-aware setup path and could be left with stale runtime, model, process,
port, or gateway state after an interruption. Users whose machines were not
ready for Local AI also lacked a concise explanation of the missing dependency.

The setup flow now qualifies compatible NVIDIA hardware and inspects WSL before
mutation, offers Local AI only as an explicit opt-in, verifies the WSL platform
before large downloads, proves native inference, and then provisions the
app-owned WSL gateway.

Why This Change Was Made

Local AI qualification is based on runtime capability rather than a hard-coded
GPU SKU or CPU pairing. A trusted NVML probe records NVIDIA UUID, driver, CUDA,
total memory, and free memory facts; unambiguous DXGI association can add usable
shared memory. Automatic selection chooses the largest pinned model whose
weights, exact primary FP16 KV cache, and 8 GiB runtime workspace reserve fit
both total and currently free capacity.

After WSL platform readiness, the native llama.cpp runtime and GGUF model are
downloaded from pinned catalog entries, verified, installed under app-owned
paths, started, and checked for a real inference response and GPU placement
before app-owned gateway provisioning. The companion then resolves the single
setup-managed WSL distribution from registry state and owns its router/provider
lifecycle.

The implementation also adds exact-manifest reuse, strict partial GGUF resume,
catalog-owned orphan reconciliation, reparse-safe cleanup, fresh-process
uninstall, cancellation rollback, listener ownership checks, wildcard rejection,
and explicit 127.0.0.1 provider publication with drift-safe compensation.

Boundaries: this change qualifies NVIDIA devices exposed by NVML, not other GPU
vendors; recommends only fitting entries from the pinned model catalog; binds
the managed inference endpoint to local IPv4 loopback; and leaves Windows
session-container inference and additional model catalogs for later work. This
code-focused branch does not add documentation, screenshots, reports, or video.

User Impact

Users with a qualifying NVIDIA GPU can opt into Local AI during onboarding,
choose from models that fit their detected capacity, and see native inference
working before app-owned gateway provisioning. Setup can safely recover from an
interrupted download or install and can uninstall owned state from a fresh
process without removing user-modified configuration.

Users who cannot run Local AI see a small unavailable notice and can open See why
for hardware, driver, CUDA, WSL, and networking diagnostics. The tray exposes
Local AI status and lifecycle controls after setup.

Evidence

Current-head validation for 31dffdb0dbd9eebc8b98ce35cf13ab60762410a9:

  • ARM64 build: PASS across Shared, CLI, WinNode CLI, SetupEngine, and WinUI.
  • OpenClaw.Shared.Tests: 3,812 passed, 32 skipped, 0 failed; Shared source is unchanged by the final UI-copy fold.
  • OpenClaw.Tray.Tests: 2,703 passed, 0 failed on exact head.
  • OpenClaw.SetupEngine.Tests: 947 passed, 0 failed; SetupEngine source is unchanged by the final UI-copy fold.
  • OpenClaw.Connection.Tests: 680 passed, 0 failed; Connection source is unchanged by the final UI-copy fold.
  • Focused generic-GPU qualification: 21/21 passed.
  • Focused setup/Dallin integration groups: 332/332 passed.
  • GitHub setup-connect, network-recovery, and revocation-recovery E2Es: PASS on exact head in run 32468175380.
  • Exact-head onboarding and Local AI video: behavior proof.
  • Exact-head WSL install-failure recovery: compiled production-path proof.

The isolated Dev onboarding run completed in 143.9 seconds. It reused exact
hash-verified artifacts, generated 32 inference tokens, verified 34/34 GPU
layers and 20,816,330,752 bytes of GPU load growth, provisioned only
OpenClawGateway-Dev, and ended with the dashboard and Local AI both connected.
Stop, Start, and Restart returned the managed router to Running/Connected.

The 120.834-second H.264 video is 3270x2180 and has SHA-256
1CCD721CD55A4EDE13E37C4537C29FA4574B1093FA65CAC9C7D7327642D6265E.
No older-head runtime value or media is used as proof for this revision.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Validation

powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1
PASS: Shared, CLI, WinNode CLI, and SetupEngine; WinUI was initially locked by the running Dev app

dotnet build .\src\OpenClaw.Tray.WinUI\OpenClaw.Tray.WinUI.csproj -c Debug -r win-arm64 -p:DevBuild=true --no-restore
PASS: 0 errors; one generated XAML obsolete-Icon warning

dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore
PASS: 3,812 passed; 32 skipped; 0 failed (Shared tree identical to final head)

dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore
PASS: 2,703 passed; 0 failed on exact head

dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore
PASS: 947 passed; 0 failed (SetupEngine tree identical to final head)

dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore
PASS: 680 passed; 0 failed (Connection tree identical to final head)

GitHub exact-head integration validation:

  • setup-connect E2E: PASS
  • network-recovery E2E: PASS
  • revocation-recovery E2E: PASS
  • repo hygiene and Advanced setup gate: PASS

The local 17-case setup/connect attempt was interrupted by a host reboot before
TRX output. Its exact disposable distro/temp roots were removed and the three
pre-existing distros were verified intact. To avoid stressing the machine again,
the exact-head fresh integration flow was proven through the isolated Dev run
and GitHub's off-host E2E.

Repository check:

git diff --check
PASS: no whitespace errors

Real Behavior Proof

  • Environment tested: Windows ARM64 with NVIDIA driver 616.00 and CUDA UMD 13.4, using isolated Dev app data and only the app-owned OpenClawGateway-Dev distribution.
  • PR head or commit tested: 31dffdb0dbd9eebc8b98ce35cf13ab60762410a9.
  • Exact steps or command run: full maximized onboarding with Local AI enabled and Qwen3.5 9B selected; WSL and Windows health probes; provider/primary inspection; Local AI Stop, Start, and Restart; compiled production WSL failure-diagnostic invocation with exit code 5.
  • Evidence after fix: current-head video, WSL recovery output, and green setup-connect/recovery E2Es.
  • Observed result: WSL readiness preceded downloads; native inference/GPU proof preceded gateway provisioning; WSL reached the owned loopback endpoint; gateway pairing completed; lifecycle controls recovered to Running/Connected. The induced WSL install failure retained exit code 5, showed Store/winget/elevated-PowerShell recovery, and remained retryable.
  • Screenshot or artifact links verified? Yes.
  • Not verified or blocked: destructive interruption and fresh-process deletion of a completed multi-gigabyte Local AI tree were not repeated live; focused recovery, rollback, safe-path, and uninstall tests cover those boundaries.

Security Impact

  • New permissions or capabilities? Yes

  • Secrets or tokens handling changed? No

  • New or changed network calls? Yes

  • Command or tool execution surface changed? Yes

  • Data access scope changed? Yes

  • If any answer is Yes, explain the risk and mitigation:

    Setup can download pinned runtime/model artifacts, invoke the native inference
    process and scoped WSL commands, read NVIDIA telemetry, and write app-owned
    runtime, model, manifest, provider, and consented WSL configuration state.
    Downloads require expected size and digest verification before promotion.
    NVML loads only from trusted locations. Cleanup validates app-owned paths and
    rejects reparse traversal. The router rejects wildcard binds, validates
    listener ownership by PID and process start time, and publishes an explicit
    127.0.0.1 endpoint. Configuration rollback and uninstall preserve concurrent
    or user-drifted state.

Compatibility and Migration

  • Backward compatible? Yes

  • Config or environment changes? Yes

  • Migration needed? No

  • If yes, list the exact upgrade steps:

    No manual upgrade step is required. Legacy Local AI manifest/profile data is
    read compatibly. New installations create app-owned manifests and provider
    state. Mirrored WSL networking is changed only after explicit user consent,
    with byte-preserving restore and rollback behavior.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

These boxes should be completed only after the rewritten head is pushed, CI
finishes, and the current-head proof comment receives re-review.

@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. 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. labels Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 21, 2026, 6:12 AM ET / 10:12 UTC.

ClawSweeper review

What this changes

The branch adds opt-in, hardware-qualified Local AI onboarding that installs a verified llama-server and model, connects it to the managed WSL gateway, and exposes tray lifecycle controls.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open. This remains an unmerged, substantial Local AI feature with credible current-head proof; its rollout scope and long-term core ownership need explicit maintainer sponsorship before merge.

Priority: P2
Reviewed head: 31dffdb0dbd9eebc8b98ce35cf13ab60762410a9
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong current-head proof and focused recovery coverage support a technically credible feature, with scope and rollout remaining the main maintainer concern.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (recording): Exact-head video, compiled WSL recovery output, and exact-head setup/recovery E2E results directly demonstrate the main setup and lifecycle behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (recording): Exact-head video, compiled WSL recovery output, and exact-head setup/recovery E2E results directly demonstrate the main setup and lifecycle behavior.
Evidence reviewed 4 items Pipeline ordering: The current setup pipeline verifies WSL before runtime and model acquisition, then verifies WSL-to-router reachability before gateway provider configuration.
Runtime ownership boundary: Startup loads the gateway registry, creates a resolver-bound endpoint lifecycle, and starts the Local AI runtime without hardcoding a WSL distribution.
Current-head behavior proof: The PR body and linked comments identify exact-head video proof, WSL install-failure recovery output, and passing setup-connect, network-recovery, and revocation-recovery E2Es for 31dffdb.
Findings None None.
Security None None.

How this fits together

Windows onboarding checks hardware and WSL, then optionally provisions a local inference runtime before configuring the app-owned gateway to use it. The tray app later owns the runtime lifecycle and displays its connection state.

flowchart LR
  A[Windows hardware and WSL] --> B[Setup wizard]
  B --> C{Local AI opted in and qualified}
  C -->|Yes| D[Verified runtime and model]
  D --> E[Local llama-server]
  E --> F[Managed WSL gateway]
  F --> G[Tray status and controls]
  C -->|No| H[Normal gateway setup]
Loading

Decision needed

Question Recommendation
Should OpenClaw core ship and own this managed native Local AI lifecycle as one release feature, rather than stage it behind a narrower rollout? Sponsor the opt-in core feature: Accept the managed Local AI lifecycle as a core, disabled-by-default feature and merge after ordinary final check review.

Why: The patch establishes a large new core-owned artifact, process, WSL, and provider lifecycle. Tests and proof support the implementation, but core ownership and rollout scope are product decisions.

Before merge

  • Resolve merge risk (P1) - This 93-file branch combines onboarding, global WSL networking, persistent runtime state, native process lifecycle, and gateway provider routing, so maintainers must consciously accept that rollout scope.
  • Resolve merge risk (P1) - The supplied live proof covers the fresh happy path, lifecycle controls, and induced WSL installer failure; destructive interruption and completed-tree deletion remain covered by focused tests rather than a live run.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Feature footprint 93 files, +14,681 / -208 lines The breadth spans setup, connection, tray, localized UX, and tests, making explicit ownership review important.

Merge-risk options

Maintainer options:

  1. Sponsor the opt-in rollout (recommended)
    Accept the bounded compatibility, security-boundary, and availability risk of core-owned downloads, WSL configuration, and native process lifecycle.
  2. Stage the ownership transfer
    Pause this large branch and land narrower runtime, setup, and gateway seams with their own upgrade proof.

Technical review

Best possible solution:

Land only with explicit maintainer sponsorship for the opt-in NVIDIA-only Local AI surface, retaining disabled-by-default configuration, loopback-only routing, and the tested rollback and recovery boundaries.

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

Not applicable: this PR adds a new Local AI capability rather than repairing an established failing behavior.

Is this the best way to solve the issue?

Unclear: the implementation is coherent and proof-backed, but a maintainer must decide whether this large managed native-runtime surface belongs in core as one rollout.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Exact-head video, compiled WSL recovery output, and exact-head setup/recovery E2E results directly demonstrate the main setup and lifecycle behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): Exact-head video, compiled WSL recovery output, and exact-head setup/recovery E2E results directly demonstrate the main setup and lifecycle behavior.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a substantial optional setup feature with meaningful but bounded impact.
  • merge-risk: 🚨 compatibility: The PR changes onboarding defaults, gateway endpoint representation, persisted Local AI state, and WSL configuration behavior.
  • merge-risk: 🚨 security-boundary: The feature downloads and executes native artifacts, changes global WSL networking with consent, and publishes a provider route.
  • merge-risk: 🚨 availability: A managed local server, WSL shutdown, and gateway route lifecycle can affect local inference and gateway availability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. The capability-based, opt-in local inference flow offers a notably complete path from hardware qualification through verified local serving and gateway integration.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): Exact-head video, compiled WSL recovery output, and exact-head setup/recovery E2E results directly demonstrate the main setup and lifecycle behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. Exact-head video, compiled WSL recovery output, and exact-head setup/recovery E2E results directly demonstrate the main setup and lifecycle behavior.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. Exact-head video, compiled WSL recovery output, and exact-head setup/recovery E2E results directly demonstrate the main setup and lifecycle behavior.

Evidence

What I checked:

  • Pipeline ordering: The current setup pipeline verifies WSL before runtime and model acquisition, then verifies WSL-to-router reachability before gateway provider configuration. (src/OpenClaw.SetupEngine/SetupPipeline.cs:57, 31dffdb0dbd9)
  • Runtime ownership boundary: Startup loads the gateway registry, creates a resolver-bound endpoint lifecycle, and starts the Local AI runtime without hardcoding a WSL distribution. (src/OpenClaw.Tray.WinUI/App.xaml.cs:729, 31dffdb0dbd9)
  • Current-head behavior proof: The PR body and linked comments identify exact-head video proof, WSL install-failure recovery output, and passing setup-connect, network-recovery, and revocation-recovery E2Es for 31dffdb. (31dffdb0dbd9)
  • Current-head provenance: The checked-out head is the WSL recovery diagnostic commit; shallow/promisor history prevents a fuller local feature-history walk, but blame ties the reviewed current lines to this head boundary. (src/OpenClaw.SetupEngine/SetupPipeline.cs:57, 31dffdb0dbd9)

Likely related people:

  • RomneyDa: Git blame attributes the reviewed Local AI startup and pipeline lines to the current head, and the final commits address setup recovery and runtime behavior. (role: recent current-head contributor; confidence: medium; commits: 31dffdb0dbd9, 48a3b60cca2f, 28d0f3e4c221; files: src/OpenClaw.SetupEngine/SetupPipeline.cs, src/OpenClaw.Tray.WinUI/App.xaml.cs)
  • shanselman: Provided the substantive maintainer review that set the original Local AI safety, recovery, and proof bar. (role: reviewer; confidence: medium; files: src/OpenClaw.SetupEngine/default-config.json, src/OpenClaw.SetupEngine/WslGlobalConfigManager.cs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Obtain explicit maintainer sponsorship for the core-owned Local AI rollout.

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 (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-20T23:29:02.646Z sha c6c96f8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T23:32:51.126Z sha c6c96f8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T23:41:50.257Z sha c6c96f8 :: needs real behavior proof before merge. :: [P2] Validate runtime archive redirect targets
  • reviewed 2026-08-20T23:53:06.783Z sha c6c96f8 :: found issues before merge. :: [P2] Validate runtime archive redirect targets | [P2] Size qualification for the configured context cache
  • reviewed 2026-08-21T00:28:01.967Z sha 2bcf986 :: needs real behavior proof before merge. :: [P2] Validate runtime archive redirect targets | [P2] Include the configured context cache in GPU qualification
  • reviewed 2026-08-21T01:20:08.492Z sha 1458856 :: needs real behavior proof before merge. :: [P2] Validate runtime archive redirect targets | [P2] Include the configured KV cache in GPU qualification
  • reviewed 2026-08-21T01:42:38.477Z sha 1458856 :: needs real behavior proof before merge. :: [P2] Restrict runtime archive redirect targets | [P2] Include the configured KV cache in GPU qualification
  • reviewed 2026-08-21T09:35:34.679Z sha 31dffdb :: needs real behavior proof before merge. :: none

@jacobtomlinson jacobtomlinson added status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. and removed status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. labels Aug 19, 2026
@shanselman

Copy link
Copy Markdown
Collaborator

This is an impressive, thoughtfully structured feature, especially the immutable artifact pins, SHA-256 checks, path containment, redirect allowlist, process ownership, and rollback compare-and-swap behavior. I validated the exact head on Windows: the full build and Shared, Tray, and SetupEngine unit suites pass. I also verified the llama.cpp and Hugging Face revisions, filenames, sizes, and hashes against upstream.

It is not merge-ready yet. Two independent reviews agree on these blockers:

  1. Local AI defaults on. default-config.json sets LocalAi.Enabled=true, contradicting the stated opt-in contract. Bundled/headless setup can fail on unsupported hardware or missing mirrored-networking consent, and qualified UI setup starts selected before an explicit user choice.
  2. .wslconfig corruption. Inserting networkingMode=mirrored into an existing [wsl2] section corrupts a common file with no trailing newline. [wsl2]\nmemory=8GB becomes memory=8GBnetworkingMode=mirrored.
  3. Interrupted install and uninstall recovery. A partial runtime directory blocks every later setup attempt, and uninstall only removes artifacts created during the current run. The multi-GB managed install needs manifest/path-policy-gated reuse or cleanup.
  4. Port lifecycle. The ephemeral port is selected and released before downloads that can take hours, then persisted with no conflict repair. A later collision leaves the UI in a dead end while the Gateway still targets that listener. Port 80 also passes preflight but is rejected later by manifest validation.
  5. Red setup E2E. The branch changes the persisted URL from localhost to 127.0.0.1, but the setup-connect contract still expects localhost.

The proof gap is also material: this adds 9,089 changed production lines and 127 runtime types with zero new focused [Fact] or [Theory] tests for the downloader, extractor, WSL config writer, manifest validation, managed process host, router, NVML qualification, inference verification, rollback, or recovery. The PR body explicitly leaves download, inference, mirrored WSL, and recovery unverified.

Before merge, please fix the five blockers, add focused regression coverage, and provide redacted current-head proof of a verified download, first inference, WSL reachability, restart, rollback, and interrupted-install recovery. The direction is excellent. The remaining work is about making this large native execution surface supportable and safe to ship.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 20, 2026
@joelagnel
joelagnel force-pushed the feature/local-ai-llama-server-code-only branch from 6e8fd0b to 411493c Compare August 20, 2026 14:03
@joelagnel

Copy link
Copy Markdown
Contributor Author

Current-head E2E behavior proof is now recorded in the PR body for 411493c79848e6ff9db25f00ddd42a79ba6a6e1d.

  • Full ARM64 build passed all 5 projects; Shared 3,704/32 skipped, Tray 2,631, SetupEngine 925, and Connection 644 passed.
  • Setup/connect E2E passed 17/17.
  • A fresh isolated 36-step onboarding run completed in 144.7s: 32 generated tokens, 34/34 GPU layers with 20,816,330,752 bytes of load growth, then fresh WSL creation and verified WSL-to-llama-server reachability.
  • Gateway provider configuration, service start, operator/node pairing, and final gateway E2E verification all succeeded.
  • Companion Restart changed PID 39640 / port 61000 to PID 32384 / port 61038, then returned to Running and Connected.

The PR body also states the remaining proof boundary honestly: this run reused already hash-verified artifacts, and destructive interruption/rollback were covered by focused tests rather than repeated as live destructive demonstrations.

@joelagnel

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 20, 2026
@joelagnel

joelagnel commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Sanitized current-head onboarding and Local AI behavior proof for 411493c79848e6ff9db25f00ddd42a79ba6a6e1d.

The recording shows the full maximized setup flow, successful native inference before WSL provisioning, the connected dashboard, and a live Local AI restart returning to Running and Connected.
https://github.com/user-attachments/assets/33658ce4-89d2-4b8c-8322-b2c2d1e828cf

@jacobtomlinson
jacobtomlinson force-pushed the feature/local-ai-llama-server-code-only branch from 411493c to db8fd59 Compare August 20, 2026 14:30
@clawsweeper clawsweeper Bot added proof: 🎥 video Contributor real behavior proof includes video or recording evidence. merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Aug 20, 2026
@joelagnel
joelagnel force-pushed the feature/local-ai-llama-server-code-only branch from a102f79 to d241b7c Compare August 20, 2026 19:07
@clawsweeper clawsweeper Bot added feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Aug 20, 2026
Move physical-memory discovery into one shared implementation.
Give setup and inference code a consistent RAM capacity value.

Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
jacobtomlinson and others added 4 commits August 21, 2026 02:29
Accept full CUDA offload when either NVML memory movement or the parsed CUDA model buffer proves placement.
Reject startup when neither signal accounts for the selected model.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
The consent InfoBar content sat flush against the bottom edge of the
warning, leaving the message and checkbox visually cramped. Add the
same bottom content margin the sandbox InfoBar already uses.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8LRNTZ5fBgjGwmtBCrSp3
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Wait for the direct child process independently of redirected-pipe EOF, then bound the final output drain. Existing-distro inspection now fails closed when WSL times out or returns an unknown error.

Show progress during the Welcome-page inspection so a cold WSL service does not make setup look frozen.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
After an elevated WSL install fails, run a best-effort GitHub quota diagnostic and distinguish likely quota exhaustion from other download failures. Diagnostic timeouts never replace the original failure.

Offer Store, winget, and elevated PowerShell recovery routes, and allow the platform step to be retried.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
@joelagnel
joelagnel force-pushed the feature/local-ai-llama-server-code-only branch from 6f8dd82 to 31dffdb Compare August 21, 2026 09:29
@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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 21, 2026
@joelagnel

Copy link
Copy Markdown
Contributor Author

Current-head onboarding and Local AI behavior proof for 31dffdb0dbd9eebc8b98ce35cf13ab60762410a9.

Shows WSL readiness before downloads, successful setup to the connected dashboard, and Local AI Stop/Start/Restart returning to Running and Connected.

openclaw-onboarding-timelapse.mp4

@joelagnel

Copy link
Copy Markdown
Contributor Author

Exact-head WSL install-failure recovery proof for 31dffdb0dbd9eebc8b98ce35cf13ab60762410a9.

The compiled production SetupEngine diagnostic path was exercised with an induced installer exit code 5. It preserved the original failure, exposed all supported recovery routes, and confirmed the setup step remains retryable:

induced_installer_exit_code=5
retry_enabled=True
WSL platform install failed with exit code 5. The WSL download did not complete. A network, policy, or installer error may be blocking it.

Install WSL yourself, then run setup again:
  Microsoft Store: https://aka.ms/wslstorepage
  Or run: winget install --id 9P9TQF7MRM4R --source msstore
  Or, in elevated PowerShell: wsl --install --no-distribution
Reboot if Windows asks for one.

The exact-head fresh path is covered by the attached onboarding video and the green GitHub setup-connect E2E. The recovery proof was induced without uninstalling this machine's working WSL platform.

@joelagnel

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@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 status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 21, 2026
};
}

public async Task<LlamaServerRouterProbeResult> ProbeRouterAsync(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why name it "Router"? can we rename to ProbeManagedModelAsync?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline, will address in subsequent PR.

Uri endpoint,
string modelAlias,
CancellationToken cancellationToken = default)
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to add a comment explaning what the function does

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline, will address in subsequent PR.

@karkarl karkarl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally

@karkarl
karkarl merged commit ccd64bb into openclaw:main Aug 21, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. 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.

7 participants