Skip to content

feat(streaming)!: remove host_selection/host_shuffle_seed; cycle hosts in declared order#1196

Merged
userFRM merged 1 commit into
mainfrom
chore/remove-host-selection-0.2.0
Jul 11, 2026
Merged

feat(streaming)!: remove host_selection/host_shuffle_seed; cycle hosts in declared order#1196
userFRM merged 1 commit into
mainfrom
chore/remove-host-selection-0.2.0

Conversation

@userFRM

@userFRM userFRM commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Why

The Theta Terminal cycles its FPSS host list left to right and exposes no host-ordering knob. The SDK invented a per-client fault-domain shuffle (host_selection = "shuffled" by default, seedable via host_shuffle_seed) with no terminal counterpart — and the shuffled default even contradicted the SDK's own shipped config.default.toml, whose comment says the client "tries each host in order". A terminal-parity SDK should dial hosts in declared order.

What

Removed the two knobs and the HostSelectionPolicy enum across the whole surface:

  • Config: StreamingConfig::host_selection / host_shuffle_seed, the HostSelectionPolicy enum.
  • Bindings: Python streaming_host_selection / streaming_host_shuffle_seed, TypeScript streamingHostSelection / setStreamingHostSelection + shuffle-seed pair, C++ + C ABI equivalents — plus the generated accessors, .pyi, index.d.ts, C header.
  • Runtime: order_hosts collapses from a policy/seed shuffle to plain declared order. Kept: the last-known-good host is still promoted to the front on reconnect — internal reconnect stickiness with no client knob, matching how the terminal recovers. preferred = None (cold connect) yields declared order unchanged.
  • Contract + docs: parity.toml rows, the parity-checker rename-map entries, the round-trip tests (Rust/Py/TS/C++/FFI), and the generated docs.

Breaking

Removes public configuration API on every binding — targeted for 0.2.0, batched with the other parity-restoring cuts. Host ordering is now unconditional declared order.

Verification

  • check_binding_parity clean + --selftest 209/0.
  • Rust fpss::connection (11, incl. rewritten order_hosts cases) + config (159) + FFI (forwarding + auth) tests pass; Python/TypeScript clippy clean.
  • generate_docs_site --check + generate_sdk_surfaces --check pass (llms.txt regenerated); doc-defaults / docs-consistency / vocab gates pass; changelogs byte-identical.

Net: +75 / −1068.

…s in declared order

The Theta Terminal cycles its FPSS host list left to right and exposes no host-ordering knob. The SDK invented a per-client fault-domain shuffle (`host_selection = "shuffled"` by default, seedable via `host_shuffle_seed`) with no terminal counterpart — and the shuffled default even contradicted the SDK's own shipped `config.default.toml`, whose comment says the client "tries each host in order". A terminal-parity SDK should dial hosts in declared order, so the shuffle and its seed are removed.

Removed across 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++ and C ABI equivalents), the `HostSelectionPolicy` enum, the cross-binding parity rows, and the docs. `order_hosts` collapses to declared order with the last-known-good host promoted to the front on reconnect — the internal reconnect-stickiness resilience feature is kept, since it has no client-facing knob and matches how the terminal recovers.

Breaking change to the configuration surface; host ordering is now unconditional declared order.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@userFRM userFRM merged commit 6881c03 into main Jul 11, 2026
54 checks passed
@userFRM userFRM deleted the chore/remove-host-selection-0.2.0 branch July 11, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants