Skip to content

red run: native_partitions_walk (B06, do not merge) - #566

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/b06-native-partitions-walk
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/b06-native-partitions-walk

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Scratch PR for a red run of tests/native_partitions_walk.rs on main. Closed and its branch deleted once CI reports.


Note

Low Risk
Test-only and CI manifest changes; no production reader or export logic is modified in this diff.

Overview
Adds a real-file integration test that exercises native_segments::walk on every Partitions/* stream in the family corpus samples (2016–2026), using each file’s Formats/Latest schema via schema_registry::parse. Each partition must complete the walk and produce at least one group; failures are collected per year/stream, and missing samples are skipped unless RVT_REQUIRE_CORPUS is set (same pattern as other corpus tests).

Registers native_partitions_walk in tools/ci/test-targets.txt so CI and the local gate run it. The module docs call out #421 expectations for pre-2018 families (no SignatureMarker, different SegmentMarker.m_continuationBits encoding).

Reviewed by Cursor Bugbot for commit 4218651. Configure here.

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.
Expected red on main: 2016 and 2017 stop on the absent SignatureMarker
class (and 2018 on the schema until #561 lands).
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red run captured; the test lands in the B06 fix PR.

@DrunkOnJava DrunkOnJava closed this Oct 3, 2026
@DrunkOnJava
DrunkOnJava deleted the red/b06-native-partitions-walk branch October 3, 2026 11:05
DrunkOnJava added a commit that referenced this pull request Oct 3, 2026
… (#571)

`native_segments::walk` stopped on every 2016 and 2017 partition, for
two reasons (puzzbobb, #421).

- **No `SignatureMarker` class.** 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`, with `n` = 1
from 2018 and 100 or more before. `walk` accepted 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 requires `n` to 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:

1. `test(native_segments)` adds the real-file target
`tests/native_partitions_walk.rs`: every partition of every family from
2016 to 2026 walks to its end. Its red run on `main` (draft PR #566) is
in the commit message. 2016 and 2017 failed on `SignatureMarker`, and
2018 on the schema stop that #561 has since fixed.
2. The fix.

<!-- CURSOR_SUMMARY -->
---

> [!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::walk`** no longer fails on pre-2018 family
partitions. Two format mismatches from #421 are addressed:
**`SignatureMarker`** is 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_continuationBits` is `(n << 2)
| flags` with large `n` before 2018, so the old `4..=7` check wrongly
rejected valid markers.
> 
> A new real-file test **`tests/native_partitions_walk.rs`** walks every
`Partitions/*` stream for corpus samples **2016–2026** and expects at
least one decompressed group per partition; CI lists it in
**`tools/ci/test-targets.txt`**. **CHANGELOG** documents the fix. The
**native record extraction path** is unchanged and still limited to
2023, 2024, and 2027.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
4784a82. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->


## Measured

Measure run 37118576160 compared head against `main` with the families
and samples: all 6 model IFCs are byte-identical, and every scorer,
`rvt-info` and diagnostics output is identical on 6 models, 11 families
and 36 samples.
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.

1 participant