ea1ca32dbd
Iteration-1 §A of the construction service (#157): the surface-agnostic shared predicates the eager op-script path and the holistic finalize gates both call — no second validator (C24). - edge_kind_check (blueprint.rs): the per-edge producer/consumer kind check, lifted verbatim out of validate_wiring's edge loop into a pub(crate) fn that validate_wiring now calls — behaviour-preserving (same Bootstrap(KindMismatch) variant; the existing compile-time gate test stays green). - resolve_input_slot / resolve_output_field (builder.rs): the exactly-one-match name→index resolution extracted as pub(crate) fns over (&NodeSchema, &str), so the runtime-String op-script names share GraphBuilder's resolution; GraphBuilder delegates and maps to the unchanged BuildError variants. - try_bind + BindOpError (aura-core node.rs): the fallible Result twin of bind (bind keeps its panic contract and pinned messages verbatim; try_bind is a separate method reporting the same three conditions as values). - check_param_namespace_injective + validate_wiring widened to pub(crate) for the finalize-stage reuse by the upcoming GraphSession::finish (§B). Partial iteration: §B (the GraphSession/Op/replay surface + introspection) and the §A→§B integration land next (plan Tasks 4-8). compile_with_params / check_ports_connected are behaviourally unchanged. Full suite green; clippy clean. Plan correction folded in: Task 3's test originally referenced aura_std::Sma — infeasible inside aura-core (aura-std depends on aura-core; the reverse edge is a dependency cycle). Adapted to a local PrimitiveBuilder probe with identical assertions. refs #157
51 lines
1.9 KiB
Rust
51 lines
1.9 KiB
Rust
//! `aura-core` — the shared contract every aura component links against.
|
|
//!
|
|
//! This crate is the boundary forced by the cdylib hot-reload model: both the
|
|
//! engine and every hot-reloadable node cdylib depend on it, so it stays small
|
|
//! and stable.
|
|
//!
|
|
//! Delivered so far (cycle 0001 — the streaming substrate):
|
|
//!
|
|
//! - the four scalar base types streamed as SoA: [`Scalar`] / [`ScalarKind`] /
|
|
//! [`Timestamp`] (C7);
|
|
//! - [`Column`] — a fixed-capacity, bounded-lookback ring with financial
|
|
//! indexing (index 0 = newest) and a `run_count` freshness primitive (C5/C8),
|
|
//! read zero-copy through a [`Window`];
|
|
//! - [`AnyColumn`] — the type-erased edge over the four column kinds, with an
|
|
//! edge-time kind check ([`KindMismatch`]) (C7).
|
|
//!
|
|
//! Delivered in cycle 0002 — the node contract:
|
|
//!
|
|
//! - [`Node`] — the `lookbacks`/`eval` contract every node implements (C8); the
|
|
//! static signature ([`NodeSchema`] / [`PortSpec`] declaring input ports by kind
|
|
//! and the output record of [`FieldSpec`] columns; length 1 = scalar) is declared
|
|
//! on the node's [`PrimitiveBuilder`], pre-build;
|
|
//! - [`Ctx`] — the per-`eval` read-side: zero-copy, financial-indexed [`Window`]
|
|
//! access into each input (closing the cycle-0001 read-side gap on
|
|
//! [`AnyColumn`]).
|
|
//!
|
|
//! Still to come (subsequent cycles): the broker-independent
|
|
//! position-event output and downstream broker nodes (C10), and the run registry
|
|
//! (C18/C22).
|
|
|
|
mod any;
|
|
mod cell;
|
|
mod column;
|
|
mod ctx;
|
|
mod error;
|
|
mod node;
|
|
mod scalar;
|
|
mod series_fold;
|
|
|
|
pub use any::AnyColumn;
|
|
pub use cell::Cell;
|
|
pub use column::{Column, Window};
|
|
pub use ctx::Ctx;
|
|
pub use error::KindMismatch;
|
|
pub use node::{
|
|
zip_params, BindOpError, BoundParam, FieldSpec, Firing, Node, NodeSchema, ParamSpec, PortSpec,
|
|
PrimitiveBuilder,
|
|
};
|
|
pub use scalar::{Scalar, ScalarKind, Timestamp};
|
|
pub use series_fold::SeriesFold;
|