feat(tdbe): ParsedRight::from_wire_byte (inverse of as_wire_byte)#496
Merged
Conversation
Add a `const fn` inverse of the existing `ParsedRight::as_wire_byte`, decoding the FPSS wire byte (`67` for `'C'`, `80` for `'P'`) into a typed `ParsedRight`. Returns `None` for any other byte so the caller can lift the soft-skip / hard-error decision into its own error type. Round-trip property test confirms every variant whose `as_wire_byte()` returns `Some(b)` decodes through `from_wire_byte(b) == Some(self)`. The `Both` variant has no FPSS wire encoding, so the test asserts that path stays unrepresentable on the wire. Removes the rationale for downstream tick decoders (analytics chain snapshots, replay validators) to re-type the `67` / `80` magic numbers at every trust boundary. Patch bump tdbe 0.12.8 -> 0.12.9 per the 0.12.x patch-only policy; `thetadatadx` and `ffi` dependency pins lifted to match. No `thetadatadx` version bump in this commit -- a follow-up release PR will roll the SDK forward through the next patch. Closes #495. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`Extended Surfaces` job runs `scripts/check_docs_consistency.py` which verifies the docs-site changelog mirror matches the canonical `CHANGELOG.md`. Bring it in sync. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI's `Extended Surfaces` job runs `cargo check --locked` against
each separately-locked extended-surface crate (`tools/{cli,server,mcp}`,
`sdks/{python,typescript}`). Their `Cargo.toml` declared
`tdbe = "0.12.8"` and the lockfiles resolved to that, so the
locked check failed once tdbe rebased to `0.12.9` on this branch.
Lift the pin to `0.12.9` and refresh each lockfile so the locked
builds pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
df846f7 to
7225d5a
Compare
userFRM
added a commit
that referenced
this pull request
May 6, 2026
* chore(release): 8.0.31 Patch bump for the additive `tdbe::right::ParsedRight::from_wire_byte` landed in #496 (which itself patch-bumped tdbe 0.12.8 -> 0.12.9). Per the v8 patch-only policy. No SDK behaviour change beyond the new public surface on `tdbe::right`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(release): sync optionalDependencies in sdks/typescript/package.json The npm `package.json` carries the canonical version on line 3 plus three `optionalDependencies` entries pinning the per-platform native binary packages. The version-sync script (`scripts/check_version_sync.py`) verifies all four match the canonical Cargo.toml version. The release bump missed the optional-deps trio. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tdbe::right::ParsedRight::from_wire_byte(byte: i32) -> Option<Self>—const fndecoder for the FPSS wirerightbyte (67for'C',80for'P').ParsedRight::as_wire_byte. Round-trip property test confirms every variant whoseas_wire_byte()returnsSome(b)decodes throughfrom_wire_byte(b) == Some(self).67/80magic numbers at every trust boundary (e.g.thetadatadx-analytics::analytics::_shared::prewarm::chain_snapshot::from_mdds_ticks).tdbe0.12.8 → 0.12.9 per the 0.12.x patch-only policy.thetadatadx/ffi/tools/clidependency pins lifted to0.12.9. ThethetadatadxSDK version stays at 8.0.29 — a follow-up release PR rolls the SDK forward.Test plan
cargo fmt --all -- --checkcargo test --workspacecargo clippy --workspace --all-targets -- -D warningscargo build --release -p thetadatadx-ffi[Unreleased] / tdbeCloses #495.
Friction note
The original v13 cleanup spec named this work as "typed chain-snapshot decoder for endpoints 67/80". The numbers
67and80are NOT MDDS endpoint numbers — they are the ASCII byte values for the optionrightfield ('C' == 67,'P' == 80). MDDS endpoints are method names onMddsClient(e.g.option_snapshot_quote,option_at_time_quote); therightbyte is a tick-field encoding owned bytdbe. This PR lands the cleanup at the right level (atdbeAPI onParsedRight) so the analytics consumer can drop its hardcoded match arms.