The export assembles a FLYSIM01 file from the agent's FLYAGT01 and the world's FLYENV01 capture
payloads, the task's {reward, ratchet} and the host's fields, through flysim-store's encoder.
The import reads a file back into those halves. The agent payload is the shipped form of
AGENT-01's prototype: learning.updates starts at plasticity.updates, and the file's framebuffer
goes in an inputFrame chunk that StageRestore installs, as the legacy restore does.
LegacyCheckpointer keeps the legacy loop's generations, hot and durable intervals, per-process
milestone archives and writer thread. restore_from_store walks the legacy candidate order and
takes the next candidate on any refusal. The agent worker's payload encoder is now one shared
function, and legacy_parity seeds through the shipped import.
56 lines
2 KiB
Rust
56 lines
2 KiB
Rust
//! `fly-session`: the lockstep session coordinator and a synthetic composition over Flybus.
|
|
//!
|
|
//! This crate is the SESSION-01 slice of the session-framework implementation guide: the
|
|
//! sequential transaction of [`step-v1`], driven over the [`flybus`] router, with small fake
|
|
//! workers standing in for a brain and an emulator.
|
|
//!
|
|
//! ```text
|
|
//! Coordinator ── Agent.Prepare ──> agent workers (fake model + fixed readout stub)
|
|
//! ── Environment.Advance ──> environment (a counter arena, no emulator)
|
|
//! ── task.evaluate_transition (once)
|
|
//! ── Agent.Commit ──> agent workers
|
|
//! ── committed snapshot ──> session.<id>.snapshots
|
|
//! ```
|
|
//!
|
|
//! Every arrow is a Flybus RPC to an incarnation-pinned service, with domain request ids and
|
|
//! the result caches of `ipc-v1` section 5 in front of every mutation. Nothing here contains a
|
|
//! public controller API, an implicit best-effort retry, a real emulator or a real brain.
|
|
//!
|
|
//! The domain types come from the CONTRACT-01 crate [`fly_session_types`]; [`types`] is a
|
|
//! facade over it plus the few session-side additions a coordinator needs.
|
|
//!
|
|
//! [`step-v1`]: https://example.invalid/step-v1
|
|
|
|
pub mod agent;
|
|
pub mod cli;
|
|
pub mod clock;
|
|
pub mod coordinator;
|
|
pub mod dedup;
|
|
pub mod environment;
|
|
pub mod harness;
|
|
pub mod launcher;
|
|
pub mod legacy_agent;
|
|
pub mod legacy_checkpoint;
|
|
pub mod legacy_env;
|
|
pub mod legacy_env_parity;
|
|
pub mod legacy_parity;
|
|
pub mod measure;
|
|
pub mod media;
|
|
pub mod metrics;
|
|
pub mod phase;
|
|
pub mod publish;
|
|
pub mod rpc;
|
|
pub mod state;
|
|
pub mod task;
|
|
pub mod worker;
|
|
|
|
// CONTRACT-01 owns the domain types; `types` is a facade over its crate plus the few
|
|
// session-side additions a coordinator needs.
|
|
pub mod types;
|
|
pub use fly_session_types;
|
|
|
|
pub use coordinator::{
|
|
Coordinator, Deadlines, DispatchOrder, Injections, ResolutionEnd, SessionFailure, StepReport,
|
|
};
|
|
pub use launcher::{ExecutionMode, Launcher, ReapOutcome, ThreadBudget, Via};
|
|
pub use phase::{Phase, PhaseMachine};
|