Skip to content

Form write output metadata - #647

Merged
wwuoneway merged 13 commits into
Framework-R-D:mainfrom
wwuoneway:form-write-output-metadata
Jun 16, 2026
Merged

Form write output metadata#647
wwuoneway merged 13 commits into
Framework-R-D:mainfrom
wwuoneway:form-write-output-metadata

Conversation

@wwuoneway

@wwuoneway wwuoneway commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Purpose

To enable fast, fine-grained reading, this PR writes the basic metadata and indexing information needed for file-level, product-level, and locator-lookup into the FORM output file. This provides the reading framework with the ability to locate and lazy-load data products without needing to scan the full payload up front.

What's Changed

  • Added the FileCatalogy, ProductRegistry, and IndexRegistry TTrees in the output file containing the initial set of metadata for data products.
  • ProductRegistry includes necessary branches (ProductName, ProcessName, Producer, ProductID) to establish a unique logical identity for each product.
  • IndexRegistry includes layer identifiers(data cell indices), ProductID, ContainerName, and PayloadRow, which together provide the physical location of each product in the file.

Next Steps

  • Implement the reading core and validate the end-to-end write/read workflow.

Code Changes

Core Writer Interface

  • form_writer_interface: Added declareProductName(routing_label, product_name) to map routing labels to product names, and finalize() to finalize metadata output
  • Updated write paths to look up declared product names and pass them through the persistence layer

Persistence Layer

  • IPersistenceWriter::registerWrite: Extended with optional product_name parameter (defaults to empty string)
  • PersistenceWriter: Updated registerWrite() implementation to accept and cache product_name; added finalize() method to delegate to storage writer finalization

Storage Layer

  • IStorageWriter::fillContainer: Extended with optional product_name parameter
  • StorageWriter::fillContainer: Expanded to accept product_name and route it appropriately to index and product registries
  • StorageWriter::finalize: Major new implementation (+492/-3 lines) that:
    • Generates FileCatalog TTree with file-level metadata (FileUUID, FileFormatVersion)
    • Generates ProductRegistry TTree with per-product identification (ProductName, ProcessName, Producer, ProductID)
    • Generates IndexRegistry TTree with physical location mappings (layer identifiers, ProductID, ContainerName, PayloadRow)
    • Includes extensive utility functions for index parsing, schema handling, layer identifier derivation, and metadata serialization

ROOT Storage Infrastructure

  • ROOT_TBranch_Write_ContainerImp and ROOT_TTree_Write_ContainerImp: Added getEntryCount() method returning entry count or 0 if tree not attached
  • Storage_Write_Container: Added getEntryCount() override (returns 0)
  • ROOT_TFileImp: Updated file open-mode handling with new mode 'u' for UPDATE (conditional on existing file), preserving 'c'/'o' as RECREATE, changing 'r'/'i' to READ, and throwing on unsupported modes

Container Interface

  • IStorage_Write_Container: Added getEntryCount() virtual method for entry count reporting

Module Integration

FormOutputModule

  • Constructor now explicitly declares each product via declareProductName(product, product)
  • Added destructor that calls m_form_interface->finalize() with logging to ensure metadata finalization during teardown

Tests

Metadata Validation

  • New comprehensive test in test/form/writer.cpp (+378 lines) that validates all three metadata registries post-write:
    • Validates FileCatalog exists with proper FileUUID and FileFormatVersion
    • Validates ProductRegistry has entries with properly formatted ProductID (as ProductName|Producer|ProcessName)
    • Validates IndexRegistry with layer schema extraction from TObjString user-info, branch ordering verification, and payload row monotonicity checks
    • Verifies consistency between IndexRegistry and ProductRegistry entries
    • Confirms layer schema matches expected format (e.g., EVENT,SEG)

Test Configuration

  • New test/form/form_test_with_output.jsonnet defining a form test with generate_layers driver, ij_source provider, generic and form modules saving products ['sum', 'i', 'j'], and output file mappings

Summary

The implementation establishes the foundational metadata and indexing infrastructure for fast, fine-grained reading capabilities, enabling future lazy-loading of data products without full file payload scanning. The three-registry approach cleanly separates file-level metadata, logical product identity, and physical location information, with comprehensive validation confirming end-to-end write correctness.

@wwuoneway
wwuoneway requested a review from aolivier23 June 15, 2026 21:16
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review 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

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7ec53351-bad8-4bb2-9945-f3fd0fa7d9b4

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

Walkthrough

Adds product-name propagation and a finalize() lifecycle across the form write stack—from form_writer_interface through PersistenceWriter to StorageWriter. StorageWriter::finalize() now writes FileCatalog, ProductRegistry, and IndexRegistry ROOT metadata trees per output file. A new writer test and Jsonnet config validate the generated trees.

Changes

ROOT metadata tree generation and product-name propagation

