Runtime Execution¶
This page describes the runtime surface that AKC exposes today: runtime bundles, routing, adapters, coordination, reconcile, and autopilot.
For exact flags, use akc runtime --help and akc runtime <subcommand> --help.
Runtime command tree¶
Current runtime subcommands:
startcoordination-planstopstatuseventsreconcilecheckpointreplayautopilot
What runtime operates on¶
The runtime surface consumes emitted runtime bundles and writes runtime state and evidence under the scoped outputs tree.
Relevant modules:
src/akc/cli/runtime.pysrc/akc/runtime/kernel.pysrc/akc/runtime/models.pysrc/akc/runtime/state_store.py
Start and inspect a runtime bundle¶
Two useful entry points:
akc runtime coordination-plan --bundle /path/to/runtime_bundle.json
akc runtime start --bundle /path/to/runtime_bundle.json
coordination-plan is the safe read-only way to inspect scheduling before starting a run.
Adapter model¶
Runtime behavior is built around adapters.
Primary adapter implementations:
src/akc/runtime/adapters/native.pysrc/akc/runtime/adapters/local_depth.pysrc/akc/runtime/adapters/base.pysrc/akc/runtime/adapters/registry.py
High-level behavior:
NativeRuntimeAdapteris the default adapterLocalDepthRuntimeAdapteradds runtime action routing and optional local-depth subprocess and HTTP executionHybridRuntimeAdapteris the supported extension point for custom primary adapters with capability-gated native fallback behavior
Helper constructors:
src/akc/runtime/init.py:create_native_runtimesrc/akc/runtime/init.py:create_local_depth_runtimesrc/akc/runtime/init.py:create_hybrid_runtime
Action routing¶
Runtime action routing lives in src/akc/runtime/action_routing.py.
Current route kinds:
delegate_adapternoopsubprocesshttp
Routing is policy-bounded and context-sensitive. The runtime bundle, node-level metadata, and runtime policy all affect what is allowed.
Coordination¶
Coordination support is implemented under:
src/akc/runtime/coordination/load.pysrc/akc/runtime/coordination/models.pysrc/akc/runtime/coordination/worker.pysrc/akc/runtime/coordination/audit.pysrc/akc/runtime/coordination/isolation.py
akc runtime coordination-plan uses the same coordination model the runtime kernel consumes.
Key properties:
- deterministic schedule layers
- explicit handling of coordination spec versions
- coordination audit records emitted alongside runtime evidence
- runtime policy context derived from coordination role/profile metadata
For the schema and normalization rules, see coordination-semantics.md.
Reconcile¶
Reconcile is the runtime surface that compares desired bundle state with observed state and records evidence.
Relevant modules:
src/akc/runtime/reconciler.pysrc/akc/runtime/providers/src/akc/runtime/observe_probes.pysrc/akc/runtime/resync_backoff.py
Typical uses:
- inspect convergence
- collect reconcile evidence
- drive progressive rollout logic
- feed autopilot and living-automation loops
Runtime validation¶
Post-runtime operational_spec can reference operator-side validators through validator_stub.
Current behavior:
- runtime executes validator bindings through
LocalDepthRuntimeAdapter - validator outputs are normalized into exported artifacts and runtime evidence
operational_validity_reportis computed from the merged exported evidence set- native adapter execution is blocked and exported as failure-shaped validator evidence instead of silently bypassing the gate
See validation.md for registry format and examples.
Runtime providers¶
Current provider code lives under src/akc/runtime/providers/.
Current provider-related modules include:
compose.pykubernetes.pyfactory.py_subprocess.py
These are the deployment-facing execution providers used by reconcile and related runtime flows.
Events, checkpoint, and replay¶
Runtime state and evidence are not treated as opaque internal state.
Important commands:
akc runtime eventsakc runtime checkpointakc runtime replay
Important modules:
src/akc/runtime/events.pysrc/akc/runtime/state_store.pysrc/akc/run/
This is how runtime behavior stays inspectable and replayable rather than hidden behind a single controller loop.
Autopilot¶
akc runtime autopilot is the always-on controller loop for living recompile and reliability workflows.
Relevant code:
src/akc/runtime/autopilot.pysrc/akc/runtime/living_bridge.pysrc/akc/living/automation_profile.py
Autopilot is where runtime health, drift, and policy-controlled automation come together.
Important themes:
- single-writer behavior per scope
- living recompile triggers
- reliability scoreboard artifacts
- optional SLO gate behavior before new live rollouts
Security posture¶
Runtime execution is intentionally distinct from compile-time execution.
The runtime surface relies on:
- policy gating
- adapter capability boundaries
- scoped filesystem paths
- bounded subprocess/HTTP routing when enabled
- replayable evidence
For the detailed threat model and enforcement discussion, see security.md.
Practical reading order¶
If you are trying to understand runtime from the code:
src/akc/cli/runtime.pysrc/akc/runtime/kernel.pysrc/akc/runtime/action_routing.pysrc/akc/runtime/adapters/src/akc/runtime/reconciler.pysrc/akc/runtime/coordination/src/akc/runtime/autopilot.py