Collapse the redundant _open example twins into their closed siblings #248

Closed
opened 2026-07-13 10:08:48 +02:00 by Brummel · 2 comments
Owner

Context

#246 made a bound blueprint param an overridable default: a sweep/campaign axis may name a bound param and re-open it per family (docs/design/INDEX.md, C12 amendment 2026-07-12). The four example pairs under crates/aura-cli/examples/r_sma/r_sma_open, r_breakout/r_breakout_open, r_meanrev/r_meanrev_open, r_channel/r_channel_open — predate that change: each _open variant exists only because sweeping used to require open params. All params involved are smooth tuning magnitudes (SMA lengths, band multipliers) with honest defaults, so the closed variants alone now serve both run and sweep (via bound-override axes) — the same consolidation the #246 scaffold already shipped (single signal.json starter).

Decision (2026-07-13)

The _open twins are removed; the closed variants remain the only user-facing example corpus. The open param state itself STAYS: a design analysis found two classes where a required default would be semantically dishonest — discrete hypothesis-selector params (e.g. a weekday or news-category id, where a default silently substitutes a different experiment) and instrument-dimensioned magnitudes (e.g. grid spacing in raw price units, where no value is honest across instruments) — and the gang mechanism structurally requires its members to stay un-bound (docs/authoring-guide.md §1, gang row). Only the redundant example twins go.

Scope note (verified 2026-07-13)