Layer / File(s) Summary
Storage and persistence interface contracts
form/storage/istorage.hpp, form/persistence/ipersistence_writer.hpp, form/storage/storage_write_container.hpp, form/storage/storage_write_container.cpp
IStorage_Write_Container gains getEntryCount(); IStorageWriter::fillContainer and IPersistenceWriter::registerWrite each gain an optional product_name parameter; Storage_Write_Container declares and stubs getEntryCount().
form_writer_interface: declareProductName and finalize
form/form/form_writer.hpp, form/form/form_writer.cpp, form/form_module.cpp
form_writer_interface adds declareProductName(), finalize(), and m_label_to_product_name; both write() overloads resolve the declared name before calling registerWrite(); FormOutputModule constructor calls declareProductName per configured product and a new destructor calls finalize().
ROOT container getEntryCount + TFile mode handling
form/root_storage/root_tbranch_write_container.hpp, form/root_storage/root_tbranch_write_container.cpp, form/root_storage/root_ttree_write_container.hpp, form/root_storage/root_ttree_write_container.cpp, form/root_storage/root_tfile.cpp
ROOT_TBranch_Write_ContainerImp and ROOT_TTree_Write_ContainerImp implement getEntryCount() via TTree::GetEntries() with null guards; ROOT_TFileImp adds 'u' (UPDATE/RECREATE) mode, maps 'r'/'i' to READ, and throws on unsupported modes.
StorageWriter: private state, helpers, and fillContainer rework
form/storage/storage_writer.hpp, form/storage/storage_writer.cpp
Header adds fillContainer(product_name) and finalize() overrides plus new private members for index schemas, product/producer/container mappings, and pending-product tracking; storage_writer.cpp adds anonymous-namespace helpers for config lookup, string/index parsing, container classification, process-name resolution, and product-ID building; fillContainer now updates producer/product registries or populates per-file index metadata depending on container type.
StorageWriter::finalize and PersistenceWriter threading
form/storage/storage_writer.cpp, form/persistence/persistence_writer.hpp, form/persistence/persistence_writer.cpp
StorageWriter::finalize() writes FileCatalog, ProductRegistry, and IndexRegistry ROOT trees per file; PersistenceWriter gains m_current_creator, threads product_name through registerWrite(), passes it to the index container in commitOutput(), and adds finalize() delegating to m_store_writer->finalize().
Writer test validation and Jsonnet config
test/form/writer.cpp, test/form/form_test_with_output.jsonnet
writer.cpp calls form.finalize() then validates FileCatalog UUID format, ProductRegistry ProductID structure, IndexRegistry branch ordering/LayerSchema metadata, payload row monotonicity, EVENT/SEG bounds, and cross-registry product ID consistency; form_test_with_output.jsonnet configures the driver, sources, form module products, and an outputs mapping for output.root.

Sequence Diagram(s)

sequenceDiagram
    rect rgba(100, 149, 237, 0.5)
        Note over FormOutputModule: Construction
        FormOutputModule->>form_writer_interface: declareProductName(product, product) ×N
    end

    rect rgba(144, 238, 144, 0.5)
        Note over FormOutputModule: Per-event write
        FormOutputModule->>form_writer_interface: write(creator, segment_id, product_with_name)
        form_writer_interface->>form_writer_interface: lookup declared_name in m_label_to_product_name
        form_writer_interface->>PersistenceWriter: registerWrite(creator, label, data, type, declared_name)
        PersistenceWriter->>PersistenceWriter: cache creator as m_current_creator
        PersistenceWriter->>StorageWriter: fillContainer(placement, data, type, product_name)
        StorageWriter->>StorageWriter: update producer/product registry or index metadata
    end

    rect rgba(255, 165, 0, 0.5)
        Note over FormOutputModule: Teardown / finalize
        FormOutputModule->>form_writer_interface: finalize()
        form_writer_interface->>PersistenceWriter: finalize()
        PersistenceWriter->>StorageWriter: finalize(tech_settings)
        StorageWriter->>RootFile: write FileCatalog (FileUUID, FileFormatVersion)
        StorageWriter->>RootFile: write ProductRegistry (ProductID per producer/product)
        StorageWriter->>RootFile: write IndexRegistry (layer branches, LayerSchema header, entries)
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 'Form write output metadata' accurately captures the primary objective of the PR: adding metadata writing capabilities to FORM output files.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@greenc-FNAL

greenc-FNAL commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

31 fixed, 0 new since branch point (ac671f4)
31 fixed, 0 new since previous report on PR (8183569)

✅ 31 CodeQL alerts resolved since the previous PR commit

  • Warning # 196 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:109:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 197 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:137:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 198 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:157:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 199 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:201:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 200 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:166:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 201 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:188:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 202 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:207:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 203 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:226:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 204 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:251:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 205 actions/untrusted-checkout-toctou/critical at .github/workflows/header-guards-fix.yaml:107:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 206 actions/untrusted-checkout-toctou/critical at .github/workflows/markdown-fix.yaml:107:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 207 actions/untrusted-checkout-toctou/critical at .github/workflows/yaml-fix.yaml:108:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 208 actions/untrusted-checkout-toctou/critical at .github/workflows/yaml-fix.yaml:111:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 209 actions/untrusted-checkout-toctou/high at .github/workflows/clang-format-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 210 actions/untrusted-checkout-toctou/high at .github/workflows/cmake-format-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 211 actions/untrusted-checkout-toctou/high at .github/workflows/jsonnet-format-fix.yaml:95:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 212 actions/untrusted-checkout-toctou/high at .github/workflows/python-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 213 actions/untrusted-checkout/high at .github/workflows/clang-format-fix.yaml:94:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • Warning # 214 actions/untrusted-checkout/high at .github/workflows/cmake-format-fix.yaml:94:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • Warning # 215 actions/untrusted-checkout/high at .github/workflows/jsonnet-format-fix.yaml:95:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • ✅ …and 11 more alerts (see Code Scanning for the full list).

