fix: Local AI fails to start after first setup - #1208
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 22, 2026, 6:31 PM ET / 22:31 UTC. ClawSweeper reviewWhat this changesThe PR allows a fresh managed Local AI installation with no saved endpoint to quiesce an empty gateway route before its first llama-server launch, while preserving validation for existing routes. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer merge review. Current main still blocks the first Local AI launch before it can create its verified endpoint; this focused branch fixes that path without weakening existing-provider checks. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherTray startup creates the Local AI runtime, which first inspects and temporarily quiesces the app-owned WSL Gateway route before launching llama-server. Once the server proves its loopback endpoint, the runtime persists it and publishes the gateway provider. flowchart LR
A[Saved Local AI install] --> B[Tray runtime startup]
B --> C[Inspect app-owned gateway route]
C --> D{Provider exists?}
D -->|No| E[Launch managed llama server]
D -->|Exact managed route| F[Quiesce route]
F --> E
E --> G[Verify loopback endpoint]
G --> H[Publish gateway provider]
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the focused coordinator change after normal maintainer review, retaining the model qualification, fallback validation, and exact existing-provider match checks. Do we have a high-confidence way to reproduce the issue? Yes. Current main calls quiesce before launching llama-server, but unconditionally requires the endpoint that only becomes available after that launch; the PR also documents an exact-head native reproduction. Is this the best way to solve the issue? Yes. Conditioning endpoint construction on an existing provider is the narrowest fix because it preserves qualification and drift checks while unblocking the empty first-start state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ccd64bbb7d68. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Exact-head validation and redacted native behavior proof are now complete for Fresh qualified install persisted without an endpoint completes its first managed Local AI start, persists a loopback endpoint, launches the managed llama process, and exposes healthy installed-action state without an action error. Required validation:
Redacted live UI output: {
"route": "background-autostart",
"start": { "present": true, "enabled": false },
"stop": { "present": true, "enabled": true },
"restart": { "present": true, "enabled": true },
"openLogs": { "present": true, "enabled": true },
"openChat": { "present": true, "enabled": true },
"retrySetup": { "present": false },
"actionError": { "present": false },
"manifestEndpoint": "verified-loopback-present",
"managedLlamaProcess": "present-under-isolated-root",
"cleanup": {
"trayAbsent": true,
"llamaAbsent": true,
"trayRootsRemoved": true,
"gatewayDisposed": true,
"gatewayRootsRemoved": true,
"temporaryDistroRemoved": true
}
}Evidence SHA-256:
Only redacted state/provenance and hashes are included. Raw logs, private paths, credentials, tokens, endpoints, device/pairing IDs, and unrelated transcript content are excluded. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Related: #1178
What Problem This Solves
Fixes an issue where users who completed a fresh managed Local AI setup could not start the runtime from the Tray because the first quiesce required a verified endpoint that is only recorded after llama-server starts successfully.
Why This Change Was Made
A provider-absent first start may safely quiesce before an endpoint exists. Existing providers still require the verified endpoint and exact ownership match before any mutation. Catalog/alias qualification, primary ownership, and fallback validation remain fail-closed.
User Impact
Fresh managed Local AI installations can proceed to their first start instead of entering
Failedwith every runtime control disabled.Evidence
The verified Local AI endpoint is required, never launched llama-server, and disabled Start/Stop/Restart/Logs../build.ps1: passed.git diff --check: clean apart from line-ending notices.openclaw-autoreviewwithgpt-5.6-solhigh: clean, patch correct (0.97), no actionable correctness or security findings.Change Type
Scope
winnodeValidation
./build.ps1— PASSOpenClaw.Shared.Tests— PASS, 3,812 passed / 32 skipped / 0 failedOpenClaw.Tray.Tests— PASS, 2,709 passed / 0 skipped / 0 failedLocalAiGatewayProviderCoordinatorTests— PASS, 19/19LocalAiInstalledRuntimeAvailabilityProofTests.PriorQualifiedInstall_CurrentUnavailableHardware_KeepsHealthyInstalledActionsAvailable— PASS, 1/1 in 7m48sReal Behavior Proof
de890ce876b8476846cbea997c3cc0d3f43af830C14241FE7F8BEDABE8D5EE93977C83EC1596A6F97F8B9556443AB7514D780266background-autostart.b10488-cuda13-x64, modelqwen3.5-9b-mtp-q4-k-m, expected acquisition 6,406,621,974 bytes; all pinned asset hashes matched the qualified manifest.3310D8DBE6300E0399CE820A154F8CFAD5F8F1B0156F9801EF95BCFF3AB3CB69B756A11BF0185E9EBC47389424EC4DD4C1B3395090363EC7AC99EAB43330EEE631544D40D407F83EF352DBE8D4D2F5D65E3A671926BE859C3E1D32A474881921Yes/No/N/A): Yes, inspected locally; only the redacted state/provenance and their hashes are published here. Raw logs, private paths, endpoints, IDs, tokens, and credentials are excluded.LocalAiUnavailableInfoBarvisibility. That banner behavior belongs to the separate Preserve installed Local AI runtime controls #1206 UI lane and was diagnostic-only in this proof.Security Impact
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain the risk and mitigation: N/ACompatibility and Migration
Yes/No): YesYes/No): NoYes/No): NoReview Conversations