Files
Aura/fieldtests/milestone-stderr-honesty/drivers/example2_zero_trade_walkforward.sh
T
claude 7e1dd25a76 fieldtest: milestone-stderr-honesty — 3 examples, 1 bug / 2 friction / 2 spec-gap
Milestone fieldtest for "Surface honesty on stderr", run source-blind
against the release binary only (binary-only knowledge floor, user
direction 2026-07-23): op-lists authored via the binary's own graph
build/introspect surfaces, project + real archive reached through help
alone. Markers grep-separable, zero-trade notice exact, abort paths
correctly unmarked (4x working). Findings routed: synthetic member-fault
panic (exit 101, source-path leak) -> debug; null-result and
partial-failure widening -> tracker; op-script discoverability ->
#323 evidence; silent unknown-op-field drop -> tracker; plural nit ->
tidy. refs #278, refs #313
2026-07-24 00:04:53 +02:00

33 lines
1.8 KiB
Bash
Executable File

#!/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"