Skip to main content

Module fleet

Module fleet 

Source
Expand description

Fleet: named collection of IacResource values with composite hashing. Fleet-level IR aggregation and hashing.

A Fleet is a named collection of IacResource values — an entire cluster’s worth of declarations in one value. Like individual resources, it emits a canonical sexpr, content-hashes over that emission, and round-trips losslessly through ToSExpr/FromSExpr.

§Why it matters

Individual resources attest themselves. A Fleet attests the whole set — sekiban can gate admission on fleet membership + hash match, so a single deploy carries a single verifiable identity for an entire environment. Drift at any resource changes the fleet hash; drift nowhere leaves it stable.

§Design

  • Storage: BTreeMap<String, IacResource> — deterministic order by member name, which is what canonical emission needs.
  • Sexpr form: (fleet (:name "…") (:members (list (member (:name "a") (:resource <r>)) …))).
  • Content hash: BLAKE3 over the canonical emission, same pattern as every other ToSExpr type.
  • member_hash(name) exposes the per-resource hash so callers can attest specific members without re-hashing the fleet.

Structs§

Fleet
A named collection of IacResource values with a stable canonical order (by member name).