Skip to main content

Module runs

Module runs 

Source
Expand description

POST /api/runs/preflight (read-only readiness check), POST /api/runs (start a new tune run), and POST /api/runs/{id}/cancel (request its cancellation) – the write side of the run-history API routes::history reads from.

The preflight endpoint delegates to the runtime’s read-only checks without preparing a tune. Run startup uses the same preparation and drive path as the CLI, keeping template lookup, tag derivation, validation, driver connection, and live-tune safety behavior in one implementation. Transport errors and response projections stay in this adapter. crate::active_run tracks every in-flight run so each can be cancelled independently.

Structs§

PreflightCheckResponse
One check and its operator-facing detail in a preflight report.
PreflightResponse
The summarized pass/warn/fail result returned by the read-only preflight endpoint.
PreflightTagReadResponse
One derived tag read and its operator-facing detail in a preflight report.
StartRunRequest
The bodies of POST /api/runs and POST /api/runs/preflight contain the per-run tune inputs. Operational timing values are intentionally absent: both preparation and preflight resolve them from the global [tuning] configuration, just as they are for a CLI invocation. Every field that has a CLI default (--sim-gain, etc.) repeats that exact default here via #[serde(default = "...")], so an HTTP caller that omits a field gets identical behavior to a CLI invocation that omits the matching flag. Option<T> fields need no #[serde(default)] of their own – serde already treats a missing key as None for an Option field.
UpdateNotesRequest
The body of PUT /api/runs/{id}/notes.
WriteRunRequest
The body of POST /api/runs/{id}/write.

Enums§

PreflightStatus
Overall severity of a read-only preflight report.

Functions§

router