Repository navigation
feat(local-ai): safely use the standard Hugging Face hub cache - #1397
Conversation
Completes the connection/runtime layer of Pedro Larroy's #1288 (feat(local-ai): store downloaded models in the standard HF hub cache) while preserving schema-3 installs and passive manifest reads. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 3d314994-f5c9-4f11-8ce3-06e750fb27b3
Completes the setup, migration, rollback, uninstall, recovery, race, and cross-volume layer for Pedro Larroy's #1288 (feat(local-ai): store downloaded models in the standard HF hub cache). Co-authored-by: Copilot App <[email protected]> Copilot-Session: 3d314994-f5c9-4f11-8ce3-06e750fb27b3
Documents the compatibility and ownership contract completing Pedro Larroy's #1288 (feat(local-ai): store downloaded models in the standard HF hub cache). Co-authored-by: Copilot App <[email protected]> Copilot-Session: 3d314994-f5c9-4f11-8ce3-06e750fb27b3
|
🦞👀 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: blocked before merge. Reviewed September 10, 2026, 5:52 PM ET / 21:52 UTC (Revision 3). ClawSweeper reviewWhat this changesMoves Local AI model acquisition into the shared Hugging Face cache, explicitly migrates existing installations, and retains verified runtime file handles and recovery copies. Merge readiness⛔ Blocked before merge - 1 item remains Keep open for landing. Current main still lacks the rollout, the prior native-file identity finding is fixed, and the new evidence satisfies the previous review’s proof follow-ups. No additional blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherLocal AI setup obtains pinned model weights and records their installation receipt. The managed inference runtime consumes that receipt to verify the model, launch llama-server, and publish a healthy local endpoint. flowchart TD
A[Pinned model catalog] --> C[Model acquisition]
B[Existing installation] --> D[Explicit setup migration]
C --> E[Verified shared cache]
D --> E
E --> F[Receipt and recovery copy]
F --> G[Runtime verification and file lease]
G --> H[Native inference process]
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: Retain explicit cache adoption, handle-bound runtime verification, and the documented schema-4-aware rollback floor. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature rollout; current-main source confirms normal acquisition still uses the app-owned model directory. Is this the best way to solve the issue? Yes. The patch extends the merged cache and migration owners, preserves passive reads, and verifies shared content again before native consumption. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 621f4100f8b4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Resolve the verified Hugging Face cache entry to its physical path from the same open handle, keep that lease for the managed process lifetime, and use the resolved identity for the router preset and readiness probes. Clarify the schema-4-aware downgrade boundary and cover snapshot-link replacement after verification. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4f97b3a3-def7-4f33-b7d5-ece171b4fd0b
@clawsweeper re-review Current head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
@clawsweeper re-review Current head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Completes layer 3 of #1288 (feat(local-ai): store downloaded models in the standard HF hub cache) with the compatibility, migration, ownership, rollback, uninstall, recovery, and runtime verification contracts needed for existing installs.
This replacement preserves and credits Pedro Larroy (@larroy) as the author of the original #1288 direction and implementation. It builds on the already-merged cache primitives and migration work, while keeping schema-3 installs active and making schema 4 the explicit verified-cache rollout gate.
What changed
LocalAiManifestStore.LoadAsyncpassive. Migration occurs only during explicit setup reconciliation.LocalAItree.Required proof pools
none: this changes Local AI cache acquisition and receipt handling, but does not require a custom GPU, gateway, installer, ARM64, Smart App Control, or interactive WinUI host. Cross-volume, filesystem-identity, and lifecycle behavior are covered by current-head deterministic Windows tests, including explicit non-skipping tests on a distinct volume.Validation
Current head:
8b2d28d527dae1177eeee823a756127dcf7ea616.\build.ps1: passed, including documentation and proof-pool validation.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,991 passed, 32 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,897 passed, 0 skipped, 0 failed.dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore: 793 passed, 1 capacity-gated cross-volume test skipped, 0 failed.dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore: 1,152 passed, 1 capacity-gated cross-volume test skipped, 0 failed.OPENCLAW_TEST_HF_CACHE_ROOT=D:\openclaw-test-hf-cache: 1 passed, 0 skipped.3ce56b89:LocalAiManifestMigrationTests.Load_CopiesVerifiedLegacyWeightsAndRecordsTransitionalReceiptpassed 1, skipped 0, failed 0. The test asserts the schema-4 receipt loads with the legacyModelPathactive.GatewayConnectionManagerTests.AuthenticationFailed_DeviceTokenMismatch_SharedTokenFallback_RecoversWithSharedToken; the exact test passed 5/5 immediately afterward and the complete Connection suite passed on rerun.git diff --check: passed; worktree clean after the four-commit portable stack.Real behavior proof
OpenClaw.SharedandOpenClaw.Connectionassemblies, usedHuggingFaceHubCache.TryOpenVerifiedCacheEntryAsync, invoked the production runtime router-preset builder, replaced the snapshot link, and then used a realcmd.exechild to open the preset model path. Redacted output:ModelPathfrom its schema-4 receipt.Review
python .agents\skills\autoreview\scripts\autoreview --mode local --engine codex --model gpt-5.6-sol --thinking high.Supersedes #1288 (feat(local-ai): store downloaded models in the standard HF hub cache) after preserving Pedro Larroy's original contribution and closing its remaining compatibility and safety gaps.