inf3r — build plan
Status: v1.0-rc. This document gives the order of work. The forge holds the
work as milestones and issues. spec.md gives the rules. protocol.md gives
the wire.
1. The order
The engine is built before any inference engine is written. A conformance plugin gives every rule a test. No step below needs a GPU, a weight file, or a model.
| Milestone | Exit criterion | State |
|---|---|---|
| M0 wire | Two processes speak the protocol. The mock plugin passes the frame goldens. CI runs the shape check. | Done. inf3r-proto has a wire 2 suite; inf3r-mock-fault drives eleven failure modes. |
| M1 core | The core discovers the mock, admits jobs, reserves bytes, switches, evicts, and restarts it. Every core requirement has a test. | Done. Discovery, routing, admission, the ledger, the job table, the schedule, the conflict check, the memory check, idle unload, LRU eviction, and the switch are done. The host KV cache (D22–D26) is in state/cache, Wire 2, and the bind path. |
| M2 web | The HTTP API, all 22 routes, SSE byte-exactness, and the refusal table work against the mock. | Done. inf3r-web starts the host; the conformance test asks all twelve capability routes. |
| M3 sdk | A Rust plugin built by inf3r new passes an empty golden set. The cli reports state. | Done. inf3r new writes a bundle, inf3r verify is the gate for any binding, and the Python fixture passes it with no SDK. |
| M6 bundles | Every pair is one directory with the five parts. CI refuses a directory that is not a bundle. An engine can be authored or bound, and the binder makes binding a manifest plus one line. | Done. Issues 71–78 and 105: the anatomy, the generator, the binder, CI, the target profile, the standalone workspace, and the safe window. |
| M4 real | Gated on operator authorisation. No weight file is loaded without it. A real (model, target) bundle passes the gate and produces bench numbers. The second-language plugin and the bench are not gated. | Done. The direct library, compatibility binder, and container gate were proven with operator-supplied weights and local engine sources. Measurements belong in the operator runbook, not here. |
| M5 ship | A release builds, installs, drains on SIGTERM, and reports its own health. | Done. The release script, the unit, install.sh, the SIGTERM drain, and the image are done. The final v1.0 proof is section 8. |
2. Why the mock comes first
The conformance plugin is a deliverable, not test scaffolding.
- It implements all twelve capabilities trivially and deterministically. Echo text. A 1×1 image. One second of silence. A fixed decision. A seeded clip.
- It can fail on purpose: reject, crash mid-job, stall without credit, send a bad frame, offer a version with no overlap.
- It has no dependencies, so
grantis empty and the model step is free.
Every requirement that does not name hardware becomes a test at M0 or M1. Only R6 (hardware mismatch), R11 (no CUDA in the core), and R14 (free bytes after unload) need a real device. A fake host backend covers R6 and R14 in CI.
3. Rules of the work
- One issue, one branch, one PR. CI gates the merge.
- A PR that changes a published shape must change the shape golden in the same
PR.
04_shape.shfails otherwise. - A protocol change needs a wire version increase. Nothing else does.
- A new number in the code must pass the test in
spec.mdsection 20.2: could the engine measure it instead? If yes, it is a bug. - A new capability does not touch
crates/run,crates/state, orcrates/edge/server. - Docs go in the wiki. The root has one
README.mdthat points at it. - No worker downloads, installs, or loads a weight file or a model runtime. Not from a registry, not from a URL, not from a local cache. A bundle that needs weights or a bound runtime waits for explicit authorisation from the operator, and the authorisation names the file.
4. Definition of done
A step is done when all of these are true:
- The behaviour is covered by a test that fails without the change.
- No bounded resource is held without a release path.
- No new constant exists without a stated resource in a comment.
- The error path has a code from the table in
protocol.mdsection 13. - The docs in the wiki agree with the code.
5. The documents
The documents that the code needs are written.
ops.mdgives the install layout, the signal order, the first run, and the container.ops/holds the files.spec/fixtures/holds the frontmatter goldens thatspec/schema.mdnames.core.mdgives the peer, the residency, the ledger, the job table, the scheduler, the pump, and the failure classes. Unload is process death (D13).
6. Decisions
Every decision is settled. spec.md section 26 holds D1 to D28. D12 makes the
pair the unit; D13 makes unload process death; D14 makes the bundle the
directory; D15 frees the engine inside it; D16 makes weights content; D17 makes
the target profile authority; D18 makes the capability page, not a Rust trait,
the contract; D19 makes every bundle its own workspace; D20 reads a weight
through a window instead of mapping it; D21 makes one deploy file one host. D22 to D26 make the KV cache a core resource. D27 keeps the engine cache bridge optional and never faked. D28 makes Docker the only engine runtime.
7. Operator bundles
The repository is the host, not a model catalogue. An operator creates a bundle
under plugins/<model>/<target>/, owns its engine source or runtime, its
version pin, its image recipe, and its weights, and binds it in a deploy file.
The gate and the bench are the acceptance path. The in-repo fixtures prove that
path without a weight file; real model measurements belong in the operator
runbook for the host that ran them.
A bundle's image is self-contained: the host stages the directory and runs the bundle's own Dockerfile. There is no shared engine base and no central registry. Copying an engine into two bundles is intentional; each bundle may pin a different revision and specialize independently.
8. What is left
The capability work is complete. The remaining v1.0 step is the release proof:
full CI on the final main commit, a release build and install, and the tag. A
real model bundle is operator content and is not a release criterion. A new
bundle waits for its own weight authorisation under section 3 rule 7.