docs: finish M2 current-runtime checklist

This commit is contained in:
2026-10-24 03:30:24 -07:00
parent 3532ee024b
commit aa16d5c3e9
+27 -22
View File
@@ -38,38 +38,43 @@ and persistent storage remain separate ingress work.
`confidence` ∈ [0.0, 10.0] — data source reliability per position produced (exchange-reported `confidence` ∈ [0.0, 10.0] — data source reliability per position produced (exchange-reported
price = high; RSS sentiment = lower). Sims produce even finer-grained confidence. price = high; RSS sentiment = lower). Sims produce even finer-grained confidence.
## 6. Dependencies & stubs ## 6. Dependencies & runtime state
- External data sources (price APIs, RSS, RPC nodes) — *stub:* canned market data replay. - External data adapters — open; callers/tests currently provide normalized data directly.
- M1 Marketplace — execution data source (fills, positions); *stub:* canned fills. - M1 Marketplace execution feedback — open; live fills/portfolio state do not exist yet.
- M3 Sims — primary consumer; *stub:* print data points. - M3a/M3b/M3c/M3e — active history consumers through their Tcl runners.
- M5 Traders — secondary consumer; *stub:* print data points. - M3d/M3f/M3g — native kernels exist; no feed-query bridge yet.
- M5 Traders — no direct feed-reader facade is currently exposed.
## 7. Invariants / laws ## 7. Invariants / laws
- **L1 (C4):** data feeds are **raw and unnormalized in meaning** — the pipeline normalizes - **L1 (C4):** data feeds are **raw and unnormalized in meaning** — the pipeline normalizes
*format* (schema, timestamps, units) but never interprets, filters, or editorialize content. *format* (schema, timestamps, units) but never interprets, filters, or editorialize content.
- **L2 (C4):** **bidirectional flow** — external data flows in (market → sims/traders), and - **L2 (C4 target):** **bidirectional flow** — external observations and internal execution
internal execution data flows back (marketplace → sims). Both directions use the same feedback use the same normalized datum shape. **Current implementation:** normalized ingress
`NormalizedDatum` shape. to history is live; execution-fill/portfolio feedback is reserved because execution is
simulation-only and no feedback adapter exists yet.
- **L3 (C3):** **backpressure, not drop** — if a consumer is slow, buffer up to a cap, then - **L3 (C3):** **backpressure, not drop** — if a consumer is slow, buffer up to a cap, then
apply backpressure to the source. Never silently drop data points. apply backpressure to the source. Never silently drop data points.
- **L4 (C3):** every datum carries a **source and timestamp** — consumers can always trace - **L4 (C3):** every datum carries a **source and timestamp** — consumers can always trace
where data came from and when. where data came from and when.
## 8. Build steps ## 8. Build status
1. Define `NormalizedDatum` and `FeedType` shapes. 1. **Done:** normalized datum storage shape.
2. Implement the pub/sub pipeline (subscribe, publish, distribute). 2. **Done:** per-feed ordered in-session history.
3. Wire external source adapters (start with one price API + one RSS feed). 3. **Done:** explicit capacity backpressure with no silent eviction.
4. Wire M1 execution data feedback loop. 4. **Done:** M3a/M3b/M3c/M3e calibrated history consumers.
5. Implement session-scoped time-series history (ring buffer). 5. **Open:** external source adapters and provider normalization.
6. **Open:** subscriptions/fan-out, time-range queries, persistence, and execution feedback.
## 9. Tests ## 9. Tests
Normalization: heterogeneous inputs produce uniform `NormalizedDatum` output. Pub/sub: subscriber The M0 suite verifies accepted publishes, capacity backpressure, preserved buffered history, and
receives published data. History: query returns correct time range. Backpressure: slow consumer source/timestamp/confidence retention. Dedicated M3 integration suites prove real consumers for
does not cause data loss. Bidirectional: marketplace fills reach sims via the feed. `price_tick`, `rss_news`, `dex_pool_state`, and `on_chain_event`. Subscription, provider
normalization, persistence, and execution-feedback tests do not exist because those surfaces are
not implemented.
## 10. Open items ## 10. Open items
- Which price APIs / RSS sources to support initially (CoinGecko? DeFiLlama? specific DEX - External source/adaptor set and credentials/rate-limit handling.
subgraphs?). - Per-feed capacity and persistence policy beyond the current configured in-session cap.
- History buffer size / eviction policy. - Subscription/fan-out semantics if push delivery is added.
- Whether feeds need authentication / rate limiting management. - Freshness/latency contracts per consumer.
- Latency requirements (how fresh must data be for each consumer type?). - Execution-fill / portfolio-state feedback once a real execution layer exists.