Expand description
SRD-86 §4–§6 — the Control-class actuation daemon.
Where a Coordinate-class axis is actuated by re-running the phase once
per coordinate (executor::dispatch_optimization’s default loop), a
Control-class axis is actuated by live-retargeting the phase’s dynamic
control (SRD-23 concurrency / rate) on one continuous phase — no
restart. The optimizer becomes a servoing daemon: pull the next setting →
retarget the live control (confirmed-apply, awaited) → wait for the
windowed objective to settle at that setting → read it → step. Repeat
until the budget is spent, then stop the phase.
§Why an async task, not a cadence callback
The settle detector (super::settle) rides the sync metrics-cadence
callback, but Control::set is
async (confirmed-apply over async appliers). So the servo is a
concurrent async future, tokio::join!’d with the activity loop inside
run_phase. It reuses start_settle (which legitimately rides the sync
callback) only to read the settled objective; the async retarget lives
here, awaited directly so setting N is confirmed in effect before it is
settled and read.
The live control is resolved off the phase component — where the fiber
pool / rate limiter declared it in Activity::attach_component, which runs
before the activity loop, so the handle always exists by the time the
servo retargets.
Structs§
- Control
Axis - One
Control-class axis: its index in a coordinate tuple + the name of the live control ("concurrency"/"rate") it servos. - Servo
Best - The best coordinate + objective value a servoing run found.
- Servo
Outcome - What a servoing run produced — read by the dispatch after the continuous
phase returns.
bestisNoneif no setting ever yielded a value (e.g. the phase ended before the first settle). - Servo
Spec - The servoing job, handed from
dispatch_optimizationtorun_phasethroughctx.optimize_servo. Theresultcell is written byservoand read by the dispatch after the continuous phase returns. (Cloneonly so the enclosingExecCtxstaysClone; the spec is moved, not cloned, in use.)
Functions§
- servo
- Drive the optimizer over one continuous phase by live-retargeting its
controls (SRD-86 Control-class actuation). Runs concurrent with the activity
loop (
tokio::join!inrun_phase):