Skip to content

fix(api): revert QueryResult tuple variants for 1.x compat; add current_tx_count() - #261

Merged
adityamukho merged 4 commits into
mainfrom
fix/query-result-compat
May 17, 2026
Merged

adityamukho merged 4 commits into
mainfrom
fix/query-result-compat

Conversation

@adityamukho

Copy link
Copy Markdown
Collaborator

Summary

  • Reverts QueryResult::Transacted { tx_id, tx_count } and Retracted { tx_id, tx_count } back to the original Transacted(TxId) / Retracted(TxId) tuple variants from v1.0.0
  • Exposes tx_count (the :as-of N counter) via the new additive Minigraf::current_tx_count() -> u64 method
  • Updates all internal consumers: executor, db.rs, repl, browser bindings

Why

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

  • 850 tests passing (cargo test)
  • No file format changes
  • No query surface changes
  • Confirmed QueryResult shape matches v1.0.0 exactly

🤖 Generated with Claude Code

adityamukho and others added 3 commits May 17, 2026 09:23
- Add v2.0 section: file format v7 only, v1–v6 migration code removable at 2.0 cut
- List 2.0 milestone scope: #182, #183, #180, #181
- Add Wave 2, 3, 4 entries to timeline (were missing)
- Update Last Updated line to Wave 4 complete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…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

codecov Bot commented May 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/db.rs 50.00% 2 Missing ⚠️

📢 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>
@adityamukho
adityamukho merged commit 43c3d30 into main May 17, 2026
37 checks passed
@adityamukho
adityamukho deleted the fix/query-result-compat branch May 17, 2026 04:23
@adityamukho adityamukho mentioned this pull request May 17, 2026
2 of 3 tasks
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