✅ 31 CodeQL alerts resolved since the branch point

  • Warning # 196 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:109:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 197 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:137:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 198 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:157:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 199 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:201:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 200 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:166:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 201 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:188:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 202 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:207:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 203 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:226:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 204 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:251:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 205 actions/untrusted-checkout-toctou/critical at .github/workflows/header-guards-fix.yaml:107:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 206 actions/untrusted-checkout-toctou/critical at .github/workflows/markdown-fix.yaml:107:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 207 actions/untrusted-checkout-toctou/critical at .github/workflows/yaml-fix.yaml:108:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 208 actions/untrusted-checkout-toctou/critical at .github/workflows/yaml-fix.yaml:111:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 209 actions/untrusted-checkout-toctou/high at .github/workflows/clang-format-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 210 actions/untrusted-checkout-toctou/high at .github/workflows/cmake-format-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 211 actions/untrusted-checkout-toctou/high at .github/workflows/jsonnet-format-fix.yaml:95:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 212 actions/untrusted-checkout-toctou/high at .github/workflows/python-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 213 actions/untrusted-checkout/high at .github/workflows/clang-format-fix.yaml:94:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • Warning # 214 actions/untrusted-checkout/high at .github/workflows/cmake-format-fix.yaml:94:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • Warning # 215 actions/untrusted-checkout/high at .github/workflows/jsonnet-format-fix.yaml:95:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • ✅ …and 11 more alerts (see Code Scanning for the full list).

Review the full CodeQL report for details.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

2 new issue(s) introduced by this patch (6000 total).

New issues on modified lines:

  • /__w/phlex/phlex/phlex-src/test/form/writer.cpp:421: warning: narrowing conversion from 'Long64_t' (aka 'long long') to signed type 'int' is implementation-defined
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:11: error: 'boost/uuid/uuid.hpp' file not found

All issues by check:

  • readability-identifier-naming: 1842
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 88
  • readability-convert-member-functions-to-static: 81
  • readability-const-return-type: 47
  • modernize-use-auto: 31
  • modernize-avoid-c-style-cast: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-qualified-auto: 19
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-static-definition-in-anonymous-namespace: 12
  • readability-function-size: 12
  • modernize-concat-nested-namespaces: 10
  • modernize-return-braced-init-list: 10
  • cppcoreguidelines-special-member-functions: 8
  • readability-isolate-declaration: 8
  • readability-container-contains: 8
  • modernize-use-starts-ends-with: 7
  • modernize-use-ranges: 6
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-redundant-access-specifiers: 5
  • readability-container-size-empty: 5
  • modernize-use-std-numbers: 3
  • readability-redundant-casting: 3
  • bugprone-branch-clone: 3
  • clang-analyzer-security.ArrayBound: 2
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • modernize-make-shared: 1
  • performance-move-const-arg: 1
  • clang-diagnostic-error: 1
  • modernize-redundant-void-arg: 1
  • readability-else-after-return: 1
  • bugprone-narrowing-conversions: 1
  • readability-redundant-string-init: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
test/form/writer.cpp (1)

25-26: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Naming convention: use lower_case for constants, not UPPER_CASE.

Per the coding guidelines, UPPER_CASE is reserved for macros. Static constants should use lower_case naming (e.g., number_event, number_segment).

Suggested fix
-static int const NUMBER_EVENT = 4;
-static int const NUMBER_SEGMENT = 15;
+static int const number_event = 4;
+static int const number_segment = 15;

(And update references throughout the file accordingly.)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/form/writer.cpp` around lines 25 - 26, The static constants NUMBER_EVENT
and NUMBER_SEGMENT are using UPPER_CASE naming convention, which is reserved for
macros per the coding guidelines. Rename both constants to use lower_case
naming: number_event and number_segment. Then search through the entire file and
update all references to these constants to use the new lower_case names.

Source: Coding guidelines

form/storage/istorage.hpp (1)

10-13: ⚠️ Potential issue | 🟠 Major

Add <cstdint> and rename getEntryCount() to comply with naming conventions.

Line 71 introduces std::uint64_t without including <cstdint>, which breaks header self-sufficiency and creates a transitive dependency risk. Additionally, getEntryCount() violates the lower_case naming requirement for C++ identifiers—it should be get_entry_count(). This naming issue spans multiple files: storage_write_container.hpp, root_tbranch_write_container.hpp, and root_ttree_write_container.hpp all declare this same method.

Include fix for istorage.hpp
 `#include` <map>
 `#include` <memory>
+#include <cstdint>
 `#include` <string>
 `#include` <vector>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@form/storage/istorage.hpp` around lines 10 - 13, Add the missing `<cstdint>`
header include to form/storage/istorage.hpp before the existing includes to
ensure std::uint64_t is properly defined and resolve the header self-sufficiency
issue. Additionally, rename the method getEntryCount() to get_entry_count() to
comply with C++ lower_case naming conventions—this method needs to be renamed in
all four files: form/storage/istorage.hpp (the interface declaration),
form/storage/storage_write_container.hpp (implementation),
form/storage/root_tbranch_write_container.hpp (implementation), and
form/storage/root_ttree_write_container.hpp (implementation). Update all call
sites that invoke getEntryCount() to use the new get_entry_count() name instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@form/form_module.cpp`:
- Around line 55-61: The ~FormOutputModule() destructor calls
m_form_interface->finalize() without exception handling, which can cause process
termination if an exception is thrown during stack unwinding. Wrap the
m_form_interface->finalize() call in a try-catch block to safely handle any
exceptions that may be thrown, or alternatively move the finalize() call to an
explicit lifecycle method (like a cleanup or shutdown method) where exceptions
can propagate safely rather than being called from the destructor.

In `@form/form/form_writer.cpp`:
- Line 87: Add an idempotency guard to the form_writer_interface::finalize()
method to prevent duplicate metadata writes. Introduce a boolean member variable
to track whether finalize has already been called. In the finalize() method,
check this flag before calling m_pers_writer->finalize(), and set the flag to
true after the first successful call. This ensures that even if finalize() is
called multiple times (by the destructor and by explicit user calls), the
underlying persister's finalize() method is only executed once, preventing
metadata corruption.

In `@form/form/form_writer.hpp`:
- Line 35: Rename the method `declareProductName` to `declare_product_name` to
adhere to the repository's C++ naming conventions which require all identifiers
to use lower_case naming. Update the method declaration in the header file and
ensure the same rename is applied to any implementations and call sites
throughout the codebase.

In `@form/root_storage/root_tbranch_write_container.cpp`:
- Around line 134-140: The getEntryCount() method in
ROOT_TBranch_Write_ContainerImp is returning the tree's entry count via
m_tree->GetEntries() when it should return this specific branch's entry count
instead. This causes incorrect payload_row metadata when fillContainer() uses
this count for IndexRegistry, especially when branches in the shared tree have
different entry counts. Replace the return statement to call GetEntries() on the
branch member variable (likely m_branch or similar) instead of m_tree to ensure
each container reports its own branch's entry count.

In `@form/root_storage/root_tfile.cpp`:
- Around line 14-28: The ROOT_TFileImp constructor is missing validation after
each TFile::Open() call. After each assignment to m_file (for the "RECREATE",
"UPDATE", and "READ" modes), add a check to verify that the returned pointer is
not nullptr and that the TFile is not in a zombie state by calling IsZombie().
If either validation fails, throw a std::runtime_error with a descriptive
message indicating the failure reason and the attempted file mode and path. This
ensures that invalid file states are caught immediately at construction time
rather than causing undefined behavior during later file access operations.

In `@form/storage/istorage.hpp`:
- Line 71: The method name getEntryCount violates the project's lower_case
naming convention for C++ identifiers. Rename the virtual method getEntryCount
to get_entry_count in the interface definition, and then update all
implementations and call sites of this method throughout the codebase to use the
new name instead.

In `@form/storage/storage_writer.cpp`:
- Around line 419-424: The code at lines 419-424 uses an unsafe static_cast to
downcast the TObject pointer retrieved from tfile->Get("FileCatalog") to a TTree
pointer without verifying the actual type. This is dangerous because if the
object exists but is not a TTree (due to file corruption, version mismatches, or
manual edits), the static_cast will produce a non-null pointer to garbage data,
causing undefined behavior. Replace the static_cast<TTree*> with
dynamic_cast<TTree*> to ensure type-safe downcasting, which will return nullptr
if the object is not actually a TTree and allow the null check to properly
detect invalid objects.
- Line 382: Remove the misleading `(void)product_name;` cast statement from the
code. This cast suggests that the product_name parameter is unused when it is
actually utilized within the function (specifically on line 321 in the
non-index-container branch), which will confuse future readers about the
parameter's purpose and usage. Simply delete this line to avoid sending false
signals about the parameter being unused.

---

Outside diff comments:
In `@form/storage/istorage.hpp`:
- Around line 10-13: Add the missing `<cstdint>` header include to
form/storage/istorage.hpp before the existing includes to ensure std::uint64_t
is properly defined and resolve the header self-sufficiency issue. Additionally,
rename the method getEntryCount() to get_entry_count() to comply with C++
lower_case naming conventions—this method needs to be renamed in all four files:
form/storage/istorage.hpp (the interface declaration),
form/storage/storage_write_container.hpp (implementation),
form/storage/root_tbranch_write_container.hpp (implementation), and
form/storage/root_ttree_write_container.hpp (implementation). Update all call
sites that invoke getEntryCount() to use the new get_entry_count() name instead.

In `@test/form/writer.cpp`:
- Around line 25-26: The static constants NUMBER_EVENT and NUMBER_SEGMENT are
using UPPER_CASE naming convention, which is reserved for macros per the coding
guidelines. Rename both constants to use lower_case naming: number_event and
number_segment. Then search through the entire file and update all references to
these constants to use the new lower_case names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6cc1ca9f-d977-4db4-b88c-88f4ba8f8e1a

