Skip to content

[Managed inference] Bind verified llama.cpp artifact into durable lifecycle #8395

Closed

Description

@ericksoa

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

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-cpp is 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.

Activity

  1. self-assigned this
    on Aug 5, 2026
  2. added
    area: inference
    area: local-models
    area: providers
    feature
    platform: dgx-spark
    on Aug 5, 2026
  3. ericksoa commented on Aug 5, 2026

    @ericksoa
    MemberAuthor

    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.

  4. ericksoa commented on Aug 6, 2026

    @ericksoa
    MemberAuthor

    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.

  5. added a commit that references this issue on Aug 6, 2026
    43be454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: inferencearea: local-modelsarea: providersfeatureplatform: dgx-spark

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions