docs: TASK-01 on STATE-02 (the store, the boot, the task ledger)

This commit is contained in:
acamilo 2026-09-29 18:23:11 +00:00
parent e561c81295
commit 7ef16be317
2 changed files with 30 additions and 10 deletions

View file

@ -371,12 +371,28 @@ framework, from a fresh start or from a FLYSIM01 checkpoint.
`preStepStimulations` and reports every admission applied or aborted. `Coordinator::import` `preStepStimulations` and reports every admission applied or aborted. `Coordinator::import`
installs a checkpoint of another format as a session's start. Step details (`StepDetails`) are installs a checkpoint of another format as a session's start. Step details (`StepDetails`) are
kept for a parity run. kept for a parity run.
- **FLYSIM01 as the start** (`fly-legacy-session::import`). This is the import AGENT-01 and ENV-01 - **FLYSIM01 as the start** (`fly-legacy-session::import`, on STATE-02's
left open. The world, agent and task halves go into each participant's own capture format, and `legacy_checkpoint::{halves, agent_payload, world_payload}`). The world, agent and task halves
the ordinary group restore installs them: stage, validate, activate, `Paused(k)`, resume. The go into each participant's own capture format, and the ordinary group restore installs them:
world is replaced by a fresh one first, because ENV-01 stages only on a replacement. The context stage, validate, activate, `Paused(k)`, resume. The world is replaced by a fresh one first,
the agent resumes with is computed from the checkpoint's own memory image, and the coordinator because ENV-01 stages only on a replacement. The context the agent resumes with is computed
holds the task to it after the install (`Task::restored`). from the checkpoint's own memory image, and the coordinator holds the task to it after the
install (`Task::restored`). The task ledger is STATE-02's `{reward, ratchet, slotFilled}`.
- **The store and the boot** (`fly-legacy-session::composition`, on STATE-02's
`LegacyCheckpointer`).
- `boot` is `Sim::boot`. It restores from the live hot and durable stores in the legacy
candidate order, holding each candidate to the legacy gate. Any refusal falls to the next
candidate; each attempt runs on a session of its own, because a refused install fences its
session. It is a fresh start when the stores are empty. After either, the startup durable
save is written and the intervals start.
- `advance` keeps the declared boundary order: the slot save (inside the step), the milestone
archive on a rank climb, the rollback (deferred by the coordinator until the host has
captured), a durable save after a rollback, then the interval saves.
- `shutdown_save` is the legacy shutdown's durable save.
- The session runtime writes no sugar journal yet: its admission is the coordinator's, and the
journal's boot header needs the edge.
- `lastEventId` carries the restored file's watermark; the runtime has no feed event log
before EDGE-01.
- **Sugar** (`fly-legacy-session::admission`). flysim's `RateLimiter` and clamp run unchanged, - **Sugar** (`fly-legacy-session::admission`). flysim's `RateLimiter` and clamp run unchanged,
against the last commit's `stimulusRemainingMs` (one commit stale). An admission waits for the against the last commit's `stimulusRemainingMs` (one commit stale). An admission waits for the
next cut. next cut.

View file

@ -535,10 +535,14 @@ starts from the live fly's own save through the ordinary group restore
- The world is ENV-01's `WorldState::from_flysim01` at `k = emulatorFrame - 1`, staged on a - The world is ENV-01's `WorldState::from_flysim01` at `k = emulatorFrame - 1`, staged on a
replacement world. replacement world.
- The agent is the checkpoint's agent state in the worker's own capture: AGENT-01's - The agent is the checkpoint's agent state in the worker's own capture format: STATE-02's
`legacy_state_payload`, with `learning.updates` started at `plasticity.updates` and the `legacy_checkpoint::agent_payload`. It carries the file's reinforcement count and the file's
checkpoint id and boundary written in. framebuffer as the next input, and its ids come from the file.
- The task is the adapter state and the ratchet state. - The task is STATE-02's ledger `{reward, ratchet, slotFilled}`.
A session boots from the live stores the way `Sim::boot` does: the legacy candidate order, the
legacy gate, the next candidate on any refusal, then a startup durable save. See the
implementation guide's TASK-01 entry.
This section's resets then apply, and nothing else. The executor is fresh and observes the restored This section's resets then apply, and nothing else. The executor is fresh and observes the restored
image once, at the restored brain time. The agent's readout transient is a fresh process's. The image once, at the restored brain time. The agent's readout transient is a fresh process's. The