Forma Orchestrator: API and outcomes
The formasl_orchestrator library surface is small because it is mostly seams: a
coordinator that owns a cycle, a designation structure that carries owner-provisioned
material, typed outcomes for every refusal path, and an executor/transport pair for
the far side of the wire. This chapter is the integration reference: what an embedder
must supply, what they get back, and what the surface will never do.
The coordinator
OrchestratorCoordinator is the mechanism. Two constructors, one per activation law:
activate_provision(designation, transport, clock, domain)— the first provisioning act: opens the designated state, mints the first fence generation, publishes the initial durable registration. Fails closed on an empty roster, an unusable root, an unclaimable fence, or a refused initial publication.activate_recover(designation, transport, clock, domain)— recovery: reopens the designated state (exact carrier identities restored, never minted), CAS-claims the current generation, hydrates checkpoint and uncertainty. Fails closed on a lost, corrupt or torn state, or a fence held by another writer.
Both refusals are the typed ActivationRefusal: ControlStateLost,
WriterExclusivityNotEstablished, InvalidDesignation, ControlStateCorrupt,
InitialPublicationRefused. Each is a distinct operational fact with a distinct
remedy; none is ever an empty operational state.
The cycle itself is run_cycle(desired, authorities, transport_exposures): desired is
the (artifact, revision, source) triplets; authorities are the exact-coordinate
dispatch authorities; the exposure counter is the same atomic the transport
increments. The result is a CycleReport — never a bare success flag.
The typed outcome vocabulary
Dispositions (per lane, in the report):
| Disposition | Contract |
|---|---|
DispatchedAndSettled { operation } | dispatched under exact coordinates; settled within the declared boundary |
DispatchedUncertain { operation } | exposure may have occurred; reconciliation-gated, never re-driven by any cycle |
PendingNoAuthority { action } | no owner authority for the exact coordinates; zero wire contact |
Coalesced { artifact, revision } | this revision already dispatched for this lane; convergence, not loss |
AdmissionBlocked { satisfied, unresolved, action } | HWR verdict refused the deployment; classes preserved, zero dispatch |
WindowLawResolutionOpen { action, operation } | the lane’s prior outcome is still uncertain; re-binding is forbidden |
EvaluationNotEstablished { detail } | the evaluation did not complete under its budget; never a trigger for effects |
The report carries the measured phases (t_eval, t_admission, t_persist,
t_loop), the governed budget, the admission verdict and per-partition verdicts with
their typed reason sets, and two fields that keep failure classes separate:
persistence_error (the durable publication was refused — the cycle’s results are
honest but the state is not current) and mechanism_refusal (a typed refusal to
judge, e.g. incoherent provisioned admission input). The exit contract of the CLI is
a direct mapping over these.
The remaining typed refusals follow the same one-class-one-law discipline:
RosterChangeRefusal (empty roster, duplicate node, refused publication — the change
rolls back), RolloutRefusal (non-Satisfied verdict with the class preserved,
refused admission input, refused publication — the chain stays untouched),
DistributedDeploymentRefusal (structural incoherence vs per-partition verdicts vs
publication — three different facts), ReconcileWithObservationRefusal
(EvidenceNotAdmitted, ConflictingObservationsPreserved, plane error), and
RetryDriveError (a stale or foreign §12e authorization is refused by C1, never
budget-augmented by the mechanism).
The reconciliation and census surface
An embedder driving the productive writers finds them as explicit methods, each
delegating to C1’s own law: reconcile and reconcile_with_observation (an
uncertain attempt resolves only through admitted C2 evidence — unadmitted evidence
is typed-refused, and a conflict-shadowed referent keeps both records and blocks the
dependent decision); cancel_superseded (staged pre-exposure operations whose action
the desired state no longer requests); replay_last_receipt and
present_duplicate_delivery (the §12a replay path — zero state change); drive_retry
(only under the owner’s §12e authorization); admit_late_receipt (FENCE-N2: the late
ack is adjudicated by exact restored coordinates, never by generation);
record_unauthorized_invocation (the honest N11 record); and the governed C2
acquisition delegations (open_acquisition_session, admit_observation_bridge,
record_observation_receipt, admit_observation_record). Read access mirrors the
boundaries: uncertain_operations, attempt_view, settled_attempt,
effective_standing, admitted_observations, composition_record, roster,
rollout_history, designation.
What an embedder must supply
The coordinator constructs nothing semantic: a sealed transport (the MRS backplane’s
request_once profile — the crate’s LoopbackRawClient is the single-host
reference primitive), a clock source with its time domain, the full
DeploymentDesignation (every field owner-provisioned, per
deployment and placement), and — per cycle — the
authorities and the desired artifacts. The executor side is one trait:
EffectHandler::perform(target, payload) -> Result<receipt bytes, failure>, served by
ExecutorEndpoint (contacts and last-payload evidence included) or by the orch_executor
process over the loopback server.
What the surface will never do
The API is a contract about absences as much as presences. No constructor mints an identity; no method converts an unresolved verdict into a satisfied one; no path re-drives an uncertain operation; no reconciliation accepts time or silence as evidence; no roster or rollout mutation survives a refused publication; no composition record substitutes for a partition’s own admission. An embedder who needs any of those behaviors needs a normative change, not a workaround — and the verification chapter shows exactly which negative witnesses hold each of these lines green.