Skip to content

Commit 80a8fb1

Browse files
userFRMclaude
andcommitted
docs(v9.1.0): scrub stale RawData / FLATFILES copy + schema v5
- Strip references to the deleted public `FpssEvent::RawData` variant from every shipped surface (Python / TS / C++ READMEs, api-reference, architecture, the C header, and the C++ smoke example). Note that truncated / unrecognised wire frames are now filtered before the callback fires and accounted on the `thetadatadx.fpss.decode_failures` metric counter. - Replace the "FLATFILES not yet exposed" coverage notes (Python / TS / C++ / FFI READMEs) with a description of the now-shipped `tdx.flat_files.*()` / `tdx.flatFiles.*()` / `unified.flat_files().*()` / C ABI surface and matching terminals (`.to_arrow()`, `.to_polars()`, `.to_pandas()`, `.to_arrow_ipc()`). - Bump the schema-version drift in `.github/release-notes/v9.1.0.md`, `CHANGELOG.md`, and `docs-site/docs/changelog.md` from "version 4" to "version 5", matching `crates/thetadatadx/fpss_event_schema.toml`. No public API change. Version stays 9.0.2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fa20cca commit 80a8fb1

13 files changed

Lines changed: 42 additions & 35 deletions

File tree

.github/release-notes/v9.1.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ the user callback directly from the Disruptor consumer thread.
2222
`tdx::Fpss<Variant>` aliases. The `TdxFpssEventKind` enum gains
2323
one discriminant per control variant — symbolic names
2424
(`TDX_FPSS_LOGIN_SUCCESS`, ...) stay stable. Schema bumped to
25-
version 4 (`crates/thetadatadx/fpss_event_schema.toml`); generated
25+
version 5 (`crates/thetadatadx/fpss_event_schema.toml`); generated
2626
outputs regenerated; codegen idempotency check enforced in CI.
2727
Migration table for the old flat `control.kind` integer →
2828
new typed struct path: see `CHANGELOG.md` § Migration from v9.0.x.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ code does not change.
8686
gains one discriminant per control variant — numeric values
8787
renumber alphabetically; symbolic names
8888
(`TDX_FPSS_LOGIN_SUCCESS`, `FpssLoginSuccessEvent`, etc.) are
89-
stable. Schema bumped to version 4
89+
stable. Schema bumped to version 5
9090
(`crates/thetadatadx/fpss_event_schema.toml`); generated outputs
9191
regenerated; codegen idempotency check enforced in CI. See the
9292
v9.0.x → v9.1.0 migration table for the old→new field mapping.

crates/thetadatadx/build_support/sdk_surface/python.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ fn python_streaming_method(method: &MethodSpec) -> String {
105105
`MarketOpen`, `MarketClose`, `ServerError`,\n\
106106
`Disconnected`, `Reconnecting`, `Reconnected`, `Error`,\n\
107107
`UnknownFrame`, `Connected`, `Ping`, `ReconnectedServer`,\n\
108-
`Restart`, `UnknownControl`, or `RawData`). Dispatch via\n\
109-
`match event: case Quote(): ...`.\n\
108+
`Restart`, `UnknownControl`). Dispatch via\n\
109+
`match event: case Quote(): ...`. Truncated / unrecognised\n\
110+
wire frames are filtered before the callback fires and\n\
111+
accounted on the `thetadatadx.fpss.decode_failures` metric.\n\
110112
\n\
111113
Events flow from the FPSS reader thread into the\n\
112114
LMAX Disruptor ring (`Producer::try_publish`) and out\n\

docs-site/docs/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ code does not change.
8686
gains one discriminant per control variant — numeric values
8787
renumber alphabetically; symbolic names
8888
(`TDX_FPSS_LOGIN_SUCCESS`, `FpssLoginSuccessEvent`, etc.) are
89-
stable. Schema bumped to version 4
89+
stable. Schema bumped to version 5
9090
(`crates/thetadatadx/fpss_event_schema.toml`); generated outputs
9191
regenerated; codegen idempotency check enforced in CI. See the
9292
v9.0.x → v9.1.0 migration table for the old→new field mapping.

