Files
Aura/fieldtests/cycle-283-tap-subscribers/tap_consumer/examples/refusal_probe.rs
T
claude 8c19260e8d fieldtest: tap-subscribers — 5 examples, 0 bugs / 2 friction / 3 spec-gap
Cycle-close fieldtest for #283 + #77 (tap subscribers), exercising the new
tap surface as a downstream consumer over the public interface only (design
ledger, glossary, cargo doc, example corpus — never the crate sources).

Five examples, one per axis, all built and run against worktree HEAD bd0c557:
- tap_1_record_spread.ops.json    — record → runs/traces/graph/spread.json
- tap_4_measure_ic.ops.json       — two-tap run → aura measure ic (clean IC)
- tap_consumer/src/tap_2_fold.rs  — Named{mean}/Named{count} via run_signal_r
- tap_consumer/src/tap_3_live.rs  — Live(closure); bit-identical to fold + record
- tap_consumer/examples/refusal_probe.rs — unknown-label refusal (exit 1, no write)

The consumer crate is a detached workspace (own empty [workspace], path-deps on
aura-core/-engine/-runner), exactly as a real World program; it is not a
workspace member and does not build under `cargo build --workspace`. Verified
here with a fresh `cargo build --bins --examples` (Finished, 0 errors).

No merge-blocking defect: record/fold/live/measure over the shared pair are
correct and deterministic. Follow-ups filed at cycle close:
- #309 (feature) — a plain `aura run` echoes no recorded trace handle (F1+SG1)
- #310 (idea)    — Named fold has no data/CLI reach; ratify Rust-only vs selector (SG2)
- #311 (bug)     — same-name re-run orphans still-chartable tap files (SG3, pre-existing)
- #297 (comment) — library refusal = process::exit, not Result (F2, already tracked)
2026-07-22 00:40:04 +02:00

22 lines
971 B
Rust

//! Ergonomics probe for the fold axis: what does a downstream *library*
//! consumer get when it subscribes an unknown fold label? A `Result` it can
//! handle, or a whole-process termination? (C28 tracks the ~24 process-exit
//! refusal sites as deferred #297.)
//!
//! Usage: cargo run --example refusal_probe -- <blueprint.json>
use aura_engine::blueprint_from_json;
use aura_runner::member::{run_signal_r, RunData};
use aura_runner::project::Env;
use aura_runner::{TapPlan, TapSubscription};
fn main() {
let json = std::fs::read_to_string(std::env::args().nth(1).unwrap()).unwrap();
let env = Env::std();
let signal = blueprint_from_json(&json, &|id| env.resolve(id)).unwrap();
let mut plan = TapPlan::empty();
plan.subscribe("signal", TapSubscription::named("median")); // not in the core roster
let _ = run_signal_r(signal, &[], RunData::Synthetic, 0, &env, plan);
println!("RETURNED NORMALLY (no refusal surfaced to the caller)");
}