112 references to the four _open filenames: crates/aura-cli/tests/cli_run.rs (82), crates/aura-cli/src/main.rs (13), crates/aura-cli/tests/graph_construct.rs (11), crates/aura-cli/tests/research_docs.rs (3), crates/aura-cli/tests/project_load.rs (1), crates/aura-cli/src/render.rs (1), docs/design/INDEX.md (1). Tests sweeping an _open file move to the closed twin with bound-override axes; the wrap prefix changes with the blueprint name (r_sma_open.fast_sma.lengthr_sma.fast_sma.length). Code paths that genuinely need an OPEN blueprint (the run/mc closed-guard refusal, sweep's missing-knob coverage error, gang) keep their coverage via fixtures under crates/aura-cli/tests/fixtures/, not via user-facing examples.

Acceptance

  • crates/aura-cli/examples/ ships no _open variants
  • migrated tests sweep the closed twins via bound-override axes
  • open-param error paths (closed-guard, missing-knob, gang) remain fixture-covered
  • doc references to the twins updated
## Context #246 made a bound blueprint param an overridable default: a sweep/campaign axis may name a bound param and re-open it per family (`docs/design/INDEX.md`, C12 amendment 2026-07-12). The four example pairs under `crates/aura-cli/examples/` — `r_sma`/`r_sma_open`, `r_breakout`/`r_breakout_open`, `r_meanrev`/`r_meanrev_open`, `r_channel`/`r_channel_open` — predate that change: each `_open` variant exists only because sweeping used to require open params. All params involved are smooth tuning magnitudes (SMA lengths, band multipliers) with honest defaults, so the closed variants alone now serve both `run` and `sweep` (via bound-override axes) — the same consolidation the #246 scaffold already shipped (single `signal.json` starter). ## Decision (2026-07-13) The `_open` twins are removed; the closed variants remain the only user-facing example corpus. The open param state itself STAYS: a design analysis found two classes where a required default would be semantically dishonest — discrete hypothesis-selector params (e.g. a weekday or news-category id, where a default silently substitutes a different experiment) and instrument-dimensioned magnitudes (e.g. grid spacing in raw price units, where no value is honest across instruments) — and the `gang` mechanism structurally requires its members to stay un-bound (`docs/authoring-guide.md` §1, gang row). Only the redundant example twins go. ## Scope note (verified 2026-07-13) 112 references to the four `_open` filenames: `crates/aura-cli/tests/cli_run.rs` (82), `crates/aura-cli/src/main.rs` (13), `crates/aura-cli/tests/graph_construct.rs` (11), `crates/aura-cli/tests/research_docs.rs` (3), `crates/aura-cli/tests/project_load.rs` (1), `crates/aura-cli/src/render.rs` (1), `docs/design/INDEX.md` (1). Tests sweeping an `_open` file move to the closed twin with bound-override axes; the wrap prefix changes with the blueprint name (`r_sma_open.fast_sma.length` → `r_sma.fast_sma.length`). Code paths that genuinely need an OPEN blueprint (the run/mc closed-guard refusal, sweep's missing-knob coverage error, gang) keep their coverage via fixtures under `crates/aura-cli/tests/fixtures/`, not via user-facing examples. ## Acceptance - [ ] `crates/aura-cli/examples/` ships no `_open` variants - [ ] migrated tests sweep the closed twins via bound-override axes - [ ] open-param error paths (closed-guard, missing-knob, gang) remain fixture-covered - [ ] doc references to the twins updated
Author
Owner

Design reconciliation (specify)

Spec: collapse-open-example-twins. A full recon over the 112 references corrects one scope-note premise and resolves four derivable forks; this records them.

Correction to the scope note (axis prefixes). The axis wrap prefix is the blueprint's internal name field, which is identical between each twin pair (sma_signal, r_breakout_signal, r_meanrev_signal, hl_channel) — not the filename. Migrated tests therefore keep their --axis strings byte-for-byte; only the file path swaps. The scope note's example rename (r_sma_open.fast_sma.lengthr_sma.fast_sma.length) does not occur anywhere.

  • Fork: delete vs. relocate the four _open files → relocate to crates/aura-cli/tests/fixtures/. Basis: derived — 22 tests genuinely need OPEN shapes (introspect axis-namespace pins, gang-vs-hardwired equivalence, run/mc closed-guard refusals, the subset-axes MissingKnob refusal), the closed twins carry no gangs section, and no existing fixture provides these shapes; the issue body itself names fixtures as the coverage home. The acceptance line "examples/ ships no _open variants" holds either way.
  • Fork: generator/pin tests (emit_* / shipped_*_serialize in crates/aura-cli/src/main.rs) — drop their _open halves vs. repoint → repoint to the fixture location. Basis: derived — the relocated open fixtures stay builder-generated and byte-pinned (green-by-construction), which the gang-equivalence tests rely on; dropping the pins would leave hand-maintained fixture bytes free to drift from the builders they mirror.
  • Fork: the production default render sample (aura graph with no blueprint argument) embeds examples/r_sma_open.json via include_str! (crates/aura-cli/src/main.rs, dispatch_graph) → repoint to examples/r_sma.json. Basis: derived — the default sample is user-facing surface and belongs to the user-facing gallery; rendering does not require open params. (The scope note's "all references are test code" was wrong for this one site.)
  • Fork: store-seeding sweeps in research_docs.rs / project_load.rs (seed an open blueprint via a 2×2 sweep, then reference its axes from campaign docs) → migrate to the closed twin. Basis: derived — bound-param axis overrides reach the campaign/--real trunk since #246 (commit e902a0f), so axis references over a closed-seeded blueprint resolve identically; the migrated suite run verifies it.

Reference classification over the 112 sites: 22 NEEDS-OPEN (repoint to the relocated fixtures), 70 MIGRATE (file-path swap, axis strings unchanged), 7 GENERATOR (repoint emit/pin targets), 7 DOC (comments + one design-ledger history note). Four byte-pinned exact-grade tests (cli_run.rs) are expected float-stable under migration (the axes fully bind fast.length/slow.length; bias.scale=0.5 is identical across the r_sma twins) and are re-run to confirm.

## Design reconciliation (specify) Spec: collapse-open-example-twins. A full recon over the 112 references corrects one scope-note premise and resolves four derivable forks; this records them. **Correction to the scope note (axis prefixes).** The axis wrap prefix is the blueprint's internal `name` field, which is identical between each twin pair (`sma_signal`, `r_breakout_signal`, `r_meanrev_signal`, `hl_channel`) — not the filename. Migrated tests therefore keep their `--axis` strings byte-for-byte; only the file path swaps. The scope note's example rename (`r_sma_open.fast_sma.length` → `r_sma.fast_sma.length`) does not occur anywhere. - **Fork: delete vs. relocate the four `_open` files** → relocate to `crates/aura-cli/tests/fixtures/`. Basis: derived — 22 tests genuinely need OPEN shapes (introspect axis-namespace pins, gang-vs-hardwired equivalence, run/mc closed-guard refusals, the subset-axes MissingKnob refusal), the closed twins carry no `gangs` section, and no existing fixture provides these shapes; the issue body itself names fixtures as the coverage home. The acceptance line "examples/ ships no `_open` variants" holds either way. - **Fork: generator/pin tests (`emit_*` / `shipped_*_serialize` in crates/aura-cli/src/main.rs) — drop their `_open` halves vs. repoint** → repoint to the fixture location. Basis: derived — the relocated open fixtures stay builder-generated and byte-pinned (green-by-construction), which the gang-equivalence tests rely on; dropping the pins would leave hand-maintained fixture bytes free to drift from the builders they mirror. - **Fork: the production default render sample (`aura graph` with no blueprint argument) embeds `examples/r_sma_open.json` via `include_str!` (crates/aura-cli/src/main.rs, `dispatch_graph`)** → repoint to `examples/r_sma.json`. Basis: derived — the default sample is user-facing surface and belongs to the user-facing gallery; rendering does not require open params. (The scope note's "all references are test code" was wrong for this one site.) - **Fork: store-seeding sweeps in research_docs.rs / project_load.rs (seed an open blueprint via a 2×2 sweep, then reference its axes from campaign docs)** → migrate to the closed twin. Basis: derived — bound-param axis overrides reach the campaign/--real trunk since #246 (commit e902a0f), so axis references over a closed-seeded blueprint resolve identically; the migrated suite run verifies it. Reference classification over the 112 sites: 22 NEEDS-OPEN (repoint to the relocated fixtures), 70 MIGRATE (file-path swap, axis strings unchanged), 7 GENERATOR (repoint emit/pin targets), 7 DOC (comments + one design-ledger history note). Four byte-pinned exact-grade tests (cli_run.rs) are expected float-stable under migration (the axes fully bind `fast.length`/`slow.length`; `bias.scale=0.5` is identical across the r_sma twins) and are re-run to confirm.
Author
Owner

Autonomous sign-off (specify)

The spec collapse-open-example-twins was signed autonomously on 2026-07-13 via an independent grounding-check PASS — 7 load-bearing assumptions ratified by currently-green tests (among them: sweeping a closed blueprint over a bound-param axis reproduces bit-identically since #246; open-swept metrics equal closed-hardwired metrics in the gang-equivalence pins; the shipped _open bytes match their builders). No human signed at sign time; this comment is the audit trail and the decision is vetoable.

## Autonomous sign-off (specify) The spec collapse-open-example-twins was signed autonomously on 2026-07-13 via an independent grounding-check PASS — 7 load-bearing assumptions ratified by currently-green tests (among them: sweeping a closed blueprint over a bound-param axis reproduces bit-identically since #246; open-swept metrics equal closed-hardwired metrics in the gang-equivalence pins; the shipped _open bytes match their builders). No human signed at sign time; this comment is the audit trail and the decision is vetoable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#248