refactor(cli): retire the r-sma demo builder — topology now lives only as data (#159 cut 1b)
Cut 1b of the hard-wired demo retirement — the removal half. With the proven
example shipped in cut 1, delete the r-sma builder and its whole transitive
closure so no production function constructs the r-sma topology any more; it
exists only as data (crates/aura-cli/examples/r_sma{,_open}.json).
Deleted: sma_signal (the builder), r_sma_graph, run_r_sma (aura run --harness
r-sma), r_sma_sweep_family (aura sweep --strategy r-sma), the synthetic inline
r-sma walkforward/mc machinery (r_sma_space/r_sma_sweep_over/run_oos_r/
run_mc_r_bootstrap/mc_r_bootstrap_report + the walkforward_family RSma arm), both
fixture emitters, the round-trip + cut-1 byte-fidelity tests, the R_SMA_FAST/
SLOW/BIAS_SCALE consts, and the Strategy::RSma / HarnessKind::RSma / McArgs::RealR
variants. The three dissolved-verb synth sites (generalize/walkforward/mc
--strategy r-sma --real) now embed the shipped open example via include_str!
instead of building it — byte-safe, guarded by the unchanged dissolved-verb
real-archive goldens. The two now-redundant fixtures move to the examples
(deleted, ~40 readers repointed). The --cost-* flags on `aura run` retire with
the harness (their sole consumer was run_r_sma; cost-model coverage survives
engine/std/composites-level).
The retired demo surfaces (--harness r-sma, sweep/walkforward/mc --strategy r-sma
inline) have working data successors: aura run examples/r_sma.json, aura sweep
examples/r_sma_open.json --axis …, and the --strategy r-sma --real campaign path.
Deviation from the plan, noted: StopArm collapsed to StopRule in wrap_r's
signature (its only other variant, Open, died with r_sma_graph) — cleaner than
the planned vestigial single-variant enum; behaviour-preserving, touching
campaign_run.rs and the r-breakout/r-meanrev call sites.
Follow-up (not this cut): wrap_r's cost-node-building branch is now unreachable
(nothing passes Some(CostConfig) after run_r_sma's deletion) yet clippy-clean —
a latent cleanup for when the inline cost surface fully retires.
The stage1-r param-suffix remapping (r_sma_friendly_name + the FAST/SLOW/
STOP_LENGTH/STOP_K_SUFFIX consts) went dead and was removed, closing #167 by
deletion.
Verification (own, not the workflow's report): full `cargo test --workspace`
green; `cargo clippy --workspace --all-targets -- -D warnings` clean, no
dead-code residue; the cut-1 grade anchor (shipped_r_sma_example_reproduces_the_
builtin_grade) and the dissolved-verb real goldens (generalize/walkforward/mc
_dissolves_through_the_campaign_path) stay byte-identical. A first workflow
attempt was discarded after a subagent's `git checkout -- main.rs` recovery
silently reverted earlier tasks' edits (filed on the plugin tracker as
Brummel/Skills#23); this landing is the hardened re-run, verified by hand.
closes #167
refs #159
This commit is contained in:
@@ -738,10 +738,10 @@ fn persist_campaign_traces(
|
||||
tx_ex,
|
||||
tx_r,
|
||||
tx_req,
|
||||
crate::StopArm::Bound(aura_composites::StopRule::Vol {
|
||||
aura_composites::StopRule::Vol {
|
||||
length: crate::R_SMA_STOP_LENGTH,
|
||||
k: crate::R_SMA_STOP_K,
|
||||
}),
|
||||
},
|
||||
false,
|
||||
None,
|
||||
)
|
||||
|
||||
+142
-806
File diff suppressed because it is too large
Load Diff
+50
-1241
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
{"format_version":1,"blueprint":{"name":"sma_signal","nodes":[{"primitive":{"type":"SMA","name":"fast","bound":[{"pos":0,"name":"length","kind":"I64","value":{"I64":2}}]}},{"primitive":{"type":"SMA","name":"slow","bound":[{"pos":0,"name":"length","kind":"I64","value":{"I64":4}}]}},{"primitive":{"type":"Sub"}},{"primitive":{"type":"Bias","name":"bias","bound":[{"pos":0,"name":"scale","kind":"F64","value":{"F64":0.5}}]}}],"edges":[{"from":0,"to":2,"slot":0,"from_field":0},{"from":1,"to":2,"slot":1,"from_field":0},{"from":2,"to":3,"slot":0,"from_field":0}],"input_roles":[{"name":"price","targets":[{"node":0,"slot":0},{"node":1,"slot":0}],"source":"F64"}],"output":[{"node":3,"field":0,"name":"bias"}]}}
|
||||
@@ -1 +0,0 @@
|
||||
{"format_version":1,"blueprint":{"name":"sma_signal","nodes":[{"primitive":{"type":"SMA","name":"fast"}},{"primitive":{"type":"SMA","name":"slow"}},{"primitive":{"type":"Sub"}},{"primitive":{"type":"Bias","name":"bias","bound":[{"pos":0,"name":"scale","kind":"F64","value":{"F64":0.5}}]}}],"edges":[{"from":0,"to":2,"slot":0,"from_field":0},{"from":1,"to":2,"slot":1,"from_field":0},{"from":2,"to":3,"slot":0,"from_field":0}],"input_roles":[{"name":"price","targets":[{"node":0,"slot":0},{"node":1,"slot":0}],"source":"F64"}],"output":[{"node":3,"field":0,"name":"bias"}]}}
|
||||
@@ -436,7 +436,7 @@ fn registered_id(stdout: &str) -> String {
|
||||
#[test]
|
||||
fn graph_register_stores_and_prints_content_id() {
|
||||
let dir = temp_cwd("register");
|
||||
let (stdout, stderr, code) = run_in(&dir, &["graph", "register", &fixture("sma_signal.json")]);
|
||||
let (stdout, stderr, code) = run_in(&dir, &["graph", "register", &example("r_sma.json")]);
|
||||
assert_eq!(code, Some(0), "stdout: {stdout} stderr: {stderr}");
|
||||
// #194: the register verb prints the bare id — `registered blueprint <id> (<path>)`.
|
||||
assert!(!stdout.contains("content:"), "register prints the bare id, no content: prefix: {stdout}");
|
||||
@@ -454,7 +454,7 @@ fn graph_register_stores_and_prints_content_id() {
|
||||
#[test]
|
||||
fn graph_register_is_idempotent() {
|
||||
let dir = temp_cwd("register-idempotent");
|
||||
let bp = fixture("sma_signal.json");
|
||||
let bp = example("r_sma.json");
|
||||
let (out1, err1, code1) = run_in(&dir, &["graph", "register", &bp]);
|
||||
let (out2, err2, code2) = run_in(&dir, &["graph", "register", &bp]);
|
||||
assert_eq!(code1, Some(0), "first register: {out1} {err1}");
|
||||
@@ -471,7 +471,7 @@ fn graph_register_is_idempotent() {
|
||||
fn graph_params_lists_raw_axis_namespace() {
|
||||
let dir = temp_cwd("params");
|
||||
let (stdout, stderr, code) =
|
||||
run_in(&dir, &["graph", "introspect", "--params", &fixture("sma_signal_open.json")]);
|
||||
run_in(&dir, &["graph", "introspect", "--params", &example("r_sma_open.json")]);
|
||||
assert_eq!(code, Some(0), "stdout: {stdout} stderr: {stderr}");
|
||||
assert_eq!(stdout, "fast.length:I64\nslow.length:I64\n", "the raw open params, in order");
|
||||
}
|
||||
@@ -482,7 +482,7 @@ fn graph_params_lists_raw_axis_namespace() {
|
||||
#[test]
|
||||
fn graph_content_id_accepts_a_blueprint_file() {
|
||||
let dir = temp_cwd("content-id-file");
|
||||
let bp = fixture("sma_signal.json");
|
||||
let bp = example("r_sma.json");
|
||||
let (reg_out, reg_err, reg_code) = run_in(&dir, &["graph", "register", &bp]);
|
||||
assert_eq!(reg_code, Some(0), "register: {reg_out} {reg_err}");
|
||||
let (id_out, id_err, id_code) = run_in(&dir, &["graph", "introspect", "--content-id", &bp]);
|
||||
@@ -512,7 +512,7 @@ fn graph_introspect_mode_guard_still_exits_two_on_zero_or_two_modes() {
|
||||
#[test]
|
||||
fn graph_params_by_content_id_matches_params_by_file() {
|
||||
let dir = temp_cwd("params-by-id");
|
||||
let bp = fixture("sma_signal_open.json");
|
||||
let bp = example("r_sma_open.json");
|
||||
let (reg_out, reg_err, reg_code) = run_in(&dir, &["graph", "register", &bp]);
|
||||
assert_eq!(reg_code, Some(0), "register: {reg_out} {reg_err}");
|
||||
let id = registered_id(®_out);
|
||||
@@ -533,7 +533,7 @@ fn graph_params_by_content_id_matches_params_by_file() {
|
||||
#[test]
|
||||
fn graph_params_tolerates_content_prefix_on_target() {
|
||||
let dir = temp_cwd("params-content-prefix");
|
||||
let bp = fixture("sma_signal_open.json");
|
||||
let bp = example("r_sma_open.json");
|
||||
let (reg_out, reg_err, reg_code) = run_in(&dir, &["graph", "register", &bp]);
|
||||
assert_eq!(reg_code, Some(0), "register: {reg_out} {reg_err}");
|
||||
let id = registered_id(®_out);
|
||||
|
||||
@@ -118,7 +118,7 @@ fn project_registry_anchors_at_discovered_root_not_invocation_cwd() {
|
||||
let runs_dir = dir.join("runs");
|
||||
std::fs::remove_dir_all(&runs_dir).ok();
|
||||
let open_bp =
|
||||
format!("{}/tests/fixtures/sma_signal_open.json", env!("CARGO_MANIFEST_DIR"));
|
||||
format!("{}/examples/r_sma_open.json", env!("CARGO_MANIFEST_DIR"));
|
||||
let out = Command::new(env!("CARGO_BIN_EXE_aura"))
|
||||
.args([
|
||||
"sweep",
|
||||
|
||||
@@ -372,7 +372,7 @@ fn campaign_validate_in_project_reports_referential_tier_end_to_end() {
|
||||
// Seed one real, content-addressed, open-param blueprint into the
|
||||
// project's own store via a real sweep (mirrors `project_load.rs`'s
|
||||
// anchor test).
|
||||
let open_bp = format!("{}/tests/fixtures/sma_signal_open.json", env!("CARGO_MANIFEST_DIR"));
|
||||
let open_bp = format!("{}/examples/r_sma_open.json", env!("CARGO_MANIFEST_DIR"));
|
||||
let (sweep_out, sweep_code) = run_code_in(
|
||||
dir,
|
||||
&[
|
||||
@@ -798,7 +798,7 @@ fn campaign_register_refuses_invalid_risk_section_and_writes_nothing() {
|
||||
/// Seed one open-param blueprint into the built demo project's store via a
|
||||
/// real sweep and return its content id (the referential test's recipe).
|
||||
fn seed_blueprint(dir: &Path, name: &str) -> String {
|
||||
let open_bp = format!("{}/tests/fixtures/sma_signal_open.json", env!("CARGO_MANIFEST_DIR"));
|
||||
let open_bp = format!("{}/examples/r_sma_open.json", env!("CARGO_MANIFEST_DIR"));
|
||||
let (out, code) = run_code_in(
|
||||
dir,
|
||||
&[
|
||||
@@ -2176,7 +2176,7 @@ fn campaign_run_accepts_a_graph_register_seeded_strategy() {
|
||||
ScratchPath::File(dir.join("onramp.process.json")),
|
||||
ScratchPath::File(dir.join("onramp.campaign.json")),
|
||||
]);
|
||||
let open_bp = format!("{}/tests/fixtures/sma_signal_open.json", env!("CARGO_MANIFEST_DIR"));
|
||||
let open_bp = format!("{}/examples/r_sma_open.json", env!("CARGO_MANIFEST_DIR"));
|
||||
let (reg_out, reg_code) = run_code_in(dir, &["graph", "register", &open_bp]);
|
||||
assert_eq!(reg_code, Some(0), "graph register failed: {reg_out}");
|
||||
let bp_id = reg_out
|
||||
|
||||
Reference in New Issue
Block a user