Protocol as Shared Contract
One shared protocol crate — drift between daemon and agent is a compile error.
Arbitrated, cost-aware build capacity — the compute behind tetra-build.
forge-fleet provisions and arbitrates a pool of cloud build nodes — the 'fleet compute provider of tetra-build.
The invariant set the control plane rests on.
One shared protocol crate — drift between daemon and agent is a compile error.
Every NATS subject prefix lives in one file — re-namespacing is a one-file change.
Control plane owns decisions; the agent owns execution and reports.
Arbitration is a pure function — property-testable offline, deterministic.
Each pool runs an explicit, self-describing, cost-modeled Strategy.
Four crates; daemon, agent and sim all depend on the shared protocol crate, nothing back.
| Crate | Kind | Responsibility | Depends on |
|---|---|---|---|
| fleet-protocol | lib | Shared wire-types, KV schemas, subject builders, pure cost math. No I/O. | — |
| fleet-daemon | lib + bin | Control plane: arbitration, lifecycle strategy, KV state, TLS coherence, WS channel, HTTP. | fleet-protocol |
| fleet-agent | lib + bin | Node-side executor: WS channel to the daemon, runs commands, emits events, heartbeats. | fleet-protocol |
| fleet-sim | lib + bin | Offline cost simulator — ranks each strategy against a forecast. | fleet-protocol |
The daemon drives one Strategy per pool; fleet-sim ranks them against a forecast.
Boot fresh from a provider image — cheapest idle, longest boot.
Boot from a pre-baked snapshot — same DAG, 5–7× faster boot.
One long-lived node, resized peak↔baseline — zero boot latency.
N stopped nodes powered on per job — providers with free stop/start.
Spot nodes per claim, retry on interruption — cheapest rate, interruption risk.
AlwaysOnResize primary + ColdSnapshot overflow — low-latency baseline plus burst.
A Spiral tension is a polarity to navigate, not a problem to solve.
Both binaries are TOML-config driven; the simulator is offline.
# Build the whole workspace cargo build --workspace # Control plane — arbitrates claims, drives pool lifecycle FLEET_DAEMON_CONFIG=./daemon.toml cargo run -p fleet-daemon # Node-side agent — one per build node, dials the daemon channel FLEET_AGENT_CONFIG=./agent.toml cargo run -p fleet-agent # Offline cost simulation — rank strategies against a forecast cargo run -p fleet-sim -- --config sim-input.json --out result.json
# The claim plane — every subject under the fleet.libre-forge. prefix claim.request fleet.libre-forge.claim.request.<workspace>.<id> claim.granted fleet.libre-forge.claim.granted.<workspace>.<id> claim.released fleet.libre-forge.claim.released.<workspace>.<id> # lian-build's 'fleet adapter is the primary caller — it publishes a # claim, receives an endpoint + per-claim age-encrypted mTLS, builds, # and releases. forge-fleet never sees the build itself.
forge-fleet is one of four projects in tetra-build — it owns where builds run.
forge-fleet's primary caller — lian-build's 'fleet adapter claims a node, builds, releases.
The build-time catalog — its layer builds run on forge-fleet nodes via lian-build's 'fleet adapter.
The runtime catalog — its from-source images compile on the same forge-fleet capacity.
More information →Sporadic updates about forge-fleet. Double opt-in, one-click unsubscribe.