📥 Commits

Reviewing files that changed from the base of the PR and between 8642304 and 61ee0bb.

📒 Files selected for processing (18)
  • form/form/form_writer.cpp
  • form/form/form_writer.hpp
  • form/form_module.cpp
  • form/persistence/ipersistence_writer.hpp
  • form/persistence/persistence_writer.cpp
  • form/persistence/persistence_writer.hpp
  • form/root_storage/root_tbranch_write_container.cpp
  • form/root_storage/root_tbranch_write_container.hpp
  • form/root_storage/root_tfile.cpp
  • form/root_storage/root_ttree_write_container.cpp
  • form/root_storage/root_ttree_write_container.hpp
  • form/storage/istorage.hpp
  • form/storage/storage_write_container.cpp
  • form/storage/storage_write_container.hpp
  • form/storage/storage_writer.cpp
  • form/storage/storage_writer.hpp
  • test/form/form_test_with_output.jsonnet
  • test/form/writer.cpp
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Analyze cpp with CodeQL
  • GitHub Check: build (gcc, none)
  • GitHub Check: clang-tidy-check
  • GitHub Check: coverage
🧰 Additional context used
📓 Path-based instructions (3)
**/*.jsonnet

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use jsonnetfmt for consistent Jsonnet formatting; CI enforces this

Jsonnet workflow configuration files must be formatted with jsonnetfmt and CI enforces this formatting

Files:

  • test/form/form_test_with_output.jsonnet
**/*.{cpp,cc,cxx,h,hpp}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{cpp,cc,cxx,h,hpp}: Use clang-format tool for all C++ code formatting (VS Code auto-formats on save); configuration defined in .clang-format with 100-character line limit and 2-space indentation
Follow clang-tidy recommendations defined in .clang-tidy

Files:

  • form/storage/istorage.hpp
  • form/root_storage/root_tbranch_write_container.hpp
  • form/root_storage/root_ttree_write_container.hpp
  • form/form/form_writer.hpp
  • form/persistence/ipersistence_writer.hpp
  • form/root_storage/root_tbranch_write_container.cpp
  • form/storage/storage_write_container.cpp
  • form/root_storage/root_ttree_write_container.cpp
  • form/storage/storage_write_container.hpp
  • form/root_storage/root_tfile.cpp
  • form/persistence/persistence_writer.hpp
  • form/persistence/persistence_writer.cpp
  • form/form_module.cpp
  • test/form/writer.cpp
  • form/form/form_writer.cpp
  • form/storage/storage_writer.hpp
  • form/storage/storage_writer.cpp
