Repository navigation
fix(api): revert QueryResult tuple variants for 1.x compat; add current_tx_count() - #261
Merged
Merged
Conversation
…for 1.x compat The struct-variant form introduced in #225 broke pattern-match compatibility for any consumer matching QueryResult::Transacted(id) or Retracted(id). Revert both variants back to the original tuple form. Expose tx_count (the :as-of counter) via the new Minigraf::current_tx_count() method instead — a purely additive API addition that existing code doesn't need to change to use. 850 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep Wave 2/3 detail and test count (935) from main; add Wave 4 entry from this branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
minigraf-c, minigraf-node, and minigraf-ffi all had the struct-variant form that was introduced alongside the breaking change. Updated to tuple variant and dropped tx_count from JSON output (use Minigraf::current_tx_count() instead). Co-Authored-By: Claude Sonnet 4.6 <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
QueryResult::Transacted { tx_id, tx_count }andRetracted { tx_id, tx_count }back to the originalTransacted(TxId)/Retracted(TxId)tuple variants from v1.0.0tx_count(the:as-of Ncounter) via the new additiveMinigraf::current_tx_count() -> u64methodWhy
The struct-variant change (introduced as part of #225 corrections) was a breaking API change — any downstream code pattern-matching
QueryResult::Transacted(id)would fail to compile. Blocking a 1.1 release.Test plan
cargo test)QueryResultshape matches v1.0.0 exactly🤖 Generated with Claude Code