🤖 AI generated content
Found while wiring the root-io-spec fixtures into the test suite (#76, PR #112). Two gaps, both in the test walker (_walk_branchlist in tests/test_read.py) rather than in src/:
1. TBranchSTL is rejected. tests/test_read.py:143-145 raises TypeError: Expected TBranch but got TBranchSTL for any branch class other than TBranch/TBranchElement/TBranchObject. Affected fixtures: ttree/branch-first-entry.root and ttree/split-ptr-collection.root (both currently expected failures in tests/test_spec_fixtures.py). Simply whitelisting the class is not enough: the walker then uses the sub-branch's empty fClassName and tries to read the basket as objects (Unknown type '', then struct.error: unpack requires a buffer of 4 bytes).
Spec: Splitting §5 "Collections of pointers, and TBranchSTL" describes the arrangement (std::vector<T*> split with kSplitCollectionOfPointers) and what a TBranchSTL basket holds. The spec notes no file in its corpora does this in the wild — ttree/split-ptr-collection is its only evidence — so this is low priority.
2. Baskets of fundamental-type branches are never read. The walker only fetches baskets it can interpret as objects, so ttree/basket-iofeatures.root passes the walk even though its baskets cannot be parsed (#96). PR #112 pins #96 with a dedicated test that reads one basket record directly; the walker should read (at least the header and entry offsets of) every basket so that #96 and #97 are exercised across the whole corpus, skhep files included.
Severity / size: low, S–M (test code only, but (1) needs a decision on how far the test walker should go in interpreting split collections).
Related: #66, #76, #96, #97, #101.
Assisted-by: claude-code:claude-fable-5-1
Found while wiring the root-io-spec fixtures into the test suite (#76, PR #112). Two gaps, both in the test walker (
_walk_branchlistintests/test_read.py) rather than insrc/:1.
TBranchSTLis rejected.tests/test_read.py:143-145raisesTypeError: Expected TBranch but got TBranchSTLfor any branch class other thanTBranch/TBranchElement/TBranchObject. Affected fixtures:ttree/branch-first-entry.rootandttree/split-ptr-collection.root(both currently expected failures intests/test_spec_fixtures.py). Simply whitelisting the class is not enough: the walker then uses the sub-branch's emptyfClassNameand tries to read the basket as objects (Unknown type '', thenstruct.error: unpack requires a buffer of 4 bytes).Spec: Splitting §5 "Collections of pointers, and
TBranchSTL" describes the arrangement (std::vector<T*>split withkSplitCollectionOfPointers) and what aTBranchSTLbasket holds. The spec notes no file in its corpora does this in the wild —ttree/split-ptr-collectionis its only evidence — so this is low priority.2. Baskets of fundamental-type branches are never read. The walker only fetches baskets it can interpret as objects, so
ttree/basket-iofeatures.rootpasses the walk even though its baskets cannot be parsed (#96). PR #112 pins #96 with a dedicated test that reads one basket record directly; the walker should read (at least the header and entry offsets of) every basket so that #96 and #97 are exercised across the whole corpus, skhep files included.Severity / size: low, S–M (test code only, but (1) needs a decision on how far the test walker should go in interpreting split collections).
Related: #66, #76, #96, #97, #101.
Assisted-by: claude-code:claude-fable-5-1