Repository navigation
red run: schema_registry_catalogs (B03, do not merge) - #560
Closed
DrunkOnJava wants to merge 1 commit into
Closed
DrunkOnJava wants to merge 1 commit into
DrunkOnJava wants to merge 1 commit into
Conversation
Owner
Author
|
Red run captured (run 37116554570); the test lands in the B03 fix PR. |
DrunkOnJava
added a commit
that referenced
this pull request
Oct 3, 2026
…teSurface.m_facets (#421, #154) (#561) `schema_registry::parse` is the parser the native record path uses. It stopped at byte 351,466 of the Revit 2018 catalog (`schema name byte budget`), on Autodesk's 2018 family and on 2018 `rac_basic`. The cause is one member shape. A composite member that is not itself an array, over a fixed array of plain class references, writes those references once more after the nested descriptor. That member is 2018's `SiteSurface.m_facets` (`0x500d` over `0x100e`), the only one of that shape in any catalog from 2016 to 2027 (puzzbobb, #421 and #154). The parser read the reference once, so it read the next member's name length two bytes early. It now reads the trailing references and checks that their tags match. The fix is written from the byte rule; the patch in the report is not copied (CLEANROOM.md). The commits are separate: 1. `test(schema_registry)` adds the real-file target `tests/schema_registry_catalogs.rs`. Every family catalog from 2016 to 2026 must be read to its end and give the same classes, by tag and name, as `formats::schema_classes`. Its red run on `main` is in the commit message (draft PR #560, run 37116554570): `["2018: schema name byte budget at 351466: 786452"]`. No other release failed. 2. The fix. This unblocks the 2018 part of B06 (the native path on 2016 to 2022) and the #154 checklist item "every schema is read to its end". <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes binary schema parsing on the native path; scope is narrow (one catalog member shape) but wrong handling would break schema/class resolution for affected files. > > **Overview** > **Fixes Revit 2018 family catalog parsing** so `schema_registry::parse` (used on the native record path) no longer stops mid-stream with a schema name byte budget error. > > The bug was a one-off member layout: a non-array composite over a fixed array of plain class references repeats those references after the nested descriptor (`SiteSurface.m_facets` in 2018). The parser now consumes that trailing reference block and checks tag agreement. > > **Regression coverage:** new real-file test `schema_registry_catalogs` reads every `Formats/Latest` family catalog (2016–2026) to EOF and compares class tag/name sets to `formats::schema_classes`; CI picks up the target via `tools/ci/test-targets.txt`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e760ad7. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Scratch PR for a red run of tests/schema_registry_catalogs.rs on main. Closed and its branch deleted once CI reports.
Note
Low Risk
Test-only change plus CI manifest entry; no production parsing logic is modified in this diff.
Overview
Adds a real-file integration test that locks in parity between two ways of reading each release’s
Formats/Latestschema catalog (2016–2026):schema_registry::parse(used on the native record path) versusRevitFile::schema_classes().For every year with a corpus sample, the test compares tag→name class maps and fails on parse errors or mismatched class counts. Missing samples are skipped unless
RVT_REQUIRE_CORPUSis set, matchingelem_table_corpus.rs. The test is documented as guarding regressions whereschema_registry::parsestopped early (e.g. Revit 2018, #421/#154).CI: registers
schema_registry_catalogsunder therealclass intools/ci/test-targets.txtso it runs in the local gate and CI like other corpus-backed tests.Reviewed by Cursor Bugbot for commit f92ce6a. Configure here.