fieldtest: 316-self-description — 4 examples, 1 bug / 3 friction / 1 spec-gap
Consumer-seat run over all four C29 seams (load, register, op-script doc, document description) from the public interface only. The three working findings verify the #314 failure class removed end to end; the findings route: guide sync + refusal-prose neutrality + doc_gate short-name parity this run, discoverability surfaces to the tracker. refs #316
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
{"format_version":1,"blueprint":{"name":"graph","nodes":[{"primitive":{"type":"lab316_nodes::Scale","name":"scaled","bound":[{"pos":0,"name":"factor","kind":"F64","value":{"F64":2.0}}]}},{"primitive":{"type":"Bias","name":"bias","bound":[{"pos":0,"name":"scale","kind":"F64","value":{"F64":1.0}}]}}],"edges":[{"from":0,"to":1,"slot":0,"from_field":0}],"input_roles":[{"name":"price","targets":[{"node":0,"slot":0}],"source":"F64"}],"output":[{"node":1,"field":0,"name":"bias"}]}}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
[
|
||||||
|
{"op": "source", "role": "price", "kind": "F64"},
|
||||||
|
{"op": "add", "type": "lab316_nodes::Scale", "name": "scaled", "bind": {"factor": {"F64": 2.0}}},
|
||||||
|
{"op": "feed", "role": "price", "into": ["scaled.value"]},
|
||||||
|
{"op": "add", "type": "Bias", "name": "bias", "bind": {"scale": {"F64": 1.0}}},
|
||||||
|
{"op": "connect", "from": "scaled.value", "to": "bias.signal"},
|
||||||
|
{"op": "expose", "from": "bias.bias", "as": "bias"}
|
||||||
|
]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"format_version":1,"blueprint":{"name":"graph","nodes":[{"primitive":{"type":"SMA","name":"fast"}},{"primitive":{"type":"SMA","name":"slow"}},{"primitive":{"type":"Sub","name":"sub"}},{"primitive":{"type":"Bias","name":"bias"}}],"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"}]}}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
{"op": "source", "role": "price", "kind": "F64"},
|
||||||
|
{"op": "add", "type": "SMA", "name": "fast"},
|
||||||
|
{"op": "add", "type": "SMA", "name": "slow"},
|
||||||
|
{"op": "feed", "role": "price", "into": ["fast.series", "slow.series"]},
|
||||||
|
{"op": "add", "type": "Sub", "name": "sub"},
|
||||||
|
{"op": "connect", "from": "fast.value", "to": "sub.lhs"},
|
||||||
|
{"op": "connect", "from": "slow.value", "to": "sub.rhs"},
|
||||||
|
{"op": "add", "type": "Bias", "name": "bias"},
|
||||||
|
{"op": "connect", "from": "sub.value", "to": "bias.signal"},
|
||||||
|
{"op": "expose", "from": "bias.bias", "as": "bias"}
|
||||||
|
]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"format_version":1,"blueprint":{"name":"graph","doc":"fast/slow SMA crossover spread turned into a bounded directional bias","nodes":[{"primitive":{"type":"SMA","name":"fast"}},{"primitive":{"type":"SMA","name":"slow"}},{"primitive":{"type":"Sub","name":"sub"}},{"primitive":{"type":"Bias","name":"bias"}}],"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"}]}}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[
|
||||||
|
{"op": "source", "role": "price", "kind": "F64"},
|
||||||
|
{"op": "add", "type": "SMA", "name": "fast"},
|
||||||
|
{"op": "add", "type": "SMA", "name": "slow"},
|
||||||
|
{"op": "feed", "role": "price", "into": ["fast.series", "slow.series"]},
|
||||||
|
{"op": "add", "type": "Sub", "name": "sub"},
|
||||||
|
{"op": "connect", "from": "fast.value", "to": "sub.lhs"},
|
||||||
|
{"op": "connect", "from": "slow.value", "to": "sub.rhs"},
|
||||||
|
{"op": "add", "type": "Bias", "name": "bias"},
|
||||||
|
{"op": "connect", "from": "sub.value", "to": "bias.signal"},
|
||||||
|
{"op": "doc", "text": "fast/slow SMA crossover spread turned into a bounded directional bias"},
|
||||||
|
{"op": "expose", "from": "bias.bias", "as": "bias"}
|
||||||
|
]
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"format_version": 1,
|
||||||
|
"kind": "campaign",
|
||||||
|
"name": "smacross-explore",
|
||||||
|
"description": "",
|
||||||
|
"seed": 42,
|
||||||
|
"data": { "instruments": ["GER40"], "windows": [ { "from_ms": 1725148800000, "to_ms": 1727740800000 } ] },
|
||||||
|
"strategies": [ { "ref": { "content_id": "088632cb7d6b553bfbfdb3cb4d737aec20f355c555f424483a48692dbf3a150d" }, "axes": { "fast.length": { "kind": "I64", "values": [2, 4] } } } ],
|
||||||
|
"process": { "ref": { "content_id": "088632cb7d6b553bfbfdb3cb4d737aec20f355c555f424483a48692dbf3a150d" } },
|
||||||
|
"presentation": { "persist_taps": ["equity"], "emit": ["family_table"] }
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"format_version": 1,
|
||||||
|
"kind": "campaign",
|
||||||
|
"name": "smacross-explore",
|
||||||
|
"description": "GER40 SMA-crossover parameter exploration",
|
||||||
|
"seed": 42,
|
||||||
|
"data": { "instruments": ["GER40"], "windows": [ { "from_ms": 1725148800000, "to_ms": 1727740800000 } ] },
|
||||||
|
"strategies": [ { "ref": { "content_id": "088632cb7d6b553bfbfdb3cb4d737aec20f355c555f424483a48692dbf3a150d" }, "axes": { "fast.length": { "kind": "I64", "values": [2, 4] } } } ],
|
||||||
|
"process": { "ref": { "content_id": "088632cb7d6b553bfbfdb3cb4d737aec20f355c555f424483a48692dbf3a150d" } },
|
||||||
|
"presentation": { "persist_taps": ["equity"], "emit": ["family_table"] }
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"format_version": 1,
|
||||||
|
"kind": "campaign",
|
||||||
|
"name": "smacross-explore",
|
||||||
|
|
||||||
|
"seed": 42,
|
||||||
|
"data": { "instruments": ["GER40"], "windows": [ { "from_ms": 1725148800000, "to_ms": 1727740800000 } ] },
|
||||||
|
"strategies": [ { "ref": { "content_id": "088632cb7d6b553bfbfdb3cb4d737aec20f355c555f424483a48692dbf3a150d" }, "axes": { "fast.length": { "kind": "I64", "values": [2, 4] } } } ],
|
||||||
|
"process": { "ref": { "content_id": "088632cb7d6b553bfbfdb3cb4d737aec20f355c555f424483a48692dbf3a150d" } },
|
||||||
|
"presentation": { "persist_taps": ["equity"], "emit": ["family_table"] }
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"format_version": 1,
|
||||||
|
"kind": "campaign",
|
||||||
|
"name": "smacross-explore",
|
||||||
|
"description": "smacross-explore",
|
||||||
|
"seed": 42,
|
||||||
|
"data": { "instruments": ["GER40"], "windows": [ { "from_ms": 1725148800000, "to_ms": 1727740800000 } ] },
|
||||||
|
"strategies": [ { "ref": { "content_id": "088632cb7d6b553bfbfdb3cb4d737aec20f355c555f424483a48692dbf3a150d" }, "axes": { "fast.length": { "kind": "I64", "values": [2, 4] } } } ],
|
||||||
|
"process": { "ref": { "content_id": "088632cb7d6b553bfbfdb3cb4d737aec20f355c555f424483a48692dbf3a150d" } },
|
||||||
|
"presentation": { "persist_taps": ["equity"], "emit": ["family_table"] }
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"format_version": 1,
|
||||||
|
"kind": "process",
|
||||||
|
"name": "explore-only-sweep",
|
||||||
|
"description": "",
|
||||||
|
"pipeline": [ { "block": "std::sweep" } ]
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"format_version": 1,
|
||||||
|
"kind": "process",
|
||||||
|
"name": "explore-only-sweep",
|
||||||
|
"description": "records the full axes family without choosing a winner",
|
||||||
|
"pipeline": [ { "block": "std::sweep" } ]
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"format_version": 1,
|
||||||
|
"kind": "process",
|
||||||
|
"name": "explore-only-sweep",
|
||||||
|
"description": "explore-only-sweep",
|
||||||
|
"pipeline": [ { "block": "std::sweep" } ]
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/target
|
||||||
|
Cargo.lock
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# lab316-nodes — an aura node crate
|
||||||
|
|
||||||
|
Native node logic for an aura research project (extension-dev role). This
|
||||||
|
crate is attached to its project via `[nodes]` in the project's `Aura.toml`.
|
||||||
|
|
||||||
|
- Build: `cargo build` (the next `aura` invocation in the project loads the
|
||||||
|
fresh dylib)
|
||||||
|
- Each node is registered in `vocabulary()`/`type_ids()` under the
|
||||||
|
`lab316_nodes::` namespace prefix; blueprints reference nodes by that id.
|
||||||
|
- This crate has no data-plane dependencies — nodes are pure stream
|
||||||
|
transformers over read-only input windows.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
[package]
|
||||||
|
name = "lab316-nodes"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
publish = false
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
aura-core = { path = "/home/brummel/dev/aura/.claude/worktrees/issue-316-self-description/crates/aura-core" }
|
||||||
|
|
||||||
|
# Standalone workspace root: never a member of an enclosing workspace.
|
||||||
|
[workspace]
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
//! lab316-nodes — an aura research project: node logic + the exported vocabulary.
|
||||||
|
//!
|
||||||
|
//! Every node type this crate provides is registered in `vocabulary()` /
|
||||||
|
//! `type_ids()` under the `lab316_nodes::` namespace prefix; the `aura` host loads
|
||||||
|
//! this cdylib per invocation and merges it with the std vocabulary.
|
||||||
|
|
||||||
|
use aura_core::{
|
||||||
|
Cell, Ctx, FieldSpec, Firing, Node, NodeSchema, ParamSpec, PortSpec, PrimitiveBuilder,
|
||||||
|
ScalarKind,
|
||||||
|
};
|
||||||
|
|
||||||
|
/// One-input scalar gain: emits `input * factor`. Emits `None` until its
|
||||||
|
/// input has a value (warm-up filter, C8).
|
||||||
|
pub struct Scale {
|
||||||
|
factor: f64,
|
||||||
|
out: [Cell; 1],
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Scale {
|
||||||
|
pub fn new(factor: f64) -> Self {
|
||||||
|
Self { factor, out: [Cell::from_f64(0.0)] }
|
||||||
|
}
|
||||||
|
// Replace `doc` below when renaming this sample node — it must keep
|
||||||
|
// describing the node's own behaviour, not this scaffolding step.
|
||||||
|
pub fn builder() -> PrimitiveBuilder {
|
||||||
|
PrimitiveBuilder::new(
|
||||||
|
"lab316_nodes::Scale",
|
||||||
|
NodeSchema {
|
||||||
|
inputs: vec![PortSpec {
|
||||||
|
kind: ScalarKind::F64,
|
||||||
|
firing: Firing::Any,
|
||||||
|
name: "value".into(),
|
||||||
|
}],
|
||||||
|
output: vec![FieldSpec { name: "value".into(), kind: ScalarKind::F64 }],
|
||||||
|
params: vec![ParamSpec { name: "factor".into(), kind: ScalarKind::F64 }],
|
||||||
|
doc: "scalar gain: emits the input times the factor param",
|
||||||
|
},
|
||||||
|
|p| Box::new(Scale::new(p[0].f64())),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Node for Scale {
|
||||||
|
fn lookbacks(&self) -> Vec<usize> {
|
||||||
|
vec![1]
|
||||||
|
}
|
||||||
|
fn eval(&mut self, ctx: Ctx<'_>) -> Option<&[Cell]> {
|
||||||
|
let w = ctx.f64_in(0);
|
||||||
|
if w.is_empty() {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
self.out[0] = Cell::from_f64(w[0] * self.factor);
|
||||||
|
Some(&self.out)
|
||||||
|
}
|
||||||
|
fn label(&self) -> String {
|
||||||
|
format!("lab316_nodes::Scale({})", self.factor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn vocabulary(type_id: &str) -> Option<PrimitiveBuilder> {
|
||||||
|
match type_id {
|
||||||
|
"lab316_nodes::Scale" => Some(Scale::builder()),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn type_ids() -> &'static [&'static str] {
|
||||||
|
&["lab316_nodes::Scale"]
|
||||||
|
}
|
||||||
|
|
||||||
|
aura_core::aura_project! {
|
||||||
|
namespace: "lab316_nodes",
|
||||||
|
vocabulary: vocabulary,
|
||||||
|
type_ids: type_ids,
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/runs
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Static project context only (C17); paths only.
|
||||||
|
[paths]
|
||||||
|
runs = "runs"
|
||||||
|
# data = "/path/to/archive" # the recorded-data root; defaults to the built-in path
|
||||||
|
|
||||||
|
[nodes]
|
||||||
|
crates = ["../lab316-nodes"]
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# lab316 — an aura research project (data-only)
|
||||||
|
|
||||||
|
This directory is an aura project: blueprints + research documents over the
|
||||||
|
std vocabulary, anchored by `Aura.toml`. There is no crate and no build step.
|
||||||
|
|
||||||
|
- Run: `aura run blueprints/signal.json` (the starter is closed — all
|
||||||
|
params bound; bound values are defaults — any `--axis` may override them
|
||||||
|
(#246))
|
||||||
|
- Sweep: `aura sweep blueprints/signal.json --axis lab316_signal.fast.length=2,4,8`
|
||||||
|
(`aura sweep <bp> --list-axes` lists the open + bound-overridable axes)
|
||||||
|
- Native nodes: when the project needs its first project-specific node,
|
||||||
|
`aura nodes new <name>` scaffolds a node crate beside this project and
|
||||||
|
attaches it via `[nodes]` in `Aura.toml` (build it with `cargo build`).
|
||||||
|
- Topology is data (`blueprints/*.json`); results land in `runs/`.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"format_version":1,"blueprint":{"name":"lab316_signal","doc":"fast/slow SMA difference clamped into a directional bias","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"}]}}
|
||||||
Reference in New Issue
Block a user