Skip to content

[MOD-13846] Add numeric_range_tree_ffi crate (FFI bindings for insert/find/iter)#8305

Merged
LukeMathWalker merged 3 commits intomasterfrom
numeric-range-tree-2-ffi
Feb 20, 2026
Merged

[MOD-13846] Add numeric_range_tree_ffi crate (FFI bindings for insert/find/iter)#8305
LukeMathWalker merged 3 commits intomasterfrom
numeric-range-tree-2-ffi

Conversation

@LukeMathWalker
Copy link
Copy Markdown
Collaborator

@LukeMathWalker LukeMathWalker commented Feb 8, 2026

Describe the changes in the pull request

Add FFI bindings to expose the functionality provided by numeric_range_tree to the C codebase.

Which additional issues this PR fixes

  1. MOD-...
  2. #...

Main objects this PR modified

  1. ...

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.


Note

Medium Risk
Introduces new FFI surface area and tweaks GC scanning/callback plumbing in numeric_range_tree, where mistakes can lead to UB, leaks, or subtle GC/cardinality regressions; changes are largely additive but touch unsafe boundaries.

Overview
Adds a new numeric_range_tree_ffi crate that exposes the Rust numeric_range_tree to C via a generated headers/numeric_range_tree.h, including lifecycle (NewNumericRangeTree/_Free), insert (NumericRangeTree_Add), query (NumericRangeTree_Find), iteration, range accessors, and FT.DEBUG-oriented dump/summary helpers.

Refactors numeric-range-tree internals to better support GC/FFI: NumericIndex::scan_gc now accepts an optional per-entry repair callback, NumericRangeNode::scan_gc is added to compute both GC deltas and HLL cardinality registers, and several result structs are marked #[repr(C)] with new raw-part constructors (Key/NodeIndex) for round-tripping through C. Build/bindgen is updated to blocklist numeric_range_tree.h, inverted_index_ffi exposes fork_gc publicly, and workspace lock/hack dependencies are updated (notably adding redis-module).

Written by Cursor Bugbot for commit 788d205. This will update automatically on new commits. Configure here.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.89%. Comparing base (39d9e7a) to head (34f2968).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8305      +/-   ##
==========================================
+ Coverage   82.86%   82.89%   +0.02%     
==========================================
  Files         420      421       +1     
  Lines       60825    62021    +1196     
  Branches    18695    19116     +421     
==========================================
+ Hits        50405    51411    +1006     
- Misses      10233    10420     +187     
- Partials      187      190       +3     
Flag Coverage Δ
flow 84.41% <ø> (+0.24%) ⬆️
unit 51.65% <ø> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 2e6c296 to d9d4e51 Compare February 8, 2026 11:11
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from 21e0009 to b6fbd83 Compare February 8, 2026 11:11
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from d9d4e51 to 28993f6 Compare February 8, 2026 14:17
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch 2 times, most recently from fbbb37a to b5e029f Compare February 9, 2026 14:11
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 28993f6 to 69d255a Compare February 9, 2026 14:11
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 9, 2026

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from b5e029f to a581c7e Compare February 9, 2026 14:18
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 69d255a to 2d66944 Compare February 9, 2026 14:18
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from a581c7e to d0d73a0 Compare February 9, 2026 14:59
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 2d66944 to 1fa3b06 Compare February 9, 2026 14:59
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 9, 2026

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from d0d73a0 to a1a7e8b Compare February 9, 2026 15:03
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 1fa3b06 to 4f38267 Compare February 9, 2026 15:03
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 9, 2026

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 4f38267 to e873c7f Compare February 10, 2026 09:24
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from a1a7e8b to f270d70 Compare February 10, 2026 09:24
@sonarqubecloud
Copy link
Copy Markdown

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from f270d70 to 668ebcf Compare February 10, 2026 10:57
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from e873c7f to 0aa6d28 Compare February 10, 2026 10:57
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from 668ebcf to cf7bfc6 Compare February 10, 2026 12:18
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 0aa6d28 to 5ec972a Compare February 10, 2026 12:18
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from cf7bfc6 to a49d169 Compare February 10, 2026 12:19
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch 2 times, most recently from 5de5df1 to 494fed2 Compare February 10, 2026 12:36
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from a49d169 to 7d40a5c Compare February 11, 2026 11:19
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from b72444e to 5c42040 Compare February 17, 2026 09:02
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from 54d2f47 to 6b3d750 Compare February 17, 2026 09:50
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 5c42040 to ba1411a Compare February 17, 2026 09:50
@sonarqubecloud
Copy link
Copy Markdown

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from ba1411a to 42deea6 Compare February 17, 2026 10:40
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-1-c-gc-impl branch from 6b3d750 to 92713bf Compare February 17, 2026 18:15
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 42deea6 to 9cb1e97 Compare February 18, 2026 07:25
Base automatically changed from numeric-range-tree-1-c-gc-impl to master February 18, 2026 10:00
@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 9cb1e97 to be0e1f9 Compare February 18, 2026 10:41
Copy link
Copy Markdown
Collaborator

@meiravgri meiravgri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tight

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 5fc6411 to 55b3c0b Compare February 18, 2026 19:02
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Feb 19, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2-ffi branch from 788d205 to 34f2968 Compare February 19, 2026 15:33
@sonarqubecloud
Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@LukeMathWalker LukeMathWalker added this pull request to the merge queue Feb 20, 2026
Merged via the queue into master with commit aa88769 Feb 20, 2026
92 checks passed
@LukeMathWalker LukeMathWalker deleted the numeric-range-tree-2-ffi branch February 20, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants