Files
Aura/fieldtests/milestone-stderr-honesty/drivers/example1_marker_separability.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

39 lines
1.9 KiB
Bash
Executable File

#!/usr/bin/env bash
# Example 1 — Mission (1): a consumer separates benign notices from real faults
# by FORM alone (grep / CI log scan), and checks exit codes against the binary's
# own conventions.
#
# Finding proven here: the two markers cannot co-occur in ONE invocation (the
# only note-emitting verb, walkforward, is single-cell all-or-nothing: the note
# fires only when every window SUCCEEDS with zero trades, i.e. exit 0; any
# warning implies a cell/fold failure, i.e. exit 3). So separability is shown
# the way the promise's "CI log scan" actually consumes it: over the accumulated
# stderr of several runs.
set -u
AURA="${AURA:?set AURA to the release binary path}"
HERE="$(cd "$(dirname "$0")/.." && pwd)"
WORK="$(mktemp -d)"; trap 'rm -rf "$WORK"' EXIT
LOG="$HERE/captured/example1_combined.log"
# Build the synthetic zero-trade strategy from its canonical op-list.
"$AURA" graph build < "$HERE/ops/flat.ops.json" > "$WORK/flat.json"
# A real project is required to reach the `aura: warning:` class at all
# (synthetic member panics are uncaught — see example 3). Scaffold one.
( cd "$WORK" && "$AURA" new proj >/dev/null )
: > "$LOG"
echo "### run A: zero-trade walkforward (synthetic) — expect note, exit 0" >> "$LOG"
"$AURA" walkforward "$WORK/flat.json" --axis graph.sma.length=2,3,5 >/dev/null 2>>"$LOG"
echo "# exitA=$?" >> "$LOG"
echo "### run B: real sweep with a poison axis member — expect warning, exit 3" >> "$LOG"
( cd "$WORK/proj" && "$AURA" sweep blueprints/signal.json --real EURUSD \
--from 1577836800000 --to 1609459200000 --axis proj_signal.fast.length=0,2 \
>/dev/null 2>>"$HERE/captured/example1_runB.err" )
echo "# exitB=$?" >> "$LOG"
cat "$HERE/captured/example1_runB.err" >> "$LOG"
echo "=== combined log ==="; cat "$LOG"
echo "=== benign notices (grep '^aura: note: ') ==="; grep '^aura: note: ' "$LOG" || true
echo "=== real faults (grep '^aura: warning: ') ==="; grep '^aura: warning: ' "$LOG" || true