Skip to content

feat: what taracode and the hardware board need from the engine (v0.2.0) - #1

Merged
dayanstef merged 15 commits into
mainfrom
feat/v0.2.0-hardening
Oct 12, 2026
Merged

dayanstef merged 15 commits into
mainfrom
feat/v0.2.0-hardening

Conversation

@dayanstef

@dayanstef dayanstef commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

What taracode 3.3.0 and the RTX 5090 hardware board need from the engine, as v0.2.0.

  • Figures for every load, whoever started it. A model's memory figure and properties are recorded on every
    path: a load records them, and a read of the model list records what a running model lacks, such as a model a
    /v1 request brought up on its own. A read never waits behind a load (it only tries the operations lock), the
    recording has a 10 s deadline of its own, and the answer comes from a second look at the router. Properties are
    read with autoload=false, so a read never makes llama-server load a model. A run whose memory cannot be measured
    (no process to measure, or a probe that sees none) is not probed again until the model stops.
  • Sleeping and loading models. POST /api/load answers at once for a model that sleeps at the requested window
    (its next request wakes it), and waits for a model that is still loading instead of refusing the load.
    GET /api/loaded gains a status field, loaded or sleeping; taraengine ps shows it in a STATUS column, and
    taraengine load and taraengine doctor say when a model sleeps.
  • Imports get their native window. A new standard-library package, internal/gguf, reads the architecture and
    the native context length from a GGUF header: little-endian versions 2 and 3, at most 16 MiB consumed, every
    length and count checked before anything is read or skipped. An import takes its window from its file when it is
    pulled, imports pulled by 0.1.0 get theirs when the daemon starts, and an import's default window is never larger
    than its native one.
  • Imports keep their capabilities across unloads and restarts: every properties read of an import saves its
    capabilities in index.json, and the catalog shows them while the model does not run.
  • pkg/client: Error.NotJSON marks a refusal whose body is not the engine's error JSON; such a body becomes
    one line of at most 300 bytes.
  • The log tail that GET /api/models/{name} carries keeps line breaks and tabs and drops every other control
    character.

Compatibility

  • pkg/api: one added field, Loaded.Status (omitempty). pkg/client: one added field at the end of Error.
    Older clients ignore both, and newer clients read zero values from 0.1.0.
  • index.json gains native_context and capabilities, both omitempty; 0.1.0 reads it without error.
  • taracode 3.3.0 (feat: taraengine as taracode's native backend taracode#27) builds and passes its tests against this branch.

Verification

  • go test -race ./...: every package passes. The coverage gate holds every gated package at 100%, and
    internal/gguf and internal/backend join it.
  • gofmt, go vet -tags integration ./..., golangci-lint v2.14.0, scripts/hygiene.sh and govulncheck are clean.
  • The suite passes on Linux (golang:1.27.2, linux/arm64).
  • The integration test passes against the pinned b11514 runtime on macOS, with two new scenarios: a chat through
    /v1 before any load, after which /api/loaded shows the model loaded with its memory; and stories260K imported
    by hf:// into a daemon whose default window is 4096, which loads at the 2048 its header gives.

Test plan

  • CI green on this PR, the Linux and macOS integration jobs included
  • On an NVIDIA host: a chat through /v1 without a load, then /api/loaded shows the model with its memory and
    status: loaded
  • A model left idle past sleep_idle_seconds shows sleeping; POST /api/load at its window answers at once,
    and the next request wakes it
  • GET /props?model=<id>&autoload=false on the router answers 400 for a model that does not run, and answers a
    sleeping one without waking it
  • A load of a model that is still loading waits for it; an unload of a loading model stops it; a context change
    on a loaded model reloads it at the new window
  • stories260K pulled as an hf:// import loads at 2048 on the NVIDIA host

@dayanstef dayanstef self-assigned this Oct 12, 2026
@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@dayanstef
dayanstef merged commit 5eb7442 into main Oct 12, 2026
10 checks passed
@dayanstef
dayanstef deleted the feat/v0.2.0-hardening branch October 12, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant