27f850dc52
Generalises the #105 foot-gun: the family-member trace key was derived from two hardcoded axis names (f{fast}s{slow}), collision-free only over the built-in SMA grid. It is now derived from the axes that actually VARY (SweepBinder::varying_axes) and rendered as a filesystem-conformant directory component: - charset restricted to [A-Za-z0-9._-] (valid on Linux/Windows/macOS, also URL-path- and cloud-sync-safe); any other byte sanitised; - case-less values (i64/timestamp decimal, bool true/false, f64 via Display, no scientific notation) so two members of one family never differ only by letter case -> no silent overwrite on case-insensitive filesystems (NTFS/APFS); - length-capped (MAX_KEY=200) with a version-stable FNV-1a fallback for the unbounded-grid edge. Pinned singleton axes are omitted; the SMA sweep's member dirs change from f2s4 to signals.trend.fast.length-2_signals.trend.slow.length-4 (its --trace integration test + the stale prose updated accordingly). Adds the first aura-std node with a bool *param*, LongOnly (a long-only exposure gate: enabled=true clamps short exposure to >=0, false passes through) — the block the momentum demo strategy (next commit) sweeps to prove the key generic over a bool axis. The engine change is one additive pure read accessor; no existing signature changes, trace state stays out of the engine. Self-verified: cargo build --workspace, cargo test --workspace (all green incl. the LongOnly node tests, the member_key worked-examples corpus, the varying_axes accessor test, and the updated SMA sweep-trace integration test), cargo clippy --workspace --all-targets -D warnings. refs #105
50 lines
1.4 KiB
Rust
50 lines
1.4 KiB
Rust
//! `aura-std` — the standard node library shipped with the engine.
|
|
//!
|
|
//! The universal, batteries-included building blocks every project gets for
|
|
//! free: common indicators (SMA, ATR, RSI, …), resamplers, the `SessionNode`,
|
|
//! standard combinators, and broker nodes (the sim-optimal broker + realistic
|
|
//! broker profiles). Depends only on `aura-core` (the shared contract).
|
|
//!
|
|
//! This is the top tier of the three-tier node-reuse model (contract C16):
|
|
//!
|
|
//! - `aura-std` — universal blocks, here, ship with the engine;
|
|
//! - shared node crates — cross-project-reusable blocks, in their own repos,
|
|
//! pulled in as cargo git dependencies;
|
|
//! - project-local `nodes/` — experimental, project-specific blocks.
|
|
//!
|
|
//! The first block lands with the walking skeleton: [`Sma`], the simple moving
|
|
//! average — a worked producer node proving the `aura-core` `Node` contract.
|
|
|
|
mod add;
|
|
mod and;
|
|
mod delay;
|
|
mod ema;
|
|
mod eqconst;
|
|
mod exposure;
|
|
mod gt;
|
|
mod latch;
|
|
mod lincomb;
|
|
mod longonly;
|
|
mod recorder;
|
|
mod resample;
|
|
mod session;
|
|
mod sim_broker;
|
|
mod sma;
|
|
mod sub;
|
|
pub use add::Add;
|
|
pub use and::And;
|
|
pub use delay::Delay;
|
|
pub use ema::Ema;
|
|
pub use eqconst::EqConst;
|
|
pub use exposure::Exposure;
|
|
pub use gt::Gt;
|
|
pub use latch::Latch;
|
|
pub use lincomb::LinComb;
|
|
pub use longonly::LongOnly;
|
|
pub use recorder::Recorder;
|
|
pub use resample::Resample;
|
|
pub use session::Session;
|
|
pub use sim_broker::SimBroker;
|
|
pub use sma::Sma;
|
|
pub use sub::Sub;
|