Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- **`flush_mode` streaming write-flush knob.** The `flush_mode` setting is removed from every binding (Rust `StreamingConfig::flush_mode`, Python `Config.flush_mode`, TypeScript `Config.flushMode` / `setFlushMode`, C++ `set_flush_mode` / `get_flush_mode`, C ABI `thetadatadx_config_set_flush_mode` / `_get_flush_mode`). Outbound streaming writes now always coalesce and flush on the ping heartbeat, so a subscription burst leaves as fewer, larger packets — the terminal's own behavior — with received-data latency unaffected as before. The `"immediate"` per-frame-flush mode existed only to defeat that server-friendly coalescing and is gone. This is a breaking change to the configuration surface.

- **`host_selection` / `host_shuffle_seed` streaming host-ordering knobs.** Removed from every binding (Rust `StreamingConfig::host_selection` / `host_shuffle_seed`, Python `Config.streaming_host_selection` / `streaming_host_shuffle_seed`, TypeScript `Config.streamingHostSelection` / `setStreamingHostSelection` and the shuffle-seed pair, C++ `set_streaming_host_selection` / `get_streaming_host_selection` and the shuffle-seed pair, C ABI `thetadatadx_config_*_streaming_host_selection` / `_host_shuffle_seed`), along with the `HostSelectionPolicy` enum. The client now cycles the declared host list left to right — the terminal's own behavior — and a reconnect tries the last-known-good host first. The per-client fault-domain shuffle and its seed existed only in the SDK, with no terminal counterpart. This is a breaking change to the configuration surface.

## [0.1.1] - 2026-07-07

### Added
Expand Down
2 changes: 2 additions & 0 deletions docs-site/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- **`flush_mode` streaming write-flush knob.** The `flush_mode` setting is removed from every binding (Rust `StreamingConfig::flush_mode`, Python `Config.flush_mode`, TypeScript `Config.flushMode` / `setFlushMode`, C++ `set_flush_mode` / `get_flush_mode`, C ABI `thetadatadx_config_set_flush_mode` / `_get_flush_mode`). Outbound streaming writes now always coalesce and flush on the ping heartbeat, so a subscription burst leaves as fewer, larger packets — the terminal's own behavior — with received-data latency unaffected as before. The `"immediate"` per-frame-flush mode existed only to defeat that server-friendly coalescing and is gone. This is a breaking change to the configuration surface.

- **`host_selection` / `host_shuffle_seed` streaming host-ordering knobs.** Removed from every binding (Rust `StreamingConfig::host_selection` / `host_shuffle_seed`, Python `Config.streaming_host_selection` / `streaming_host_shuffle_seed`, TypeScript `Config.streamingHostSelection` / `setStreamingHostSelection` and the shuffle-seed pair, C++ `set_streaming_host_selection` / `get_streaming_host_selection` and the shuffle-seed pair, C ABI `thetadatadx_config_*_streaming_host_selection` / `_host_shuffle_seed`), along with the `HostSelectionPolicy` enum. The client now cycles the declared host list left to right — the terminal's own behavior — and a reconnect tries the last-known-good host first. The per-client fault-domain shuffle and its seed existed only in the SDK, with no terminal counterpart. This is a breaking change to the configuration surface.

## [0.1.1] - 2026-07-07

### Added
Expand Down
40 changes: 8 additions & 32 deletions parity.toml
Original file line number Diff line number Diff line change
Expand Up @@ -659,18 +659,6 @@ python = true
typescript = true
cpp = true

[[class]]
name = "StreamingConfig.streaming_host_selection"
python = true
typescript = true
cpp = true

[[class]]
name = "StreamingConfig.streaming_host_shuffle_seed"
python = true
typescript = true
cpp = true

# `StreamingConfig.consumer_cpu` optional consumer-thread CPU pin,
# exposed on every binding (Python `Config.consumer_cpu` `Optional[int]`,
# TypeScript `consumerCpu` / `setConsumerCpu` `number | null`, C++
Expand Down Expand Up @@ -1955,15 +1943,14 @@ cpp = true
returns = "String"
python_pyi_returns = 'Literal["PROD", "DEV"]'

