[Managed inference] Bind verified llama.cpp artifact into durable lifecycle
Summary
Begin delivery slice 6 from accepted epic #8144 by binding the exact verified llama.cpp GGUF from #8279 into the provider-neutral host-local lifecycle transaction.
This slice is declarative and dormant. It consumes the repository-owned YAML-compiled llama.cpp launch contract and the typed verified-local artifact, launches through a Docker-owned transaction, and persists only immutable serving authority. It does not activate managed llama.cpp onboarding or claim product support.
Dependencies
- #8279 and PR #8387 provide standard Hugging Face cache acquisition plus the verified-local GGUF artifact.
- PR #8418 is the clean publishable implementation for this issue and folds in only the minimum provider-neutral engine authority, receipt, and journal contracts required by the dormant Docker llama.cpp lifecycle.
- PRs #8058 and #8069 are not dependencies of this slice; their broader provider stack remains separate.
- Discussion #7636 and epic #8144 are accepted.
The implementation is reconstructed directly on current main and carries no unrelated provider-stack history.
Observable outcome
- A dormant Docker lifecycle adapter accepts only the YAML-compiled llama.cpp launch contract and typed verified-local artifact.
- The adapter revalidates the artifact filesystem identity immediately before the single provider-owned container launch.
- The bounded command comes from the existing llama.cpp materializer; there is no arbitrary command or shell surface.
- Durable authority records the provider, exact runtime, endpoint, image digest, serving plan or recipe digest, model digest and size, and GPU authority.
- Host cache paths, filesystem identity, Hugging Face credentials, API-key material, and GGUF bytes never enter the durable receipt or sandbox state.
- Restart and recovery re-resolve or reacquire through the existing shared Hugging Face mechanism and reverify the same declarative model identity.
- Destroy and uninstall remove only the exact owned runtime and never delete or copy the shared Hugging Face cache entry.
- Docker production registration, onboarding, route mutation, and support activation remain unchanged.
Acceptance criteria
- [ ]
llama-cppis represented as a managed host-local service without changing the existing Ollama, NIM, or vLLM receipt behavior. - [ ] The adapter rejects provider or engine authority drift before mutation.
- [ ] File replacement, same-path identity drift, digest mismatch, and size mismatch fail before container launch.
- [ ] Exactly one provider-owned launch capture consumes the allowlisted materialized argv.
- [ ] The persisted receipt round-trips canonically and contains no host path, filesystem identity, credential, token, or GGUF bytes.
- [ ] Restart and recovery tests prove fresh verified-artifact binding with no second model cache.
- [ ] Cleanup tests prove the shared Hugging Face cache file is retained.
- [ ] Existing Docker, vLLM, NIM, Ollama, generic endpoint, and dormant qualification behavior is unchanged.
- [ ] Focused tests, typecheck, security review, documentation-writer review, and required exact-head CI pass.
Non-goals
- No custom downloader, private model cache, duplicated GGUF, arbitrary URL, runtime model download, or egress.
- No onboarding menu, environment-variable selection, provider registration, route mutation, status UI, or support claim.
- No Podman activation; Docker is the first managed llama.cpp runtime.
- No full restart, rebuild, restore, clone, or uninstall product wiring beyond the dormant reusable transaction contract in this slice.
Part of #8144 and completes the remaining lifecycle handoff in #8279.
Implementation status (2026-08-05):
- The dormant Docker llama.cpp durable lifecycle slice is complete in the integration worktree as local commit 7ef5cf59b.
- Independent security review: PASS, with no blocking findings.
- Documentation review: no-docs-needed because production Docker host-local inference remains unsupported and schema-v1 llama.cpp receipts remain rejected by production persistence.
- Local validation: 154 related regression tests pass; source and CLI typechecks, repository architecture checks, Biome, diff checks, pre-commit hooks, and the source-shape security contract all pass.
- The implementation includes exact verified-GGUF binding, NVIDIA single-GPU authority, private API-key and cache identity revalidation, durable create journaling, process leases, uncertain-create fencing, crash recovery, exact rollback, and idempotent destroy without deleting the shared Hugging Face cache.
Publication is intentionally held until the required lifecycle predecessor #8069 lands. That PR is still stacked behind #8261, #8058, and #8061. I am not opening a misleading PR that would include the predecessor stack and main-integration history in this slice diff.
Activation warning: this slice remains dormant. Before a later PR registers Docker llama.cpp or persists its receipts, receipt persistence and journal finalization must become one crash-safe operation or gain complete boundary reconciliation.
The next bounded lifecycle sub-slice is #8414: make receipt publication and create-journal finalization crash-recoverable through a durable receipt-publication phase plus exact idempotent replay. It remains dormant and does not broaden #8395 into onboarding or production registration.