Skip to content

RE: Reproduce complete Formats/Latest parsing and serialization-tag assignment #154

Closed

Description

@DrunkOnJava

Provenance and credit

This issue records a finding reported by @STE1200 and their team in Discussion #112, “Set of findings”. Thank you to Steffen and the team for reporting both the full-parse result and the serialization-tag evidence.

The technical statements below are reported claims, not yet independently reproduced by rvt-rs. Griffin will carry the repository-side investigation, tests, implementation, and documentation; this issue does not assign the missing write-up or fixes to Steffen's team.

Reported finding

For a Revit 2014 input, Formats/Latest reportedly parses 3,619 classes without aborting after two small grammar fixes. The report also states that there is evidence identifying how the real serialization tag is assigned.

The reporter notes that this partly overlaps the reconnaissance document's Q4 addendum.

Reported evidence

The reported oracle is a complete 3,619-class parse on the team's 2014 manufacturer-family investigation. Discussion #112 intentionally does not spell out the two grammar changes or the serialization-tag assignment rule. This issue must track obtaining or independently deriving those exact details; it must not guess them.

Why it matters

A complete, non-aborting schema parse would improve the foundation for field decoding and version-aware class resolution. Correctly distinguishing the real serialization tag from nearby grammar identifiers is important because a plausible but wrong tag assignment can propagate incorrect decoding decisions without an obvious failure.

Independent verification still required

  • Establish the current rvt-rs class count and first parse failure on the same or an equivalent provenance-safe 2014 input.
  • Identify the two grammar cases from byte/text evidence and show why each change is necessary.
  • Reproduce the 3,619-class count and define whether aliases, nested definitions, or skipped entries affect that number.
  • Derive and validate the serialization-tag assignment rule against multiple classes rather than a single example.
  • Compare the result with the existing Q4 addendum and record which parts are confirmations, corrections, or new evidence.

The hypothesis would be falsified or narrowed if the grammar changes do not generalize, if the reported count depends on silently skipped input, or if the proposed serialization tag fails independent class/instance checks.

Repository-side acceptance criteria

