pub async fn worker_stats(
__arg0: State<AppState>,
headers: HeaderMap,
__arg2: Json<StatsBody>,
) -> Result<StatusCode, ApiError>Expand description
POST /v1/worker/stats. Bearer = same short-handle / full-CapToken
forms as worker_submit. Body = JSON (StatsBody).
Records normalized per-attempt worker stats via
Engine::record_worker_stats; the dispatcher’s outcome fold drains
them into the terminal StepEntry. Sibling of
worker_degradation on the observational plane: never touches the
fold path / step OUTPUT, and SHOULD be called before the final
/v1/worker/submit (the dispatcher folds at outcome time — stats
arriving after the fold are dropped with the attempt’s cleanup).