SimBroker's two f64 input slots (exposure/price) are order-load-bearing but unchecked at bootstrap #21

Closed
opened 2026-06-04 22:25:49 +02:00 by Brummel · 1 comment
Owner

Found by the milestone fieldtest (docs/specs/fieldtest-milestone-walking-skeleton.md).

SimBroker has two f64 inputs — slot 0 = exposure, slot 1 = price. Because both are f64, a swapped wiring is NOT caught by the bootstrap kind-check; the rustdoc explicitly warns a swap 'would silently produce a wrong equity curve'. A downstream author must read prose to wire it correctly — a documented footgun, not a bug.

Possible follow-up (low urgency, documented): a named-role or distinct-newtype wiring for broker inputs so a swap is caught structurally, in a later cycle. Or carry-on given the rustdoc warning.

Found by the milestone fieldtest (docs/specs/fieldtest-milestone-walking-skeleton.md). SimBroker has two f64 inputs — slot 0 = exposure, slot 1 = price. Because both are f64, a swapped wiring is NOT caught by the bootstrap kind-check; the rustdoc explicitly warns a swap 'would silently produce a wrong equity curve'. A downstream author must read prose to wire it correctly — a documented footgun, not a bug. Possible follow-up (low urgency, documented): a named-role or distinct-newtype wiring for broker inputs so a swap is caught structurally, in a later cycle. Or carry-on given the rustdoc warning.
Brummel added the idea label 2026-06-04 22:25:49 +02:00
Brummel added this to the (deleted) milestone 2026-06-05 11:31:46 +02:00
Author
Owner

Removed from the 'Construction layer' milestone. The fix (named-role / distinct-newtype wiring so a swapped exposure/price slot is caught structurally) belongs to the ergonomic named-handle wiring layer, which that milestone explicitly defers (C23 / milestone scope). #21 stays an open idea in the general backlog.

Removed from the 'Construction layer' milestone. The fix (named-role / distinct-newtype wiring so a swapped exposure/price slot is caught structurally) belongs to the ergonomic named-handle wiring layer, which that milestone explicitly defers (C23 / milestone scope). #21 stays an open idea in the general backlog.
Brummel referenced this issue from a commit 2026-06-10 16:27:46 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#21