Repository navigation
refactor(local-ai): clarify managed-model probe contract - #1210
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 24, 2026, 6:55 PM ET / 22:55 UTC. ClawSweeper reviewWhat this changesRenames the Local AI probe to describe managed-model verification and adds method-level documentation for bounded setup-time inference checks. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep this PR open, but do not merge it as-is: the clarity refactor removes a public source method and can break direct callers despite preserving runtime behavior. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherThe Local AI runtime starts a managed llama-server process, probes its endpoint, then publishes a provider when it is ready. A separate setup-time inference request triggers lazy model loading and verifies response evidence without returning content. flowchart LR
A[Managed model install] --> B[Local AI runtime]
B --> C[Managed-model probe]
C --> D[Readiness decision]
D --> E[Published local provider]
B --> F[Inference verification]
F --> D
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt the clearer managed-model name internally while retaining the old public method as an obsolete forwarding compatibility shim until an explicitly approved removal. Do we have a high-confidence way to reproduce the issue? Yes. Any direct consumer compiling a call to the current public Is this the best way to solve the issue? No. A naming-only cleanup should keep the old public entrypoint as an obsolete forwarder while internal callers use the clearer name. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ccd64bbb7d68. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Co-authored-by: Copilot App <[email protected]>
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(local-ai): clarify managed-model probe contract This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Closes #1198
Related: #1192
What Problem This Solves
The Local AI probe name implied that it checked only router health, even though the operation also verifies one configured model alias and expected managed path. The setup-time inference verification contract was also documented only at the class level, leaving callers and generated method documentation without the full boundary.
Why This Change Was Made
Rename the internal probe consistently to
ProbeManagedModelAsyncacross the client contract, runtime callers, and test fake. Preserve the existing publicProbeRouterAsyncsource contract as an obsolete forwarding wrapper. Add method-level XML summaries to both the inference interface and implementation that describe the bounded request, intentional lazy model load, response and token/timing verification, and content-handling boundary.This PR does not change readiness behavior. Issue #1192 remains the separate correction for the probe result predicate.
User Impact
There is no user-visible runtime behavior change. Developers get a more precise managed-model API name and method documentation, while existing direct callers of
ProbeRouterAsynccontinue to compile.Evidence
ProbeManagedModelAsync.ProbeRouterAsyncmethod remains available as an obsolete forwarding wrapper with the same parameters and return type.Change Type
Scope
winnodeValidation
Current head:
23387c4754d71d60cbdd536a22256db4563367d0.\build.ps1: passed, 5 of 5 repository build targets.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj: passed, 3,812 passed and 32 environment-gated skips.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj: passed, 2,703 passed.dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore: passed, 681 passed.dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --filter "FullyQualifiedName~LocalAi": passed, 21 passed.git diff --check: passed.python .agents\skills\autoreview\scripts\autoreview --mode branch --base origin/main --stream-engine-output: clean, no accepted or actionable findings; patch correct at 0.98 confidence.Real Behavior Proof
23387c4754d71d60cbdd536a22256db4563367d0.Func<Uri, string, string, CancellationToken, Task<LlamaServerRouterProbeResult>>signature, then ran the focused Local AI and full Connection suites.ProbeRouterAsync; the wrapper delegates directly toProbeManagedModelAsync; all managed runtime paths use the clearer internal contract.Yes/No/N/A): N/A.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): NoProbeRouterAsync; new code should useProbeManagedModelAsync.Review Conversations