← Về thư mục
harness/orchestration.py
- ScenarioError · class · L55-L56 — class ScenarioError(RuntimeError)
- _MemoryStore · class · L59-L115 — class _MemoryStore
- init · method · L68-L71 — def init(self, workload: Workload) -> None
- workloads_needing_attention · method · L73-L74 — def workloads_needing_attention(self) -> list[Workload]
- active_allocation · method · L76-L80 — def active_allocation(self, workload_id: str) -> Allocation | None
- create_allocation · method · L82-L91 — def create_allocation(self, workload_id: str, epoch: int) -> Allocation
- save_allocation · method · L93-L94 — def save_allocation(self, allocation: Allocation) -> None
- save_workload · method · L96-L97 — def save_workload(self, workload: Workload) -> None
- save_allocation_and_workload · method · L99-L107 — def save_allocation_and_workload( self, allocation: Allocation, workload: Workload ) -> None: # The production repository commits these two rows atomically. This # in-memory harness has no split persistence boundary: both objects # are the rows, and the reconciler mutates them before calling us. # Keeping the method explicit makes the harness implement the real # WorkloadStore protocol without re-implementing transition policy.
- open_recovery_epoch · method · L109-L115 — def open_recovery_epoch(self, allocation: Allocation, workload: Workload) -> None: # One durable fact in the real store; here the objects are the # rows, so both mutations are already visible and this is a no-op # with a name. It exists so the Protocol is satisfied by something # a scenario actually runs, rather than by a duck type that would # only fail when a scenario reached recovery.
- _ScriptedBackend · class · L118-L198 — class _ScriptedBackend
- init · method · L129-L135 — def init(self, script: dict[str, Any]) -> None
- submit · method · L137-L161 — def submit(self, *, allocation, spec, profile)
- observe · method · L163-L174 — def observe(self, allocation)
- cancel · method · L176-L177 — def cancel(self, allocation, *, reason)
- find_by_token · method · L179-L188 — def find_by_token(self, token)
- diagnostics · method · L190-L191 — def diagnostics(self)
- _handle · method · L194-L198 — def _handle(step: dict, allocation) -> ExternalHandle
- _workload_from · function · L201-L212 — def _workload_from(spec: dict) -> Workload
- run_orchestration_scenario · function · L215-L330 — def run_orchestration_scenario( scenario: Scenario, *, offline: bool = True ) -> ScenarioResult
- emit · function · L242-L243 — def emit(kind: str, payload: dict) -> None
- _NoScript · class · L296-L301 — class _NoScript
- _NoFaults · class · L303-L310 — class _NoFaults