01 · Profile
Compile intent into an execution envelope
Nodus does not take a machine order. The profiler compiles the
workload into a versioned execution envelope: footprint,
parallelism shape, deadline slack, residency, restartability. The
envelope carries a continuity mode that decides what recovery may
do later, and a confidence value routing scores rather than hides.
- In
- Workload revision and inputs
- Out
- Versioned
execution_envelope: resources, topology, locality, continuity mode, confidence
- Durable ack
- Envelope row and outbox committed in one transaction
02 · Routing
Score the path that finishes
The router is pure. It never calls a provider. It scores the
envelope against a freshness-bounded snapshot of normalized
offers and supplier health, maximizing the probability of
finishing on time and inside budget. Policy violations are
rejects, not soft penalties. Capacity the work does not need is a
routing failure even when it is available and cheap.
- In
- Envelope, offer and health snapshots, remaining budget and deadline
- Out
- Primary route, fallback graph,
bid_ceiling, and the score breakdown behind them
- Durable ack
- Decision and its explanation persisted in the same transaction
03 · Bidding + Lease
Turn the decision into a held lease
Quote, bid, lease. The ceiling is remaining budget minus
non-compute cost, recovery reserve, and fallback margin, so a
reservation can never spend the money the workload needs to
finish. The attempt is written with its idempotency key
before the supplier is called. Capacity counts as held
only once the lease ID and terms validate. A commitment layer,
not a trading product.
- In
- Route plan and its
bid_ceiling
- Out
lease.status=reserved with a validated supplier lease ID and accepted terms
- Durable ack
reservation_attempt row written before the provider call
04 · Execution + Checkpointing
Run it, and make progress portable
The controller reconciles desired against observed state, so
restarts and duplicate messages are safe. A provider reporting
“VM created” advances nothing: the run becomes
running only after the runner proves its identity and
emits a verified heartbeat. Checkpointing runs throughout the job,
never after it. Parts upload to object storage, every checksum is
verified, an immutable manifest is written, and a compare-and-set
advances the latest-manifest pointer. Local disk is not progress.
- In
- Start request for a generation under the reserved lease
- Out
- A running generation, plus verified manifests in provider-independent storage
- Durable ack
- Runner identity proof and heartbeat; commit verifies every SHA-256, then advances the pointer
05 · Recovery
Fence, re-route, resume at generation N+1
Reclaim, heartbeat loss, provisioning failure, and budget risk all
enter the same saga. The signed event is stored before anything
acts on it, and the old generation is fenced before anything
replaces it. At most one generation may write durable output, so a
partitioned instance cannot overwrite committed progress. The
workload re-enters routing against current offers and resumes as
generation N+1 from the latest verified manifest. A marginally
cheaper offer is not a reason to disturb a healthy run.
- In
- Signed reclaim or failure signal, persisted before it is acted on
- Out
- Generation N fenced; generation N+1 restored under a new lease, or an honest failed outcome carrying the reason
- Durable ack
- Fencing token in Postgres; the new generation is active only after a verified heartbeat