Status 2026-09-30 (#410, RE-76, RE-80, RE-133):

  • A probe that reports class count, why parsing stopped and candidate serialization tags: examples/probe_re133_class_ordinals.rs prints, per file, the number of classes, the bytes parsed, why parsing stopped (None when it reached the end of Formats/Latest) and the tag and base class of ten classes. Run on the 11 Autodesk family files (2016 to 2026) and the six MIT models: every schema is read to its end, 3,792 classes on 2016 to 4,690 on 2026.
  • The grammar, from STE1200's report (Discussion Set of findings #112), implemented in formats::schema_classes: a class's tag is its definition ordinal, 12 for the first, with an inline parent or field class taking the next number.
  • Reproduce or refute the reported 3,619-class parse of a Revit 2014 family on an allowed 2014 fixture. Reproduced: formats::schema_classes reads the Stertil 2014 family STE1200 pointed to (pinned in research/public-families.tsv, RE-147) to its end, 3,619 classes, 367,595 bytes, nothing stopped (Measure run 37120169355, probe_re133_class_ordinals).
  • Cross-class evidence for the tag rule: jakobhirn-bit's independent count for ten classes on Revit 2024 and 2026 equals rvt-rs's tags on 20 of 20 values, and STE1200's ElementHeader tags for 2017, 2018, 2022, 2023, 2024 and 2026 are the same table (RE-133). The element records name their class by these tags (RE-76).
  • Minimal synthetic regression cases superseded by the repository's no-unit-test policy; RE-133 is the end-to-end artifact, with its probe and the run that produced it.
  • Diagnostics for a grammar that stops early: SchemaClasses::stopped says why, and parsed_bytes how far.
  • Reconcile the result with the Q4 addendum of the reconnaissance document and record which parts confirm, correct or add to it. RE-137 (research(elements): RE-136 older releases and the ElemTable lengths, RE-137 the Q4 reading (#152) (#153) (#154) (#548) #549): the addendum's "ancestor class" does not reproduce under the corrected grammar on 17 files of 2016 to 2026. None of its nine classes has the base it named (HostObjAttr has base Symbol, which the addendum called its parent), and every base reference of every class resolves (3,023 of 3,023 on a 2024 file). The addendum, the README and the ancestor_tag field documentation now say so. The legacy word is the grandparent's tag, and ClassEntry::tag the base's, on every class of 53 files of 2016 to 2027 (RE-146, research(schema): RE-146 the Q4 word is the grandparent's tag, and ClassEntry::tag is the base's (#154) #563, as puzzbobb reported). schema_registry::parse also reads every family catalog of 2016 to 2026 to its end since fix(schema_registry): read the trailing references of Revit 2018's SiteSurface.m_facets (#421, #154) #561 (tests/schema_registry_catalogs.rs).

The probe, tests, and documentation should follow the repository's reverse-engineering contribution requirements.

Activity

  1. added
    needs-triage
    re-finding
    area:reader
    priority:P0
    type:research
    and removed
    needs-triage
    on Aug 29, 2026
  2. DrunkOnJava commented on Aug 29, 2026

    @DrunkOnJava
    OwnerAuthor

    Audit hygiene (GOV-002 / §18 first-48h): removed stale needs-triage from this maintainer-filed research issue. Related SEC-001 security-reporting fix lands via cursor/audit-p0-security-67f9.

  3. added
    priority:P1
    research-critical
    and removed
    priority:P0
    on Aug 30, 2026
  4. DrunkOnJava commented on Aug 30, 2026

    @DrunkOnJava
    OwnerAuthor

    Relabelled P0 → P1 + research-critical (audit finding GOV-002: P0 is reserved for immediate release or security impact; this item is gated on format evidence / an oracle, which engineering time alone does not change). Scope and status are unchanged.

  5. self-assigned this
    on Aug 30, 2026
  6. DrunkOnJava commented on Sep 27, 2026

    @DrunkOnJava
    OwnerAuthor

    Milestone review, 2026-09-27: format research with no user-facing acceptance criterion yet is kept open but not scheduled in a release milestone, so it neither blocks a release nor inflates one. When a finding here unlocks something a user can check (an element, a property, a geometry residual against Revit's export), that slice goes into the milestone it serves. Nothing about this issue's substance or credit changes.

  7. 11 remaining items

  8. puzzbobb commented on Oct 2, 2026

    @puzzbobb
    Contributor

    A note on the first checklist item. "Every schema is read to its end" holds for formats::schema_classes, but the native path parses the schema with schema_registry::parse, and that one stops on Revit 2018.

    On c5f7e43, using Autodesk's 2018 family (the phi-ag corpus) and 2018 rac_basic (in research/autodesk-sample-projects.tsv):

    parser 2018 family 2018 rac_basic
    formats::schema_classes (probe_re133_class_ordinals) 4,024 classes, 418,793 of 418,793 bytes 4,024 classes, 418,793 of 418,793 bytes
    schema_registry::parse schema name byte budget at 351466: 786452 same

    The member before byte 351,466 is SiteSurface.m_facets, descriptor 0x0000500d, a composite over a nested 0x0000100e (a 3-element array of plain class references). Its class reference is written twice, once for the nested descriptor and once after it (14 00 14 00). schema_registry reads one, so the next member's name length is read 2 bytes early. No other member of any 2016 to 2027 catalog has that shape.

    The fix, and a probe run on 33 files (only the 2018 rows change), are in my #421 comment.

    So "every schema is read to its end" holds for schema_classes on all 11 families, and for schema_registry on every family but 2018.

  9. DrunkOnJava commented on Oct 3, 2026

    @DrunkOnJava
    OwnerAuthor

    Thank you, both comments reproduce.

    The Q4 word (RE-146, #563). Measured on 53 files: the eleven Autodesk families, Autodesk's 36 sample projects of 2016 to 2027, and the six reference models. On every class formats::parse_schema tags, ClassEntry::tag is the base's tag and never the class's own. ancestor_tag is the grandparent's tag on every class that has one. On 2024, for example, that is 400 of 400 and 98 of 98. No counterexample on any file (Measure run 37116713027). ClassEntry's docs and the reconnaissance document's Q4 addendum now say so, and the report is reports/element-framing/RE-146-q4-word-is-the-grandparent.md.

    One consequence we are following up: the schema-directed walker, SchemaTable::tagged_ancestor and rvt-analyze use ClassEntry::tag as the class's own tag.

    schema_registry on 2018 (#561). Fixed, from your byte rule: a composite that is not itself an array, over a fixed array of plain class references, reads those references once more after the nested descriptor. The fix is written fresh rather than taken from the patch, as CLEANROOM.md asks. A new real-file target, tests/schema_registry_catalogs.rs, now requires every family catalog of 2016 to 2026 to read to its end with schema_registry::parse and give the same classes as schema_classes. Its red run on main failed on 2018 only (schema name byte budget at 351466: 786452).

    Before 2014. We hold no 2008 to 2013 file, so the GUID-list part is not reproduced here. For 2014, STE1200's Stertil family is now pinned and fetched for Measure runs (RE-147, #568). I will run the class-ordinal probe on it for the 3,619-class item once that lands.

  10. DrunkOnJava commented on Oct 3, 2026

    @DrunkOnJava
    OwnerAuthor

    The 3,619-class item is reproduced. formats::schema_classes reads the Stertil 2014 family (pinned in research/public-families.tsv, RE-147) to its end: 3,619 classes, 367,595 bytes, nothing stopped. That is your count, on a file anyone can fetch (Measure run 37120169355). Checklist ticked.

  11. DrunkOnJava commented on Oct 19, 2026

    @DrunkOnJava
    OwnerAuthor

    Every repository-side criterion above is met: the class-ordinal probe and grammar (RE-133, formats::schema_classes), the 3,619-class Revit 2014 parse reproduced on the pinned Stertil family (RE-147, Measure run 37120169355), jakobhirn-bit's ten-class count matched on 20 of 20 values, the stop diagnostics, and the Q4 reconciliation (RE-137, #549). The synthetic regression item is superseded by the no-unit-test policy, as its line says; RE-133 is the end-to-end artifact. Thank you, STE1200, puzzbobb and jakobhirn-bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:readerpriority:P1re-findingresearch-criticaltype:research

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions