#!/usr/bin/env bash # Example 2 — Mission (2): a walk-forward whose every window records zero trades # must announce itself with an explicit notice; one that trades must not; exit # code stays success either way. Blueprints authored via the binary's own # op-script surface (`aura graph build`). set -u AURA="${AURA:?set AURA to the release binary path}" HERE="$(cd "$(dirname "$0")/.." && pwd)" WORK="$(mktemp -d)"; trap 'rm -rf "$WORK"' EXIT "$AURA" graph build < "$HERE/ops/flat.ops.json" > "$WORK/flat.json" "$AURA" graph build < "$HERE/ops/momentum.ops.json" > "$WORK/momentum.json" cd "$WORK" # synthetic families record to ./runs — keep them in the temp dir echo "=== A: flat (zero-trade) walkforward — expect note + exit 0 ===" "$AURA" walkforward "$WORK/flat.json" --axis graph.sma.length=2,3,5 \ >/dev/null 2>"$HERE/captured/example2_flat.err" echo "# exit=$?"; cat "$HERE/captured/example2_flat.err" echo "=== B: momentum (trades) walkforward — expect NO note + exit 0 ===" "$AURA" walkforward "$WORK/momentum.json" --axis graph.sma.length=2,3,5 \ >/dev/null 2>"$HERE/captured/example2_momentum.err" echo "# exit=$?"; cat "$HERE/captured/example2_momentum.err"; echo "(stderr empty above = no note)" echo "=== C: single-window edge — expect the 'all 1 windows' plural nit ===" # The synthetic roller always yields 3 windows; a sub-120-day REAL window yields # exactly one OOS window, which exposes the ungrammatical "all 1 ... windows". ( cd "$WORK" && "$AURA" new proj >/dev/null ) ( cd "$WORK/proj" && "$AURA" walkforward blueprints/signal.json --real EURUSD \ --from 1577836800000 --to 1583020800000 --axis proj_signal.fast.length=4 \ >/dev/null 2>"$HERE/captured/example2_singular.err" ) echo "# exit=$?"; cat "$HERE/captured/example2_singular.err"