Two-way duplication of the SMA-cross sample harness topology (aura-engine test ↔ test) #53

Closed
opened 2026-06-10 18:54:47 +02:00 by Brummel · 1 comment
Owner

The value-empty SMA-cross signal-quality harness topology (the sma_cross
composite + the 5-node root with two Recorder sinks) is now defined verbatim
at three sites that must move in lockstep:

  • crates/aura-engine/src/blueprint.rs (#[cfg(test)] composite_sma_cross_harness)
  • crates/aura-engine/src/sweep.rs (#[cfg(test)], duplicated for the
    sweep_equals_n_independent_runs test)
  • crates/aura-cli/src/main.rs (production sample_blueprint_with_sinks)

No shared fixture and no test pins them equal; an edit to one silently diverges
the others. Surfaced by the cycle-0028 architect drift review.

Possible directions (none chosen): a shared #[cfg(test)] fixture for the two
engine copies; or the CLI/engine sharing one sample builder. Constraint: the
engine ships no sample (C16 — only examples/ fixtures for its own tests), so a
single production sample shared across engine+CLI is not free.

context: pure tidy debt, blocks nothing. Related to the closed #14 (Recorder
fixture duplication). depends on: nothing.

The value-empty SMA-cross signal-quality harness topology (the `sma_cross` composite + the 5-node root with two `Recorder` sinks) is now defined verbatim at **three** sites that must move in lockstep: - `crates/aura-engine/src/blueprint.rs` (`#[cfg(test)] composite_sma_cross_harness`) - `crates/aura-engine/src/sweep.rs` (`#[cfg(test)]`, duplicated for the `sweep_equals_n_independent_runs` test) - `crates/aura-cli/src/main.rs` (production `sample_blueprint_with_sinks`) No shared fixture and no test pins them equal; an edit to one silently diverges the others. Surfaced by the cycle-0028 architect drift review. Possible directions (none chosen): a shared `#[cfg(test)]` fixture for the two engine copies; or the CLI/engine sharing one sample builder. Constraint: the engine ships no sample (C16 — only `examples/` fixtures for its own tests), so a single production sample shared across engine+CLI is not free. context: pure tidy debt, blocks nothing. Related to the closed #14 (Recorder fixture duplication). depends on: nothing.
Brummel added the idea label 2026-06-10 18:54:47 +02:00
Author
Owner

Re-scoped three-way → two-way (title updated).

Cycle 0036 (94af4c7) enriched the CLI sample (sample_blueprint_with_sinks, aura-cli/src/main.rs) into a nested trend+momentum blend, so the CLI is no longer a verbatim peer of the bare SMA-cross harness — that leg of the duplication is gone.

What remains is a genuine same-crate two-copy #[cfg(test)] duplication inside aura-engine:

  • blueprint.rs:1593 sma_cross() + :1614 composite_sma_cross_harness()
  • sweep.rs:274 sma_cross() + :298 composite_sma_cross_harness() (sweep.rs:271 documents itself as "duplicated from blueprint.rs")

No test pins them equal; an edit to one silently diverges the other. Both live in the same crate, so a shared #[cfg(test)] fixtures module is the natural fix — the C16 cross-crate tension the original raised is now moot.

Note: graph_model.rs:311/:340 holds a fourth, intentionally-minimal copy kept small for the golden — leave it out of the dedup. Picking this up now as a tidy.

Re-scoped three-way → two-way (title updated). Cycle 0036 (`94af4c7`) enriched the CLI sample (`sample_blueprint_with_sinks`, `aura-cli/src/main.rs`) into a nested trend+momentum blend, so the CLI is **no longer a verbatim peer** of the bare SMA-cross harness — that leg of the duplication is gone. What remains is a genuine same-crate two-copy `#[cfg(test)]` duplication **inside `aura-engine`**: - `blueprint.rs:1593` `sma_cross()` + `:1614` `composite_sma_cross_harness()` - `sweep.rs:274` `sma_cross()` + `:298` `composite_sma_cross_harness()` (`sweep.rs:271` documents itself as "duplicated from blueprint.rs") No test pins them equal; an edit to one silently diverges the other. Both live in the same crate, so a shared `#[cfg(test)]` fixtures module is the natural fix — the C16 cross-crate tension the original raised is now moot. Note: `graph_model.rs:311`/`:340` holds a fourth, intentionally-minimal copy kept small for the golden — leave it out of the dedup. Picking this up now as a tidy.
Brummel changed title from Three-way duplication of the SMA-cross sample harness topology (test+test+CLI) to Two-way duplication of the SMA-cross sample harness topology (aura-engine test ↔ test) 2026-06-13 23:54:43 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#53