Skip to main content

Module apply

Module apply 

Source
Expand description

The apply: a stored plan executed exactly, or refused because its inputs moved.

An apply that recomputed intent from the tree could act on something the operator never saw. So it reads the plan that was reviewed, asks one question first, is the world still the one the plan described, and refuses naming what moved when it is not. Readiness is enforced with no override: a gap is honest and is not permission. Every local operation is staged through the transaction in crate::atomic and renamed in order, with the record last, and the run lands in the journal rk runs reads.

Structs§

Applied
The machine form of an apply.
OperationResult
One operation and what happened to it.
PostconditionResult
One postcondition and what it found.

Constants§

APPLY_SCHEMA
The version of the apply report’s shape.

Functions§

gate
Refuse anything but a ready plan.
gate_fresh
Refuse where the world the apply runs against is no longer ready, even though the approved plan was.
postconditions
Run every postcondition the plan carries and report each outcome.
revalidate
Refuse a stored plan whose semantic inputs no longer match a fresh computation over the same request.
run
Execute one gated, revalidated plan: stage every operation, commit the renames in order, run the postconditions, and journal the run.
run_locked
The apply whose caller already holds the target.
verify_before_digests
Refuse where a destination no longer holds the digest an operation’s before names, every mismatch collected in one pass.
verify_blobs
Refuse where a blob the plan names is missing from the store or no longer digests to the name it is filed under.
verify_record_last
Refuse a plan whose operations do not end with exactly one record write.