You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(v9.1.0): close codex r12 audit findings — sequence helper validation, more doc drift, ROADMAP wave vocabulary
Three findings from the r12 PR-wide audit on PR #514, all closed.
1. **TS sequence helpers reject out-of-range BigInt (Medium)** — the
prior pass relied on `BigInt::get_u64()` which conflates negative
inputs with truly out-of-range bigints, so
`sequenceUnsignedToSigned(-1n)` silently returned `1n` instead of
throwing, and `sequenceSignedToUnsigned(2^63)` saturated to
`i64::MAX` instead of throwing. Replaced with a hand-written
`bigint_to_i32` helper that walks the napi `(sign_bit, words)`
representation directly. The helpers now:
- clamp the signed input to the i32 wire range
(`-2_147_483_648..=2_147_483_647`) — this is the actual
terminal-protocol wire range; the SDK widens to i64 internally
but the round-trip is only meaningful in i32 (per
`crates/tdbe/src/sequences.rs:8-14`);
- clamp the unsigned input to the unsigned wire range (`0..=2^32 - 1`);
- throw on negative BigInt to `sequenceUnsignedToSigned`;
- accept the asymmetric `i32::MIN` boundary correctly.
Test suite gained range / rejection coverage; `npm test` runs
19 / 19.
2. **Doc drift remainder (Medium)** — purged the stale public-surface
references the prior pass missed:
- `docs/api-reference.md`: TypeScript section described streaming
as `tdx.startStreaming()` / `tdx.nextEvent()`. Both removed; the
section now points to push-callback (`tdx.startStreaming(callback)`)
and pull-iter (`for await (const event of await
tdx.startStreamingIter())`). The TypeScript code example was
fully rewritten against the modern API
(`Contract.stock(...).quote()`, `await client.startStreamingIter()`,
`awaitDrain` on shutdown). The contract-fields table dropped
the Go-only column.
- `docs-site/docs/streaming/connection.md`: replaced the
`nextEvent()` row in the async/sync table with the actual
`EventIterator.next(timeoutMs)` shape.
- `docs-site/docs/getting-started/streaming.md`: the architecture
paragraph dropped Go from the "polling queue" enumeration
(Wave H removed Go end-to-end).
3. **ROADMAP.md vocabulary scrub (Low)** — `docs/ROADMAP.md` is a
user-facing doc page and still leaked Wave / issue-tracker
vocabulary (`Wave O`, `#431` / `#432` / `#433` / `#436` / `#438`,
`#424`). The "Tracking" column on the binding-status table and
the per-row `(Wave O)` annotations on the coverage matrix are
gone; the open-work paragraph now says "Shipped" without the
issue-number reference.
Pre-push pipeline: cargo fmt --all -- --check, clippy --workspace
--locked -- -D warnings, test --workspace --locked, deny check all,
docs consistency, generate_sdk_surfaces --check, npm run build, npm
test (19/19 pass), C++ CMake all green.
Copy file name to clipboardExpand all lines: docs-site/docs/getting-started/streaming.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ graph LR
18
18
C -->|"Disruptor SPSC<br/>131,072 slots"| D["Your app<br/>(callback / poll)"]
19
19
```
20
20
21
-
Events are decoded from the FIT wire format and delta-decompressed on a dedicated I/O thread, then dispatched through an LMAX Disruptor SPSC ring buffer to your callback (Rust) or polling queue (Python / TypeScript / Go / C++). Every data event carries a `received_at_ns` nanosecond timestamp captured at frame decode time.
21
+
Events are decoded from the FIT wire format and delta-decompressed on a dedicated I/O thread, then dispatched through an LMAX Disruptor SPSC ring buffer to your callback (push mode) or pull-iter consumer (Python / TypeScript / C++). Every data event carries a `received_at_ns` nanosecond timestamp captured at frame decode time.
| REST/WS server (`tools/server`) | Shipped |#432 (Wave O / v9.1.0) |
143
-
| Python (`sdks/python`) | Shipped |#435|
144
-
| TypeScript (`sdks/typescript`) | Shipped |#436|
145
-
| C++ (`sdks/cpp`) | Shipped |#438|
146
-
|`sdk_surface.toml` declarative spec | Skipped (hand-written) |#439— flatfile bindings are intentionally hand-written; the dynamic `(SecType, ReqType)` schema doesn't fit the static codegen surface and the function set is finite. |
136
+
| Binding | Status |
137
+
|---------|--------|
138
+
| Rust (`crates/thetadatadx`) | Shipped |
139
+
| FFI (`ffi/`) | Shipped |
140
+
| CLI (`tools/cli`) | Shipped |
141
+
| MCP (`tools/mcp`) | Shipped |
142
+
| REST/WS server (`tools/server`) | Shipped |
143
+
| Python (`sdks/python`) | Shipped |
144
+
| TypeScript (`sdks/typescript`) | Shipped |
145
+
| C++ (`sdks/cpp`) | Shipped |
146
+
|`sdk_surface.toml` declarative spec | Skipped (hand-written) — flatfile bindings are intentionally hand-written; the dynamic `(SecType, ReqType)` schema doesn't fit the static codegen surface and the function set is finite. |
147
147
148
148
## Binding Coverage Matrix
149
149
150
-
End-to-end status of each public surface across every SDK / tool surface ThetaDataDx ships. Wave O (v9.1.0) closes the FLATFILES gaps in the tools row and the cross-language utility helpers gap.
150
+
End-to-end status of each public surface across every SDK / tool surface ThetaDataDx ships.
151
151
152
152
| Surface | Rust | Python | TypeScript | C | C++ | MCP | CLI | REST/WS |
@@ -185,7 +185,7 @@ Empty cells (`—`) are intentional: the MCP / CLI / REST surfaces don't expose
185
185
186
186
### Cross-language parity for `utils`
187
187
188
-
Shipped in Wave O (v9.1.0). The Rust SDK exposes `tdbe::{conditions, exchange, sequences}` for post-processing tick records, and every public binding now mirrors that surface. Tracked under issue #424.
188
+
Shipped. The Rust SDK exposes `tdbe::{conditions, exchange, sequences}` for post-processing tick records, and every public binding mirrors that surface.
189
189
190
190
-[x]**Python** — `thetadatadx.util.{condition_name, exchange_name, exchange_symbol, sequence_signed_to_unsigned, ...}` via PyO3.
191
191
-[x]**TypeScript** — `Util.{conditionName, exchangeName, exchangeSymbol, sequenceSignedToUnsigned, ...}` via napi-rs.
Copy file name to clipboardExpand all lines: docs/api-reference.md
+24-17Lines changed: 24 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -699,7 +699,7 @@ Every historical endpoint is available in the Python SDK via PyO3 bindings (e.g.
699
699
700
700
### TypeScript/Node.js SDK Coverage
701
701
702
-
Every historical endpoint is available in the TypeScript/Node.js SDK via napi-rs bindings as camelCase methods (e.g., `tdx.stockHistoryEOD(...)`). Streaming is available via `tdx.startStreaming()` / `tdx.nextEvent()`. Returns columnar objects with typed fields.
702
+
Every historical endpoint is available in the TypeScript/Node.js SDK via napi-rs bindings as camelCase methods (e.g., `tdx.stockHistoryEOD(...)`). Streaming is available in two modes: push-callback (`tdx.startStreaming(callback)`) and pull-iter (`for await (const event of await tdx.startStreamingIter())`); both return typed objects with the same field shape. Returns columnar objects with typed fields.
703
703
704
704
### Python SDK: Streaming
705
705
@@ -902,22 +902,29 @@ Check `event->kind` then read the corresponding field. Only the field matching `
@@ -1082,11 +1089,11 @@ All generated tick types are `Clone + Debug` structs generated from `tick_schema
1082
1089
1083
1090
> **Note:** Only `expiration` and `strike` support wildcards (`"0"`). The `right` parameter does **not** accept wildcards -- you must specify `"C"` or `"P"`.
1084
1091
1085
-
| Field | Type (Rust/FFI) |Type (Go) |Description |
0 commit comments