Skip to main content

Module fleet_composition

Module fleet_composition 

Source
Expand description

Setup-time Fleet composition: a suggestion schema with no runtime authority.

Deliberately not re-exported from the crate root. The setup wizard uses it by its explicit module path (codewhale_workflow::fleet_composition::…), keeping the advisory boundary visible instead of making the schema look like runtime Fleet authority. Setup-time Fleet composition: a suggestion schema, and nothing else.

The same Reasoning Router service an operator attaches to a Fleet may later assist Fleet setup, by proposing which configured provider/model should take which role. That is a fundamentally different act from what the runtime router does, and this module exists to keep the two from ever being confused:

Runtime routerSetup-time composition
Inputone frozen worker routean explicit, redacted model pool + role list
Outputa reasoning tiera suggested provider/model per role
Authorityapplies immediatelynone — a human must review and save

Three properties make this safe to have in the tree at all:

  1. It is pure. No clock, no filesystem, no network, no config. It maps an input value to an output value.
  2. It cannot save or launch. There is no path from a crate::fleet_composition::FleetCompositionProposal to an crate::ExactFleet, a snapshot, or a spawn. Turning a proposal into a saved Fleet is a separate, explicit act that belongs to the saved-Fleet UI lane.
  3. It cannot invent a model. Every suggestion must name a model that is already in the operator’s explicitly configured pool; anything else is rejected, not silently substituted.

Every proposal is born crate::fleet_composition::RatificationState::Unratified and there is no method here that ratifies one. Ratification is a human act recorded elsewhere; this module can only ever describe a suggestion.

§The seam

Runtime must not call anything in this module, and nothing here reads a crate::FleetSnapshot or mutates a saved Fleet. The TUI setup wizard wires this on the UI side of the boundary: parse → propose → show the human → human saves a Fleet profile through the ordinary setup save path. This module remains unable to save, launch, or snapshot anything itself.

Structs§

CompositionRole
A role the operator wants filled.
ConfiguredModel
One entry in the operator’s explicitly configured model pool.
FleetCompositionProposal
A composition proposal: suggestions plus the fact that nobody has agreed.
FleetCompositionRequest
The complete, explicit input to a composition request.
RoleSuggestion
One suggested role → provider/model assignment.

Enums§

CompositionError
RatificationState
Whether a proposal has been reviewed and accepted by a human.

Constants§

COMPOSITION_ADVISORY
The advisory every proposal carries.