interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

branch main Branches Tags History

aien-sovereign-core-mv / docs / headstart / ROLLOUT.md

148 lines · 9663 bytes Raw Blame History Source

Headstart provisional preparation: rollout and rollback

Status: off everywhere. Issue: aien-spark/aien-sovereign-core#538 (M6). This page says how provisional preparation (Headstart M2 scheduler plus the M3 adapter, #537) is switched on and off, what fails closed, what a restart does, and what must be true before anyone activates it. Line references are to this repository at the commit that added this page.

1. Two switches, both off by default

  1. Cargo feature provisional-prep on aien-runtime (crates/aien-runtime/Cargo.toml, the [features] table: provisional-prep = ["dep:spark-harness", "dep:aien-proof"]). It is not in default, and no other crate in the workspace enables it. Without it the provisional module, AienRuntimeServer::with_prep_adapter and every fence branch in server.rs are not compiled (`#[cfg(feature = "provisional-prep")]`), and the control ABI is identical in both builds.
  2. Runtime flag ProvisionalConfig::enabled (crates/spark-harness/src/scheduler/mod.rs, `impl Default for ProvisionalConfig: enabled: false`). With the flag off, M2 dispatches a consumer only when every producer is final (committable with a verified M1 completion), which is plain sequential behavior.

Enable, in order: build with --features provisional-prep, construct the adapter with `PrepAdapter::open(ProvisionalConfig { enabled: true, .. }, store, journal, clock)`, and hand it to the daemon with AienRuntimeServer::with_prep_adapter. Disable in reverse: drop the adapter (no with_prep_adapter call, so nothing is fenced and every compose request runs the original call unchanged), then build without the feature.

The daemon installs no adapter today. No code outside tests calls with_prep_adapter, so even a feature-on build fences nothing and prepares nothing. Activation in production needs a separate, reviewed change.

Manual off switch. There is no environment variable or config file for this today. The off switch is the code path above: start the daemon without an adapter (the default), or with enabled: false. Both are deterministic startup defaults. A rebuild without the feature removes the code entirely.

2. Default-off proof

ClaimCheck
The default build links neither spark-harness nor aien-proofCI job "Headstart feature-on tests (provisional-prep)", step "Feature-off invariant": cargo tree -e normal -p aien-runtime must name neither crate (with the feature on, both appear: the negative control)
The default build's tests are unchangedthe required job "Workspace Verification & Invariant Audit" runs cargo test --workspace with default features
The flag defaults to off and is sequentialdisabled_flag_is_the_default_and_sequential (aien-runtime tests/provisional_prep_test.rs), disabled_is_the_default (spark-harness tests/provisional_scheduler.rs)
With the flag off nothing prepares on an interfaceheadstart_ab_smoke asserts preparations_provisional == 0 on every off arm

3. What may start early, and what still needs the final fence

Safe to start early (flag on, producer only interface-verified):

Needs the final fence (task Committable, every producer final-verified recursively through may_finalize, and the task's own M1 completion receipt verifying through verify_final):

The fence is a prerequisite only. Desk MAC, AEGIS verify, the replay ledger, the effect ledger and the World commit stay inside the unchanged calls and still decide.

4. Fail-closed states

State or errorCauseWhat happensWho clears it
SchedError::BindingsFulla task already holds MAX_APPROVAL_BINDINGS_PER_TASK (64, crates/spark-harness/src/scheduler/core.rs) approval keysthe new binding is refused; nothing is fenced or run for itthe caller (fewer keys, or a new generation)
DeliverError::DeferredFulla commit is running and DEFERRED_CAPACITY (64, crates/aien-runtime/src/provisional.rs) events already waitthe event is refused and nothing is queuedthe caller redelivers after the commit ends; queued events that stay refused hold a slot until PrepAdapter::discard_deferred
SchedError::CommitInProgressan event would change a task (or an ancestor) that is Committing, or a second commit in the same chainthrough deliver the event is queued and redelivered after the outcomeautomatic
CommitUncertainthe commit call panicked, or a restart found a Committing task with no recorded outcometerminal: never run again, consumers revoked, bindings dropped (later requests run as the original call and the durable ledgers decide)an operator: check the World and the approved replay ledger to learn whether the effect landed; M2 has no retry from this state (Retry needs Aborted)
FenceError::NotCommittable, NoCompletion, CompletionInvalid, StaleGeneration, AlreadySubmittedthe fence checks failedthe call does not runthe workflow (finish the task, or bind again at the new generation)

5. Restart semantics

6. Activation checklist (#538 task 5)

Every item must hold, with evidence linked from #538, before any production change installs an adapter. Today none of the timing items is met.

7. Measured, hypothesis, untested