Repository navigation
fix(native_segments): walk the partitions of Revit 2016 and 2017 (#421) - #571
Merged
Merged
Conversation
A real-file target: native_segments::walk reads every partition of every family of 2016 to 2026 with the file's own schema, each yielding a group. Red on main (5131dc7), draft PR #566, build + real files / ubuntu-latest / stable (and windows-latest): thread 'every_family_partition_walks_to_its_end' panicked at tests/native_partitions_walk.rs:66:5: native_segments::walk reads every family partition to its end: ["2016 Partitions/58: partition schema class absent: SignatureMarker", "2017 Partitions/60: partition schema class absent: SignatureMarker", "2018: schema: schema name byte budget at 351466: 786452"] test result: FAILED. 0 passed; 1 failed The expected reasons: 2016 and 2017 have no SignatureMarker class (puzzbobb, #421); 2018's schema stop is fixed by #561, now on main.
The 2016 and 2017 schemas have no SignatureMarker class and their partitions write none, so walk now requires the class only where a marker is met. m_continuationBits is (n << 2) | flags with n = 1 from 2018 and 100 or more before (puzzbobb, #421); walk accepted only 4 to 7 and now reads the continuation flags from the low two bits, requiring n to be set. The native record path still admits only 2023, 2024 and 2027 (the pre-2018 size accounting and id width are not needed to walk).
DrunkOnJava
enabled auto-merge (squash)
October 3, 2026 11:18
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
native_segments::walkstopped on every 2016 and 2017 partition, for two reasons (puzzbobb, #421).SignatureMarkerclass. The 2016 and 2017 schemas lack it, and their partitions never write one. It is now required only where a marker is met.m_continuationBits. The word is(n << 2) | flags, withn= 1 from 2018 and 100 or more before.walkaccepted only 4 to 7. It now reads the continuation flags (1 = from the previous segment, 2 = into the next) from the low two bits, and requiresnto be set.The native record path still admits only 2023, 2024 and 2027. Admitting 2016 to 2022 needs the pre-2018 size accounting and the per-group id width, and a Revit export to check against.
The commits are separate:
test(native_segments)adds the real-file targettests/native_partitions_walk.rs: every partition of every family from 2016 to 2026 walks to its end. Its red run onmain(draft PR red run: native_partitions_walk (B06, do not merge) #566) is in the commit message. 2016 and 2017 failed onSignatureMarker, and 2018 on the schema stop that fix(schema_registry): read the trailing references of Revit 2018's SiteSurface.m_facets (#421, #154) #561 has since fixed.Note
Medium Risk
Changes low-level partition segment parsing used by the native path; scope is narrow (walk + optional markers) and covered by a broad corpus test, but mistakes could affect partition reads on older Revit files.
Overview
native_segments::walkno longer fails on pre-2018 family partitions. Two format mismatches from #421 are addressed:SignatureMarkeris optional at startup (2016/2017 schemas lack the class and never write the marker), and segment continuation validation uses the low flag bits only—m_continuationBitsis(n << 2) | flagswith largenbefore 2018, so the old4..=7check wrongly rejected valid markers.A new real-file test
tests/native_partitions_walk.rswalks everyPartitions/*stream for corpus samples 2016–2026 and expects at least one decompressed group per partition; CI lists it intools/ci/test-targets.txt. CHANGELOG documents the fix. The native record extraction path is unchanged and still limited to 2023, 2024, and 2027.Reviewed by Cursor Bugbot for commit 4784a82. Configure here.
Measured
Measure run 37118576160 compared head against
mainwith the families and samples: all 6 model IFCs are byte-identical, and every scorer,rvt-infoand diagnostics output is identical on 6 models, 11 families and 36 samples.