docs/api-reference.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -793,13 +793,16 @@ struct, and `thetadx.hpp` guards every field via
793793

794794
```c
795795
/* TdxFpssEventKind discriminants enumerate every data variant
796-
* (Quote / Trade / OpenInterest / Ohlcvc), every typed control
796+
* (Quote / Trade / OpenInterest / Ohlcvc) and every typed control
797797
* variant (LoginSuccess / ContractAssigned / Disconnected /
798798
* Reconnecting / ServerError / Error / Ping / UnknownFrame /
799799
* MarketOpen / MarketClose / Connected / Reconnected /
800-
* ReconnectedServer / Restart / ReqResponse / UnknownControl), plus
801-
* the RawData fallback. Numeric values renumber alphabetically on
802-
* each major bump; reach for the symbolic names. */
800+
* ReconnectedServer / Restart / ReqResponse / UnknownControl).
801+
* Numeric values renumber alphabetically on each major bump; reach
802+
* for the symbolic names. Truncated / unrecognised wire frames are
803+
* filtered inside the Rust core (accounted on
804+
* `thetadatadx.fpss.decode_failures`) and never surface through the C
805+
* ABI. */
803806

804807
typedef struct {
805808
TdxFpssEventKind kind;
@@ -825,8 +828,6 @@ typedef struct {
825828
TdxFpssServerError server_error;
826829
TdxFpssUnknownControl unknown_control;
827830
TdxFpssUnknownFrame unknown_frame;
828-
/* Raw-bytes fallback */
829-
TdxFpssRawData raw_data;
830831
} TdxFpssEvent;
831832
```
832833

docs/architecture.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,8 @@ FPSS event dispatch uses a lock-free disruptor ring buffer (`disruptor-rs` v4),
339339
Events delivered through the ring buffer use a split enum:
340340
- **`FpssEvent::Data(FpssData)`** — market data: `Quote`, `Trade`, `OpenInterest`, `Ohlcvc`
341341
- **`FpssEvent::Control(FpssControl)`** — lifecycle: `LoginSuccess`, `ContractAssigned`, `ReqResponse`, `MarketOpen`, `MarketClose`, `ServerError`, `Disconnected`, `Error`
342-
- **`FpssEvent::RawData`** — unparsed frames
343342

344-
This split enables callers to `match` on data events without touching lifecycle logic, and vice versa.
343+
This split enables callers to `match` on data events without touching lifecycle logic, and vice versa. Truncated / unrecognised wire frames are accounted on the `thetadatadx.fpss.decode_failures` metric counter (carried internally as `FpssEventInternal::Unparseable`) and filtered before reaching the public callback.
345344

346345
### OHLCVC-from-Trade Derivation
347346

ffi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ C FFI layer for `thetadatadx` — exposes the Rust SDK as `extern "C"` functions
44

55
Compiled as both `cdylib` (shared library) and `staticlib` (archive). Consumed by the C++ (RAII) and TypeScript/Node.js (napi-rs) SDKs, and available to any third-party C/C++/Go/etc. consumer that wants to roll their own wrapper against the `tdx_*` symbols.
66

