Files
Aura/crates/aura-ingest/tests/instrument_geometry.rs
T
Brummel 7e4b91ab5f feat(0074): source real-path pip from the geometry sidecar; drop the authored floor
The data-server now ships per-symbol geometry sidecars, so aura no longer
hard-codes instrument geometry. A consumption grep showed production reads
exactly one `InstrumentSpec` field — `pip_size` — at the real-data path; the
other eight (incl. `instrument_id`) were constructed but never read.

- aura-cli resolves the real-path pip from the recorded sidecar
  (`instrument_geometry` -> `InstrumentGeometry.pip_size`), refusing (exit 2)
  on absent geometry. The authored table no longer gates: any symbol with a
  sidecar + bars now runs (new test: USDJPY, never vetted, resolves its JPY
  pip 0.01 from the sidecar).
- Removed the redundant authored floor: `InstrumentSpec`, `instrument_spec`,
  `VETTED_SYMBOLS`, and the table-only tests. The `InstrumentGeometry` seam
  (the surviving pip source) and its nameability guard are kept.
- `instrument_id` (the "find out"): no production consumer. The position-event
  table's `instrument_id` is a decoupled caller parameter; the engine never
  imports an instrument spec. Dropped with the struct.
- The example `pip_size_of` is re-sourced to the sidecar; the pure-structural
  blueprint tests use a literal pip to stay archive-independent.

Speculative deploy-grade fields and the #124 override/floor tiers are deferred
to the Stage-2 broker that will consume them, read from the sidecar geometry
then. Ledger (C8/C15/#22/#106) updated; #124 collapses to "recorded sidecar
geometry -> refuse" in the meantime.

Verified: cargo test --workspace (all green), clippy -D warnings clean, cargo
doc clean, with the local archive present so the sidecar paths run.

refs #124
2026-06-25 19:06:12 +02:00

13 lines
698 B
Rust

//! Guards the surviving provider-geometry seam: `aura_ingest::instrument_geometry`
//! and the `InstrumentGeometry` re-export must stay nameable from outside the crate
//! (a downstream broker consumes them). Dropping the re-export would break this.
use aura_ingest::{default_data_server, instrument_geometry, InstrumentGeometry};
#[test]
fn provider_geometry_type_is_nameable_through_the_ingest_seam() {
// Name the re-exported type explicitly (not just `_`), so removing the
// `pub use data_server::meta::InstrumentGeometry` re-export fails to compile here.
let server = default_data_server();
let _maybe: Option<InstrumentGeometry> = instrument_geometry(&server, "EURUSD");
}