Skip to content

fix(clob): resolve missing final settlement hashes - #34

Merged
SebastianBoehler merged 1 commit into
mainfrom
codex/fix-stream-settlement-hashes
Oct 10, 2026
Merged

SebastianBoehler merged 1 commit into
mainfrom
codex/fix-stream-settlement-hashes

Conversation

@SebastianBoehler

Copy link
Copy Markdown
Owner

When the user stream reports a confirmed trade without a transaction hash, settlement currently returns success with no hashes. This change resolves missing final hashes through REST immediately and keeps the fill pending if REST also lacks the hash. Both settlement overloads require confirmed fills to have final hashes; failed fills still complete without hashes.

Complete stream confirmations continue to settle without REST calls. Unresolved hash lookups follow the existing reconciliation interval and deadline, and REST errors retain their original metadata. Earlier MINED and order-response hashes are not reused because retries can replace them. The public method signatures and type layouts are unchanged.

Validation: the new regressions failed before the fix. Release test_stream_settlement, test_order_settlement, test_user_stream, and test_package_consumer pass locally on macOS with Apple clang 21. Pinned clang-format/clang-tidy 21.1.6 and Prettier 3.6.2 checks pass. Tests cover omitted/null/empty hashes through the stream parser, final-hash reconciliation, incomplete REST confirmations, timeout, and original HTTP errors. The full Linux/macOS Debug/Release matrix runs in CI. No funded orders or live settlement tests were run.

Protocol evidence: the transaction hash is optional in the official user-stream contract and the official Python SDK model at f1e2ab2.

@SebastianBoehler
SebastianBoehler merged commit 2a2129c into main Oct 10, 2026
4 checks passed
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.

1 participant