Skip to content

red run: schema_registry_catalogs (B03, do not merge) - #560

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/b03-schema-registry-2018
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/b03-schema-registry-2018

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

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/Latest schema catalog (2016–2026): schema_registry::parse (used on the native record path) versus RevitFile::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_CORPUS is set, matching elem_table_corpus.rs. The test is documented as guarding regressions where schema_registry::parse stopped early (e.g. Revit 2018, #421/#154).

CI: registers schema_registry_catalogs under the real class in tools/ci/test-targets.txt so it runs in the local gate and CI like other corpus-backed tests.

Reviewed by Cursor Bugbot for commit f92ce6a. Configure here.

…421)

A real-file target: schema_registry::parse, the native path's parser,
reads each family's Formats/Latest (2016 to 2026) and gives the same
classes as formats::schema_classes. Expected red on main: Revit 2018
stops at byte 351,466 (puzzbobb, #421 and #154).
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red run captured (run 37116554570); the test lands in the B03 fix PR.

@DrunkOnJava DrunkOnJava closed this Oct 3, 2026
@DrunkOnJava
DrunkOnJava deleted the red/b03-schema-registry-2018 branch October 3, 2026 10:32
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 -->
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