RandomSpace named-axis builder (RandomBinder sibling to SweepBinder) #79

Closed
opened 2026-06-17 13:42:05 +02:00 by Brummel · 0 comments
Owner

Friction (fieldtest 0049): RandomSpace has no named-axis builder

The grid sweep has a fluent by-name sibling — Composite::axis("sma_cross.fast", ...).sweep(run) (the SweepBinder) — which resolves axes against param_space() by name, so a mis-ordered or mis-counted axis is structurally impossible.

RandomSpace (cycle 0049) has no counterpart: the author must build Vec<ParamRange> in exactly param_space() slot order and pass it positionally to RandomSpace::new(&space, ranges, count, seed). The Arity / RangeKindMismatch checks catch a wrong count or a kind-swapped slot, but a same-kind transposition (e.g. swapping the two I64 ranges for fast.length and slow.length) passes validation silently and tunes the wrong knob over the wrong interval — the exact failure class the named SweepBinder was built to remove for the grid axis.

Proposed: a RandomBinder sibling to SweepBinder mapping name -> ParamRange against param_space(), so the by-name resolution that protects the grid sweep also protects the random sweep.

context: surfaced by the cycle-0049 fieldtest (docs/specs/fieldtest-0049-random-sweep.md, "no named-axis builder" finding). Pairs with the named↔positional sweep-ergonomics surface in sweep.rs.

## Friction (fieldtest 0049): RandomSpace has no named-axis builder The grid sweep has a fluent by-name sibling — `Composite::axis("sma_cross.fast", ...).sweep(run)` (the `SweepBinder`) — which resolves axes against `param_space()` **by name**, so a mis-ordered or mis-counted axis is structurally impossible. `RandomSpace` (cycle 0049) has no counterpart: the author must build `Vec<ParamRange>` in exactly `param_space()` slot order and pass it positionally to `RandomSpace::new(&space, ranges, count, seed)`. The `Arity` / `RangeKindMismatch` checks catch a wrong count or a kind-swapped slot, but a **same-kind transposition** (e.g. swapping the two `I64` ranges for `fast.length` and `slow.length`) passes validation silently and tunes the wrong knob over the wrong interval — the exact failure class the named `SweepBinder` was built to remove for the grid axis. Proposed: a `RandomBinder` sibling to `SweepBinder` mapping `name -> ParamRange` against `param_space()`, so the by-name resolution that protects the grid sweep also protects the random sweep. context: surfaced by the cycle-0049 fieldtest (docs/specs/fieldtest-0049-random-sweep.md, "no named-axis builder" finding). Pairs with the named↔positional sweep-ergonomics surface in sweep.rs.
Brummel added the feature label 2026-06-17 13:42:05 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#79