# The reconnect-jitter and streaming-host-selection readbacks. Both are
# value-constrained enums exposed as readback getters on every binding: Python
# (`Config.reconnect_jitter` / `Config.streaming_host_selection` properties),
# TypeScript (`get reconnectJitter()` / `get streamingHostSelection()`), C++
# (`Config::get_reconnect_jitter()` / `Config::get_streaming_host_selection()`,
# each returning the enum's `int` discriminant). The `.pyi` constrains each to
# its exact value set, pinned via `python_pyi_returns` so a value-set drift
# fails — without these getter rows the constrained knobs were presence-tracked
# only (the config-field roster), never type-checked on the stub.
# The reconnect-jitter readback. A value-constrained enum exposed as a
# readback getter on every binding: Python (`Config.reconnect_jitter`
# property), TypeScript (`get reconnectJitter()`), C++
# (`Config::get_reconnect_jitter()`, returning the enum's `int`
# discriminant). The `.pyi` constrains it to its exact value set, pinned
# via `python_pyi_returns` so a value-set drift fails — without this getter
# row the constrained knob was presence-tracked only (the config-field
# roster), never type-checked on the stub.
[[method]]
class = "Config"
name = "reconnectJitter"
Expand All @@ -1975,17 +1962,6 @@ returns = "String"
cpp_returns = "i32"
python_pyi_returns = 'Literal["full", "equal", "decorrelated", "none"]'

[[method]]
class = "Config"
name = "streamingHostSelection"
python = true
typescript = true
cpp = true
[method.signature]
returns = "String"
cpp_returns = "i32"
python_pyi_returns = 'Literal["shuffled", "fixed_order"]'

# Custom reconnect-policy callback registration. A field-shaped getter
# is meaningless for a callback, so the registration is tracked as a
# method row (Python `config.reconnect_callback = fn` setter, TS
Expand Down
2 changes: 0 additions & 2 deletions scripts/ci/check_binding_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1861,8 +1861,6 @@ def _collect_rust_pub_fields(config_dir: pathlib.Path) -> dict[str, set[str]]:
("StreamingConfig", "keepalive_idle_secs"): "streaming_keepalive_idle_secs",
("StreamingConfig", "keepalive_interval_secs"): "streaming_keepalive_interval_secs",
("StreamingConfig", "keepalive_retries"): "streaming_keepalive_retries",
("StreamingConfig", "host_selection"): "streaming_host_selection",
("StreamingConfig", "host_shuffle_seed"): "streaming_host_shuffle_seed",
}