**/*.{hpp,cpp}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{hpp,cpp}: Use .hpp for C++ header files and .cpp for implementation files; test files should be named *_test.cpp
All C++ identifiers (namespaces, classes, structs, enums, functions, variables, parameters, members, constants, type aliases) must use lower_case naming
Template parameters in C++ must use CamelCase naming
C++ macros must use UPPER_CASE naming
Private, protected, and constant C++ members must have a trailing underscore (_)
Use east-const style in C++: int const x not const int x
Prefer enum class over plain enum in C++
Avoid boolean parameters in C++ function interfaces; prefer enumerations instead
Use std::shared_ptr for shared ownership, std::unique_ptr for exclusive ownership, and raw pointers only for non-owning references in C++
C++ clang-format enforces 100-character line limit and 2-space indentation with QualifierAlignment: Right and PointerAlignment: Left
Use namespaces phlex:: for core code and phlex::experimental:: for experimental features in C++
Use functors with agent noun naming (e.g., ModelEvaluator evaluate_model(...)) in C++

Files:

  • form/storage/istorage.hpp
  • form/root_storage/root_tbranch_write_container.hpp
  • form/root_storage/root_ttree_write_container.hpp
  • form/form/form_writer.hpp
  • form/persistence/ipersistence_writer.hpp
  • form/root_storage/root_tbranch_write_container.cpp
  • form/storage/storage_write_container.cpp
  • form/root_storage/root_ttree_write_container.cpp
  • form/storage/storage_write_container.hpp
  • form/root_storage/root_tfile.cpp
  • form/persistence/persistence_writer.hpp
  • form/persistence/persistence_writer.cpp
  • form/form_module.cpp
  • test/form/writer.cpp
  • form/form/form_writer.cpp
  • form/storage/storage_writer.hpp
  • form/storage/storage_writer.cpp
🪛 Cppcheck (2.21.0)
form/root_storage/root_tbranch_write_container.cpp

[style] 134-134: The function 'getEntryCount' is never used.

(unusedFunction)

form/root_storage/root_ttree_write_container.cpp

[style] 60-60: The function 'getEntryCount' is never used.

(unusedFunction)

form/form/form_writer.cpp

[style] 81-81: The function 'declareProductName' is never used.

(unusedFunction)

form/storage/storage_writer.cpp

[style] 38-38: The function 'getItems' is never used.

(unusedFunction)


[style] 59-59: The function 'createReadContainer' is never used.

(unusedFunction)

🔇 Additional comments (30)
form/storage/storage_writer.hpp (3)

9-16: LGTM!


29-34: LGTM!


43-51: LGTM!

form/storage/storage_writer.cpp (8)

8-27: LGTM!


31-62: LGTM!


64-74: LGTM!


76-103: LGTM!


105-153: LGTM!


155-240: LGTM!


266-268: LGTM!

Also applies to: 291-293


396-401: LGTM!

Also applies to: 426-452, 454-483, 485-582

form/persistence/persistence_writer.hpp (2)

34-40: LGTM!


49-49: LGTM!

form/persistence/persistence_writer.cpp (3)

52-61: LGTM!


64-71: LGTM!


86-87: LGTM!

test/form/writer.cpp (9)

10-12: LGTM!

Also applies to: 21-22


161-164: LGTM!


166-212: LGTM!


214-269: LGTM!


271-330: LGTM!


332-387: LGTM!


478-494: LGTM!


497-532: LGTM!


452-458: Remove check: PayloadRow == entry assumption is correct.

The test's expectation that PayloadRow equals the IndexRegistry entry index is actually sound. Each product write increments the container's entry count—the code captures getEntryCount() before filling and stores that as the payload row. Since each product creates one index entry, the sequence is naturally 0, 1, 2, ... which matches the entry numbers. The code comment at line 333 even confirms this explicitly: "Keep payload row 0-based so it maps directly to entry/row ids."

test/form/form_test_with_output.jsonnet (1)

1-33: LGTM!

form/storage/storage_write_container.cpp (1)

31-31: LGTM!

form/form/form_writer.hpp (1)

31-31: LGTM!

Also applies to: 40-40

form/form/form_writer.cpp (1)

40-43: LGTM!

Also applies to: 72-75

form/root_storage/root_ttree_write_container.cpp (1)

60-66: LGTM!

Comment thread form/form_module.cpp
Comment thread form/form/form_writer.cpp Outdated
Comment thread form/form/form_writer.hpp Outdated
Comment thread form/root_storage/root_tbranch_write_container.cpp
Comment thread form/root_storage/root_tfile.cpp
Comment thread form/storage/istorage.hpp
Comment thread form/storage/storage_writer.cpp Outdated
Comment thread form/storage/storage_writer.cpp
@wwuoneway

Copy link
Copy Markdown
Contributor Author

@phlexbot format

@github-actions

Copy link
Copy Markdown
Contributor

No automatic format fixes were necessary.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

6 new issue(s) introduced by this patch (6019 total).

New issues on modified lines:

  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:418: warning: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:450: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:480: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:557: warning: initializing non-owner argument of type 'TObject *' with a newly created 'gsl::owner<>'
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:574: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead
  • /__w/phlex/phlex/phlex-src/test/form/writer.cpp:421: warning: narrowing conversion from 'Long64_t' (aka 'long long') to signed type 'int' is implementation-defined

All issues by check:

  • readability-identifier-naming: 1846
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 36
  • modernize-avoid-c-style-cast: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-qualified-auto: 19
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • readability-container-contains: 8
  • cppcoreguidelines-special-member-functions: 8
  • readability-isolate-declaration: 8
  • modernize-use-ranges: 7
  • modernize-use-starts-ends-with: 7
  • readability-redundant-access-specifiers: 5
  • readability-container-size-empty: 5
  • readability-inconsistent-declaration-parameter-name: 5
  • cppcoreguidelines-owning-memory: 4
  • bugprone-branch-clone: 3
  • modernize-use-std-numbers: 3
  • readability-redundant-casting: 3
  • modernize-use-emplace: 3
  • clang-analyzer-security.ArrayBound: 2
  • modernize-make-shared: 1
  • bugprone-narrowing-conversions: 1
  • readability-redundant-string-init: 1
  • modernize-redundant-void-arg: 1
  • performance-move-const-arg: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • readability-else-after-return: 1
  • cppcoreguidelines-pro-type-static-cast-downcast: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

6 new issue(s) introduced by this patch (6019 total).

New issues on modified lines:

  • /__w/phlex/phlex/phlex-src/test/form/writer.cpp:421: warning: narrowing conversion from 'Long64_t' (aka 'long long') to signed type 'int' is implementation-defined
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:418: warning: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:450: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:480: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:557: warning: initializing non-owner argument of type 'TObject *' with a newly created 'gsl::owner<>'
  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:574: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead

All issues by check:

  • readability-identifier-naming: 1846
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 36
  • modernize-avoid-c-style-cast: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-qualified-auto: 19
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • cppcoreguidelines-special-member-functions: 8
  • readability-container-contains: 8
  • readability-isolate-declaration: 8
  • modernize-use-ranges: 7
  • modernize-use-starts-ends-with: 7
  • readability-redundant-access-specifiers: 5
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-container-size-empty: 5
  • cppcoreguidelines-owning-memory: 4
  • readability-redundant-casting: 3
  • bugprone-branch-clone: 3
  • modernize-use-emplace: 3
  • modernize-use-std-numbers: 3
  • clang-analyzer-security.ArrayBound: 2
  • performance-move-const-arg: 1
  • readability-redundant-string-init: 1
  • bugprone-narrowing-conversions: 1
  • modernize-redundant-void-arg: 1
  • cppcoreguidelines-pro-type-static-cast-downcast: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • modernize-make-shared: 1
  • readability-else-after-return: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.84431% with 74 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
form/storage/storage_writer.cpp 78.74% 24 Missing and 37 partials ⚠️
form/form_module.cpp 58.33% 4 Missing and 1 partial ⚠️
form/form/form_writer.cpp 76.92% 1 Missing and 2 partials ⚠️
form/root_storage/root_tfile.cpp 72.72% 1 Missing and 2 partials ⚠️
form/root_storage/root_ttree_write_container.cpp 33.33% 1 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main     #647      +/-   ##
==========================================
+ Coverage   83.27%   83.86%   +0.59%     
==========================================
  Files         162      166       +4     
  Lines        5912     6469     +557     
  Branches      670      771     +101     
==========================================
+ Hits         4923     5425     +502     
- Misses        796      807      +11     
- Partials      193      237      +44     
Flag Coverage Δ
scripts 78.86% <ø> (+2.49%) ⬆️
unittests 86.28% <77.84%> (-0.58%) ⬇️

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

Files with missing lines Coverage Δ
form/form/form_writer.hpp 100.00% <ø> (ø)
form/persistence/ipersistence_writer.hpp 100.00% <ø> (ø)
form/persistence/persistence_writer.cpp 100.00% <100.00%> (ø)
form/persistence/persistence_writer.hpp 100.00% <ø> (ø)
form/root_storage/root_tbranch_write_container.cpp 85.50% <100.00%> (+5.20%) ⬆️
form/root_storage/root_tbranch_write_container.hpp 100.00% <ø> (ø)
form/storage/istorage.hpp 100.00% <ø> (ø)
form/storage/storage_write_container.cpp 100.00% <100.00%> (ø)
form/storage/storage_write_container.hpp 100.00% <ø> (ø)
form/storage/storage_writer.hpp 100.00% <ø> (ø)
... and 5 more

... and 3 files with indirect coverage changes


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 ac671f4...bf5988a. Read the comment docs.

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

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

1 new issue(s) introduced by this patch (6012 total).

New issues on modified lines:

  • /__w/phlex/phlex/phlex-src/form/storage/storage_writer.cpp:564: warning: initializing non-owner argument of type 'TObject *' with a newly created 'gsl::owner<>'

All issues by check:

  • readability-identifier-naming: 1847
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 33
  • modernize-avoid-c-style-cast: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-qualified-auto: 19
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • cppcoreguidelines-special-member-functions: 8
  • readability-isolate-declaration: 8
  • readability-container-contains: 8
  • modernize-use-ranges: 7
  • modernize-use-starts-ends-with: 7
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-redundant-access-specifiers: 5
  • readability-container-size-empty: 5
  • bugprone-branch-clone: 3
  • readability-redundant-casting: 3
  • modernize-use-std-numbers: 3
  • modernize-use-emplace: 3
  • clang-analyzer-security.ArrayBound: 2
  • modernize-make-shared: 1
  • readability-else-after-return: 1
  • performance-move-const-arg: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • modernize-redundant-void-arg: 1
  • readability-redundant-string-init: 1
  • cppcoreguidelines-owning-memory: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

Found 6011 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 1847
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 33
  • modernize-avoid-c-style-cast: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-qualified-auto: 19
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • readability-isolate-declaration: 8
  • cppcoreguidelines-special-member-functions: 8
  • readability-container-contains: 8
  • modernize-use-ranges: 7
  • modernize-use-starts-ends-with: 7
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-redundant-access-specifiers: 5
  • readability-container-size-empty: 5
  • bugprone-branch-clone: 3
  • modernize-use-std-numbers: 3
  • readability-redundant-casting: 3
  • modernize-use-emplace: 3
  • clang-analyzer-security.ArrayBound: 2
  • modernize-make-shared: 1
  • readability-else-after-return: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • performance-move-const-arg: 1
  • modernize-redundant-void-arg: 1
  • readability-redundant-string-init: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

Found 6028 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 1859
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 35
  • modernize-avoid-c-style-cast: 22
  • readability-qualified-auto: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • readability-isolate-declaration: 8
  • readability-container-contains: 8
  • cppcoreguidelines-special-member-functions: 8
  • modernize-use-ranges: 7
  • modernize-use-starts-ends-with: 7
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-redundant-access-specifiers: 5
  • readability-container-size-empty: 5
  • bugprone-branch-clone: 3
  • readability-redundant-casting: 3
  • modernize-use-std-numbers: 3
  • modernize-use-emplace: 3
  • clang-analyzer-security.ArrayBound: 2
  • readability-else-after-return: 1
  • performance-move-const-arg: 1
  • readability-redundant-string-init: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • modernize-make-shared: 1
  • modernize-redundant-void-arg: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

Found 6029 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 1859
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 35
  • modernize-avoid-c-style-cast: 22
  • readability-qualified-auto: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-static-definition-in-anonymous-namespace: 12
  • readability-function-size: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • cppcoreguidelines-special-member-functions: 8
  • readability-isolate-declaration: 8
  • readability-container-contains: 8
  • modernize-use-starts-ends-with: 7
  • modernize-use-ranges: 7
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-redundant-access-specifiers: 5
  • readability-container-size-empty: 5
  • readability-redundant-casting: 3
  • bugprone-branch-clone: 3
  • modernize-use-std-numbers: 3
  • modernize-use-emplace: 3
  • clang-analyzer-security.ArrayBound: 2
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • performance-move-const-arg: 1
  • modernize-make-shared: 1
  • readability-redundant-string-init: 1
  • modernize-redundant-void-arg: 1
  • readability-else-after-return: 1
  • performance-avoid-endl: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

Comment thread test/form/form_storage_test.cpp
Comment thread test/form/form_storage_test.cpp Outdated
Comment thread test/form/form_storage_test.cpp Outdated
Comment thread test/form/writer.cpp Outdated
Comment thread test/form/writer.cpp Outdated
Comment thread form/storage/storage_writer.cpp
Comment thread form/storage/storage_writer.cpp
Comment thread form/storage/storage_writer.cpp
Comment thread form/storage/storage_writer.cpp
Comment thread form/storage/storage_writer.cpp
Comment thread form/storage/storage_writer.cpp

@aolivier23 aolivier23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The big change I need to approve this is to make form_storage_test technology-independent again. I'm biased because making it work with other technologies was my work a few weeks ago. But I think RNTuple containers are important enough to the long-term project that we shouldn't undo that work without a compelling reason. I think we can do that with some small changes to the existing code in this PR. But a TTree-container-specific separate test program could also make sense.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

Found 6031 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 1859
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 35
  • modernize-avoid-c-style-cast: 22
  • readability-qualified-auto: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • readability-container-contains: 8
  • readability-isolate-declaration: 8
  • cppcoreguidelines-special-member-functions: 8
  • readability-container-size-empty: 7
  • modernize-use-ranges: 7
  • modernize-use-starts-ends-with: 7
  • readability-redundant-access-specifiers: 5
  • readability-inconsistent-declaration-parameter-name: 5
  • bugprone-branch-clone: 3
  • readability-redundant-casting: 3
  • modernize-use-std-numbers: 3
  • modernize-use-emplace: 3
  • clang-analyzer-security.ArrayBound: 2
  • readability-else-after-return: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • performance-move-const-arg: 1
  • performance-avoid-endl: 1
  • modernize-redundant-void-arg: 1
  • modernize-make-shared: 1
  • readability-redundant-string-init: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@wwuoneway
wwuoneway force-pushed the form-write-output-metadata branch from a4fa8d2 to 8183569 Compare June 16, 2026 20:36
@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

Found 6029 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 1858
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 35
  • modernize-avoid-c-style-cast: 22
  • readability-qualified-auto: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • readability-container-contains: 8
  • cppcoreguidelines-special-member-functions: 8
  • readability-isolate-declaration: 8
  • readability-container-size-empty: 7
  • modernize-use-starts-ends-with: 7
  • modernize-use-ranges: 6
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-redundant-access-specifiers: 5
  • bugprone-branch-clone: 3
  • modernize-use-std-numbers: 3
  • readability-redundant-casting: 3
  • modernize-use-emplace: 3
  • clang-analyzer-security.ArrayBound: 2
  • modernize-make-shared: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • performance-move-const-arg: 1
  • readability-redundant-string-init: 1
  • modernize-redundant-void-arg: 1
  • performance-avoid-endl: 1
  • readability-else-after-return: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

Found 6033 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 1858
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1208
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 100
  • readability-braces-around-statements: 90
  • readability-convert-member-functions-to-static: 80
  • readability-const-return-type: 47
  • modernize-use-auto: 36
  • readability-qualified-auto: 25
  • modernize-avoid-c-style-cast: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 20
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • modernize-concat-nested-namespaces: 10
  • cppcoreguidelines-special-member-functions: 8
  • readability-container-contains: 8
  • readability-isolate-declaration: 8
  • readability-container-size-empty: 7
  • modernize-use-starts-ends-with: 7
  • modernize-use-ranges: 6
  • readability-redundant-access-specifiers: 5
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-redundant-casting: 3
  • bugprone-branch-clone: 3
  • modernize-use-emplace: 3
  • modernize-use-std-numbers: 3
  • clang-analyzer-security.ArrayBound: 2
  • performance-move-const-arg: 1
  • modernize-redundant-void-arg: 1
  • readability-else-after-return: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • performance-avoid-endl: 1
  • modernize-make-shared: 1
  • readability-redundant-string-init: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@aolivier23 aolivier23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me.

@wwuoneway
wwuoneway merged commit c72c868 into Framework-R-D:main Jun 16, 2026
39 checks passed
@gemmeren
gemmeren requested review from gemmeren, knoepfel and pcanal June 24, 2026 15:56

@gemmeren gemmeren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know this PR has been merged already, still adding a few experts for review.

My conclusion is that this introduces a new and unwanted dependency of the technology neutral Storage on ROOT and TTree that fundamentally violates FORM design.

@wwuoneway and I are not in agreement on whether this should be part of a public 0.3 release.

@beojan

beojan commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This PR introduced a use of std::uint64_t in istorage.hpp which is causing a compile error when I build locally.

I don't know why CI didn't catch this, though CodeRabbit did leave a comment about this (but hidden in the "outside diff range" section).

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.

5 participants