Harden the param_space/compile flat-node-order mirror test with a nested-composite case #34

Closed
opened 2026-06-07 15:34:44 +02:00 by Brummel · 0 comments
Owner

The cycle-0015 E2E test param_space_mirrors_compiled_flat_node_param_order
(crates/aura-engine/src/blueprint.rs) guards the load-bearing C23/#31 invariant —
Blueprint::param_space()'s slot order mirrors compile()'s flat-node param order
(kind-by-slot) — but drives only the single-level composite_sma_cross_harness
shape. compile() is never invoked on a nested composite in that test.

collect_params (blueprint.rs:217) duplicates lower_items' depth-first
traversal order rather than sharing it: the spec deliberately keeps param_space()
a parallel read-only projection so compile/inline_composite stay untouched and
the compilat bit-identical (C9/C23). The two orders must therefore stay in sync
forever. A future inliner reorder that desynced them under nesting could pass the
unit tests (which assert param_space() order in isolation) and the single-level
E2E mirror, yet break the slot-by-slot premise #31's binding rests on.

Direction: extend the mirror test (or add a sibling) that compiles a nested
composite blueprint and asserts param_space() kind-by-slot equals the compiled
flat-node param order — closing the shape gap before #31 builds binding atop it.

context: filed at the cycle-A (0015) audit as debt, not active drift — the guard
exists, it is only shape-specific.
refs #31 (the binding cycle that relies on the invariant).

The cycle-0015 E2E test `param_space_mirrors_compiled_flat_node_param_order` (`crates/aura-engine/src/blueprint.rs`) guards the load-bearing C23/#31 invariant — `Blueprint::param_space()`'s slot order mirrors `compile()`'s flat-node param order (kind-by-slot) — but drives only the single-level `composite_sma_cross_harness` shape. `compile()` is never invoked on a *nested* composite in that test. `collect_params` (`blueprint.rs:217`) duplicates `lower_items`' depth-first traversal order rather than sharing it: the spec deliberately keeps `param_space()` a parallel read-only projection so `compile`/`inline_composite` stay untouched and the compilat bit-identical (C9/C23). The two orders must therefore stay in sync forever. A future inliner reorder that desynced them under *nesting* could pass the unit tests (which assert `param_space()` order in isolation) and the single-level E2E mirror, yet break the slot-by-slot premise #31's binding rests on. Direction: extend the mirror test (or add a sibling) that compiles a *nested* composite blueprint and asserts `param_space()` kind-by-slot equals the compiled flat-node param order — closing the shape gap before #31 builds binding atop it. context: filed at the cycle-A (0015) audit as debt, not active drift — the guard exists, it is only shape-specific. refs #31 (the binding cycle that relies on the invariant).
Brummel added this to the The World — parameter-space & sweep milestone 2026-06-07 15:34:44 +02:00
Brummel added the idea label 2026-06-07 15:34:44 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#34