Expand Down
42 changes: 0 additions & 42 deletions thetadatadx-cpp/include/config_accessors.hpp.inc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 0 additions & 44 deletions thetadatadx-cpp/include/thetadatadx.h
Original file line number Diff line number Diff line change
Expand Up @@ -1595,50 +1595,6 @@ void thetadatadx_config_set_streaming_ring_size(ThetaDataDxConfig* config, size_
*/
int32_t thetadatadx_config_get_streaming_ring_size(const ThetaDataDxConfig* config, size_t* out);

/**
* Set the streaming host-selection policy.
* policy=0: Shuffled (default) -- fault-domain-aware per-client
* shuffle; a fleet spreads across hosts and consecutive
* failover attempts cross physical machines.
* policy=1: FixedOrder -- use the declared host order verbatim.
* @param config Config handle to mutate.
* @param policy Host-selection policy selector (0 = Shuffled, 1 = FixedOrder).
* @return 0 on success, -1 on an invalid policy or null config.
*/
int32_t thetadatadx_config_set_streaming_host_selection(ThetaDataDxConfig* config, int32_t policy);

/**
* Read the configured streaming host-selection policy. Same encoding as
* thetadatadx_config_set_streaming_host_selection.
* @param config Config handle to read.
* @param out_policy Receives the host-selection policy on success.
* @return 0 on success, -1 if either pointer is null.
*/
int32_t thetadatadx_config_get_streaming_host_selection(const ThetaDataDxConfig* config, int32_t* out_policy);

/**
* Set the streaming host-shuffle seed using the (has_value, seed) widened
* shape. Ignored under the FixedOrder policy.
* @param config Config handle to mutate.
* @param has_value false (default) derives a fresh per-client seed so a
* fleet shuffles independently; true makes the shuffled
* order deterministic, useful for fleet sharding and tests.
* @param seed The deterministic seed, honoured only when has_value is true.
* @return 0 on success, -1 if config is null.
*/
int32_t thetadatadx_config_set_streaming_host_shuffle_seed(ThetaDataDxConfig* config, bool has_value, uint64_t seed);

/**
* Read the current streaming host-shuffle seed.
* @param config Config handle to read.
* @param out_has_value Receives false for the per-client-entropy sentinel,
* true when an explicit seed is set.
* @param out_seed Receives the seed when out_has_value is true.
* @return 0 on success, -1 if any pointer is null.
*/
int32_t thetadatadx_config_get_streaming_host_shuffle_seed(const ThetaDataDxConfig* config, bool* out_has_value,
uint64_t* out_seed);

/**
* Set the wall-clock envelope (seconds) for one market-data-channel
* retry sequence, measured from the first attempt. 0 disables the
Expand Down
2 changes: 0 additions & 2 deletions thetadatadx-cpp/tests/error_taxonomy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ TEST_CASE("config enum setters reject an out-of-domain value with InvalidParamet
REQUIRE_NOTHROW(cfg.set_reconnect_jitter(2));
REQUIRE_THROWS_AS(cfg.set_reconnect_jitter(9), thetadatadx::InvalidParameterError);

REQUIRE_NOTHROW(cfg.set_streaming_host_selection(1));
REQUIRE_THROWS_AS(cfg.set_streaming_host_selection(5), thetadatadx::InvalidParameterError);
}

TEST_CASE("sequence converters reject out-of-wire-range inputs with InvalidParameterError",
Expand Down
78 changes: 0 additions & 78 deletions thetadatadx-ffi/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2216,84 +2216,6 @@ mod resilience_knob_tests {
}
}

#[test]
fn fpss_host_selection_and_seed_round_trip() {
let cfg = super::thetadatadx_config_production();
// SAFETY: handle just returned by thetadatadx_config_production.
unsafe {
let mut policy: i32 = -1;
assert_eq!(
super::thetadatadx_config_get_streaming_host_selection(cfg, &mut policy),
0
);
assert_eq!(policy, 0, "default host selection is Shuffled");
assert_eq!(
super::thetadatadx_config_set_streaming_host_selection(cfg, 1),
0
);
assert_eq!(
super::thetadatadx_config_get_streaming_host_selection(cfg, &mut policy),
0
);
assert_eq!(policy, 1);
assert_eq!(
super::thetadatadx_config_set_streaming_host_selection(cfg, 5),
-1,
"invalid policy rejected"
);
assert_eq!(
crate::error::thetadatadx_last_error_code(),
crate::error::THETADATADX_ERR_INVALID_PARAMETER,
"a rejected enum value surfaces the typed invalid-parameter class"
);

let mut has_value = true;
let mut seed: u64 = 7;
assert_eq!(
super::thetadatadx_config_get_streaming_host_shuffle_seed(
cfg,
&mut has_value,
&mut seed
),
0
);
assert!(
!has_value,
"default seed is the per-client-entropy sentinel"
);
assert_eq!(seed, 0);
assert_eq!(
super::thetadatadx_config_set_streaming_host_shuffle_seed(cfg, true, 42),
0
);
assert_eq!(
super::thetadatadx_config_get_streaming_host_shuffle_seed(
cfg,
&mut has_value,
&mut seed
),
0
);
assert!(has_value);
assert_eq!(seed, 42);
assert_eq!(
super::thetadatadx_config_set_streaming_host_shuffle_seed(cfg, false, 0),
0
);
assert_eq!(
super::thetadatadx_config_get_streaming_host_shuffle_seed(
cfg,
&mut has_value,
&mut seed
),
0
);
assert!(!has_value, "explicit None restores the sentinel");

super::thetadatadx_config_free(cfg);
}
}

#[test]
fn retry_envelope_and_flatfiles_jitter_round_trip() {
let cfg = super::thetadatadx_config_production();
Expand Down
Loading
Loading