Repository navigation
fix(setup): Local AI load failures show no llama-server cause during onboarding - #1759
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesShow bounded llama-server failure diagnostics and a logs-folder link when managed Local AI fails during onboarding. Example: Nemotron Bolt fails because tensor 'lilicorr.feature_mlp.0.weight' is missing.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open for landing: this maintainer-authored PR addresses a diagnostic gap still present on main, with no actionable correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherAiSetupPage handles provider selection and verification; managed Local AI failures now read the existing sanitized log-tail owner and render diagnostic text plus an app-controlled Explorer link. flowchart TD
A[Managed Local AI selection] --> B[AiSetupPage verification]
B --> C[Startup or verification failure]
C --> D[LocalAiLogTail]
E[Managed llama-server logs] --> D
D --> F[Bounded diagnostic panel]
F --> G[Open logs in Explorer]
Technical reviewBest possible solution: Land the focused diagnostic change while preserving existing runtime, verification, privacy and recovery owners. Do we have a high-confidence way to reproduce the issue? Pinned main lacks the onboarding log panel, and its last-four extraction can discard the supplied repeated-load fixture's tensor cause; contributor screenshots demonstrate that failure using a deliberately restored older runtime. Is this the best way to solve the issue? The change reuses the established log reader and Explorer launcher, fixes prioritization in the shared extractor, and limits display to explicitly managed Local AI failures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 18f33cee71aa. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 20, 2026, 12:34 AM ET / 04:34 UTC (Revision 3). |
e1d7961 to
99ae0cc
Compare
|
@clawsweeper rereview |
|
🦞👀 Re-review progress:
|
…onboarding Show the salient llama-server log lines and an Open Local AI logs link under the AI setup error bar when a managed Local AI model fails verification or start.
b26f4f3 to
858d39b
Compare
With real Nemotron Bolt logs the 4-line panel showed only draft-load and router exit lines: stdout is read before stderr, so the router's stderr consequences always sort last, and each retry's [pid] prefix made the same failure distinct. Cause lines (CUDA error, allocation, model-load errors) now take precedence, consequences fill the remaining slots newest first, and lines differing only by the [pid] prefix collapse to their newest occurrence.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…y actions (#1787) When the native Gateway fails to start during onboarding, including a start timeout, the setup page now shows the failure details and recovery actions: view the setup log or collect diagnostics, with clear guidance text. The setup logger keeps sanitized entries if its file sink fails, a retry keeps the original expiry, and the nine new strings are translated in every locale. Maintainer validation: an integrated candidate of main ae56aa5 plus this head built cleanly and passed the Tray, Connection and SetupEngine suites. Shared passed except one GPU hardware probe test, which also fails on exact main on this host. One shared autoreview pass was scoped-clean, and the merge onto main after #1759 was conflict-free with resw key parity checked. ARM64 and visible proof remain the author's screenshots. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
What Problem This Solves
Fixes: when a Local AI model fails to load in llama.cpp during "Connect your AI" onboarding, the page only says "The provider could not activate this model. Refresh to choose again." and gives no cause or way to find the llama-server logs.
User Impact
User impact: a failed Local AI verification or start now shows the relevant llama-server error lines under the error bar, plus an "Open Local AI logs" link that opens
%LOCALAPPDATA%\OpenClawTray\LocalAI\logsin Explorer.Why This Change Was Made
llama-server writes the load-failure cause only to its own stdout/stderr logs; the Gateway's verification error doesn't carry it.
AiSetupPagenow reuses the existing setup-engine path (LocalAiLogTail.ReadDiagnosticLinesAsync+LogFileLauncher, asCompletePage.ShowServerDiagnosticsdoes):LocalAiStartFailedException. Cloud and configured-model failures are unchanged.llama-server:.LocalAiLogTail.ExtractDiagnosticLinesnow puts cause lines first (CUDA error, allocation failure, model-load error). Consequence lines ("failed to load" echoes, instance exit status) fill the remaining slots, newest first. Lines that differ only by the router's[pid]instance prefix collapse to their newest occurrence. Before this, with the real Bolt logs, the last-4 window showed only draft-load and router lines: stdout is read before stderr, so the router's stderr lines always sort last, and every retry looked distinct. The cause (tensor 'lilicorr.feature_mlp.0.weight' not found) never appeared. The same helper feedsVerifyLocalAiInferenceStep's failure detail and its setup-log echo, so those now lead with the cause too.ShowLocalAiStartFailure.Onboarding_AiSetup_OpenLocalAiLogsin all six locales.Known limits: if the real failure line doesn't match the existing filter, only the link is shown. Like
CompletePage, the log tail can include lines from an earlier failed load in the same rotating log. Lines are still capped at 200 characters, so long model paths are cut before the file name.Evidence
New regression tests:
OnboardingAiPageTests(syntheticllama-server.stderr.log):LocalAi_VerificationFailureShowsLlamaServerDiagnosticsAndLogsLink,LocalAi_StartFailureShowsLlamaServerDiagnosticsAndLogsLink,ConfiguredModelVerificationFailure_DoesNotShowLocalAiDiagnostics.LocalAiLogTailTests.ExtractDiagnosticLines_KeepsCauseAheadOfLaterConsequencesAndCollapsesRetries, using a fixture abridged from the real Bolt logs.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: new onboarding error panel and Explorer link need current-head visual proof.windows-11-arm64: the motivating failure is Nemotron Bolt, which runs only on the ARM64 runtime.Validation
Head
96d89c56(rebased ontomain18f33cee), Windows 11 ARM64:./build.ps1: all builds succeeded.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj: Passed 4431, Failed 0, Skipped 34.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj: Passed 4239, Failed 0.dotnet test ./tests/OpenClaw.SetupEngine.Tests/OpenClaw.SetupEngine.Tests.csproj: Passed 2381, Failed 0, Skipped 1.dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 --filter "FullyQualifiedName~OnboardingAiPageTests&Category!=NativeOnboardingProof": Passed 80, Failed 0.NativeOnboardingProofwas excluded because this host has no reviewed source/build freeze.Base-fail / head-pass for the new tests:
OnboardingAiPageTests(head test file againstd73bde25src/)LocalAiFailurePanelnot found (structural for the negative test)99ae0cc3,b26f4f38, and96d89c56ExtractDiagnosticLines_KeepsCauseAheadOfLaterConsequencesAndCollapsesRetries(against99ae0cc3LocalAiLogTail.cs)common_speculative_init_result: failed to load draft model, cause missingOne existing source-text assertion in
LocalAiOnboardingOwnershipTestsnow checks for theShowLocalAiStartFailurehelper instead of the old inlineErrorBarliteral.Real Behavior Proof
run-app-local.ps1 -DataDir <temp> -UseStoreGateway) with freshOPENCLAW_TRAY_DATA_DIR,OPENCLAW_TRAY_APPDATA_DIR, andOPENCLAW_TRAY_LOCALAPPDATA_DIRroots, andOPENCLAW_FORCE_ONBOARDING=1. Real installed Store GatewayOpenClawFoundation.OpenClawGateway2026.10.400.0 (ARM64). The real profile and real Local AI state were not used.99ae0cc3(before the cause fix) and99ae0cc3+b26f4f38(after).b26f4f38is the same patch as head commit96d89c56, before the rebase onto18f33cee. Both runs had one local, uncommitted proof-only change:LlamaRuntimeCatalog.NemotronBolt.csrestored fromc2ce4f5~1, i.e. the pre-fix(inference): Nemotron Bolt downloads fail with 401 from prerelease repos #1751b3e4f6cBolt runtime with today's public model pins. That is the combination behind the original Nemotron Bolt failure. A full revert ofc2ce4f5stops earlier, with an HF 401 at model acquisition.b3e4f6cruntime was downloaded. The app was driven through UI Automation and the app window captured withPrintWindow.<isolated LOCALAPPDATA>\OpenClawTray\LocalAI\logs, checked through Shell window enumeration.Before the cause fix (
99ae0cc3): the cause line is missing.After the cause fix (
b26f4f38): the first line isllama_model_load: error loading model: check_tensor_dims: tensor 'lilicorr.feature_mlp.0.weight' not found. This run re-entered through Recover and Refresh, so the error bar shows the Gateway's follow-up error ("Nothing is listening at ..."). The panel reads the same instance[64191]failure from the log.NativeOnboardingProofcompositor captures (no reviewed source/build freeze on this host). The rebased head96d89c56was not re-run in the app; it was covered by the build and test suites above. No head was run without the proof-only runtime revert, because with the b11700 runtime this failure does not occur.Security Impact
Yes, explain the risk and mitigation: the page now reads the app's own llama-server logs. Reads are bounded to the last 256 KB per log, at most 4 lines of 200 chars, and lines go through the existing token sanitizer. Request/response log lines are excluded, so no prompts are shown.Compatibility and Migration
Review Conversations