7-
> **FLATFILES coverage:** the FFI layer currently exposes the MDDS (historical) and FPSS (streaming) surfaces only. The third surface — FLATFILES whole-universe daily blobs — is shipped in the Rust core (v8.0.17+) and is being added to the C ABI under issue [#434](https://github.com/userFRM/ThetaDataDx/issues/434). The C++ binding (#438) tracks this issue as its upstream blocker. See [`ROADMAP.md`](../ROADMAP.md#flatfiles--binding-coverage) for the per-binding status.
7+
> **Surface coverage:** the FFI layer exposes all three ThetaData surfaces — MDDS (historical), FPSS (streaming), and FLATFILES (whole-universe daily blobs). The flat-files entry points are `tdx_flatfile_request_decoded` (pull + decode into an opaque row-list), `tdx_flatfile_rows_to_arrow_ipc` (serialise to Arrow IPC bytes), `tdx_flatfile_request_to_path` (raw vendor bytes straight to disk), and the matching `_rowlist_free` / `_bytes_free` cleanup helpers.
88
99
## Building
1010

sdks/cpp/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ C++ SDK for ThetaData market data. Header-only RAII wrappers over the `thetadata
44

55
Every call crosses the C ABI boundary into compiled Rust: gRPC communication, protobuf parsing, zstd decompression, and TCP streaming run inside the `thetadatadx` crate.
66

7-
> **FLATFILES coverage:** the C++ binding currently exposes the MDDS (historical) and FPSS (streaming) surfaces only. The third surface — FLATFILES whole-universe daily blobs — is shipped in the Rust core (v8.0.17+) and is being wired through the FFI layer (issue [#434](https://github.com/userFRM/ThetaDataDx/issues/434)) into C++ under issue [#438](https://github.com/userFRM/ThetaDataDx/issues/438). See [`ROADMAP.md`](../../ROADMAP.md#flatfiles--binding-coverage) for the per-binding status.
7+
> **Surface coverage:** the C++ binding exposes all three ThetaData surfaces — MDDS (historical), FPSS (streaming), and FLATFILES (whole-universe daily blobs). Flat files land via `unified.flat_files().*()` with `.to_arrow_ipc()` terminals plus a `flat_files().to_path(...)` raw-bytes helper — see the [Flat Files](#flat-files) section for the full method list.
88
99
## Prerequisites
1010

@@ -352,7 +352,11 @@ All prices in streaming events are `double` (f64) -- decoded during parsing. Acc
352352
| `TdxFpssReconnectedServer` | (none) | `kind == TDX_FPSS_RECONNECTED_SERVER` |
353353
| `TdxFpssRestart` | (none) | `kind == TDX_FPSS_RESTART` |
354354
| `TdxFpssUnknownControl` | (none) | `kind == TDX_FPSS_UNKNOWN_CONTROL` |
355-
| `TdxFpssRawData` | code (u8), payload (`uint8_t*`), payload_len (size_t) | `kind == TDX_FPSS_RAW_DATA` |
355+
356+
Truncated / unrecognised wire frames are filtered before the user
357+
callback fires and accounted on the `thetadatadx.fpss.decode_failures`
358+
metric counter on the Rust side; they never surface through the C ABI
359+
event stream.
356360

357361
`FpssClient` is non-copyable but movable. The destructor calls `shutdown()` automatically.
358362

sdks/cpp/examples/fpss_smoke.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ int main(int argc, char** argv) {
164164
// Payload-less variants — discriminator alone carries
165165
// the meaning.
166166
break;
167-
case TDX_FPSS_RAW_DATA:
168-
std::cout << " code=" << static_cast<int>(event.raw_data.code)
169-
<< " len=" << event.raw_data.payload_len;
170-
break;
171167
}
172168
std::cout << std::endl;
173169
});

sdks/cpp/include/thetadx.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,8 @@ int tdx_implied_volatility(double spot, double strike, double rate, double div_y
562562
*
563563
* Borrowed pointers (`Contract.symbol`, `LoginSuccess.permissions`,
564564
* `ServerError.message`, `Error.message`, `Ping.payload`,
565-
* `UnknownFrame.payload`, `RawData.payload`) are valid only for the
566-
* duration of the user callback — copy out before returning. Do NOT
567-
* free. */
565+
* `UnknownFrame.payload`) are valid only for the duration of the
566+
* user callback — copy out before returning. Do NOT free. */
568567
#include "fpss_event_structs.h.inc"
569568

570569
/* ═══════════════════════════════════════════════════════════════════════ */

0 commit comments

Comments
 (0)