Generalize the trace store into a recorded-stream store for all engine inputs #320
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observation
aura cannot assume where input data comes from or how fast it arrives. The only market-data path today reads Pepperstone
.m1/.tickarchives through the externaldata-servercrate (a cargo git dependency,crates/aura-ingest/Cargo.toml) — a filesystem loader with an in-process RAM cache (FileCache). Verified 2026-07-23 on the development host: the default archive directory resolves to an NFS4 automount (findmnt: fstypenfs4,hardmount option), so every cold read crosses the network, the cache amortizes only within one process lifetime, and a NAS outage makes reads hang rather than fail. There is no HTTP/network client anywhere in the workspace (grep forreqwest|ureq|hyper|TcpStreamovercrates/and the data-server repo returns nothing) — the network dependency is the mount itself.The record-then-replay contract (C11,
docs/design/contracts/c11-sources-record-replay.md) already states the law this calls for: anything nondeterministic, external, or slow is materialized into a recorded, timestamped stream before it enters the engine. Its current-state note marks the recording direction — a live source materialized for later replay — as design law that has not yet landed. C26 (docs/design/contracts/c26-input-binding.md) names the deferred extension point: the input-binding value-space grows "additively from archive columns to recorded-stream references".Proposal
Generalize what
data-serverdoes specifically for Pepperstone data into an aura-owned recorded-stream store, layered so that no performance or availability assumption survives above the recording edge:Arc<[T]>sharing across sim-family members (the C12 residency guarantee,docs/design/contracts/c12-atomic-sim-unit.md, today provided by data-server'sFileCache), lazy windowedSourceimpls.The engine is untouched: layer 3 feeds
bind_sourcesand the single k-way ingestion merge (C3,docs/design/contracts/c03-single-merge.md) exactly asM1FieldSourcedoes today.Import is itself a run. A recording is produced by a trivial harness (source → recording sink) whose tap trace is the recorded stream. This keeps C22's identity intact for inputs — "displayable = exactly what a sink recorded" (
docs/design/contracts/c22-playground-traces.md) — and produces the recording's manifest through the existing run-manifest machinery instead of a parallel metadata scheme.Directions settled at filing (2026-07-23)
docs/design/contracts/c01-determinism.md) requires the input's identity to be pinned — a transparent cache cannot provide that. The performance benefit of a cache is retained anyway, since replay reads only the recording. Closed monthly archives are the easy case: identity(archive file, hash)never invalidates; only a growing source needs the new-recording rule.Arc<[T]>guarantee already lives. "Pepperstone import" reduces to reading the archive into the store; the replay path never touches the Pepperstone format again.Open decisions
TraceStorelives inaura-registry— the process column, which per the stratification contract (C28,docs/design/contracts/c28-stratification.md) consumes run artifacts, not market streams; the market layer must not import the process column. Candidate resolution: the container mechanics (format, index, chunk cache, serving) become a base crate, with run traces and recorded inputs as two namespaces/clients of one container;aura-registry's trace store becomes a thin run-scoped view over it.Relations
Sourceseam) is the migration template: its acceptance discipline — suite byte-identity across the seam change — carries over as "store-served replay is byte-identical to data-server-served replay" before the data-server is retired.