Skip to content

form: widen the read path to 64-bit rows - #1022

Merged
gemmeren merged 3 commits into
Framework-R-D:mainfrom
wwuoneway:form-read-path-uint64-rows
Oct 30, 2026
Merged

gemmeren merged 3 commits into
Framework-R-D:mainfrom
wwuoneway:form-read-path-uint64-rows

Conversation

@wwuoneway

@wwuoneway wwuoneway commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Widen the FORM read path to support 64-bit row IDs consistently across storage interfaces and ROOT backends, matching the existing write path.

Change get_index(), read(), and entries() to use std::uint64_t instead of narrowing row IDs to int in the read path.

  • Code: Widened storage read-path row indices and entry counts from int to std::uint64_t. This includes get_index(), index-map values, and read-container read() and entries() interfaces.
  • ROOT backends: Updated the RNTuple and TBranch read containers to use 64-bit entry IDs and counts. The TBranch backend checks IDs against ROOT’s entry count and passes IDs to LoadTree as Long64_t.
  • Tests: Updated test helpers to use the widened index and row-count types.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0ac2afce-06b9-4c24-8941-b3138ba453c2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
Walkthrough

Storage row indices, entry counts, and read IDs now use std::uint64_t across storage interfaces, ROOT-backed containers, persistence, and navigation code.

Changes: 64-bit storage row IDs

Layer / File(s) Summary
Storage index contract and propagation
form/storage/istorage.hpp, form/storage/storage_reader.hpp, form/storage/storage_reader.cpp
The storage reader API and index maps use std::uint64_t for row values. Index construction uses a 64-bit counter, and container reads pass token IDs without narrowing.
Read-container implementations
form/root_storage/root_rfield_read_container.*, form/root_storage/root_tbranch_read_container.*, form/storage/storage_read_container.*
Read-container IDs and entry counts use std::uint64_t. The TBranch implementation uses std::cmp_greater_equal for its bounds check and casts the ID to Long64_t for LoadTree.
Persistence and test consumers
form/persistence/persistence_reader.cpp, test/form/form_multiple_outputs_check.cpp, test/form/navigation_check.hpp
Persistence and navigation code use the 64-bit row types. The multiple-output check passes the index result without an explicit cast.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • Framework-R-D/phlex#1007: Changes the storage_reader::get_index and index-map data flow, which this PR updates to use 64-bit row values.

Suggested reviewers: aolivier23, knoepfel

Merge Risk: Minimal · previous review 3fca8

The read path supports rows beyond the previous 32-bit limit. No merge-blocking issue was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: widening the form read path to support 64-bit row identifiers.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 11 functions across 12 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
⚔️ Resolve merge conflicts: 💡
  • Resolve merge conflict in branch form-read-path-uint64-rows
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.24390% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
form/root_storage/root_tbranch_read_container.cpp 88.57% 3 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #1022      +/-   ##
==========================================
- Coverage   89.58%   89.55%   -0.03%     
==========================================
  Files         177      177              
  Lines        6010     5996      -14     
  Branches      994      994              
==========================================
- Hits         5384     5370      -14     
  Misses        397      397              
  Partials      229      229              
Flag Coverage Δ
amd64 89.55% <90.24%> (-0.03%) ⬇️
arm64 89.55% <90.24%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
form/persistence/persistence_reader.cpp 90.90% <100.00%> (ø)
form/root_storage/root_rfield_read_container.cpp 87.80% <100.00%> (ø)
form/root_storage/root_tbranch_read_container.hpp 100.00% <ø> (ø)
form/storage/istorage.hpp 100.00% <ø> (ø)
form/storage/storage_read_container.cpp 100.00% <100.00%> (ø)
form/storage/storage_read_container.hpp 100.00% <ø> (ø)
form/storage/storage_reader.cpp 82.82% <100.00%> (ø)
form/storage/storage_reader.hpp 100.00% <ø> (ø)
form/root_storage/root_tbranch_read_container.cpp 87.70% <88.57%> (-1.27%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89d6191...4cae24d. Read the comment docs.

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

…ly at the ROOT call; FORM's row stays std::uint64_t.

test(form): compare 64-bit rows without int casts: get_index() now returns std::uint64_t; drop the int casts from the merged Framework-R-D#992 tests, which fail GCC's -Werror=sign-compare.
Split fundamental buffer allocation out of TBranch read(), Fixes readability-function-size on read(), whose signature this PR changes. No behavior change.
@gemmeren
gemmeren enabled auto-merge October 30, 2026 13:50
@gemmeren
gemmeren merged commit ce771e1 into Framework-R-D:main Oct 30, 2026
42 checks passed
@wwuoneway
wwuoneway deleted the form-read-path-uint64-rows branch October 30, 2026 15:41
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.

2 participants