Skip to content

Provenance for every element: carrier, stream, record offset, class and release #1325

Closed

Description

@DrunkOnJava

Every decoded element carries its provenance down to the bytes, so an answer about an element can be checked against the file.

Per element

  • Carrier. One of: partition element record (first or second prologue), Global/Latest schema walk, or native record by member name. Plus which copy was used when a partition holds several (RE-216: current or agreeing).
  • Location. Stream (Partitions/NN) and byte offset in the inflated stream. rvt-dump writes that stream as Partitions_NN.decomp, so the offset indexes it directly (fix(rvt-dump): write exactly the bytes the parsers read #291). Plus the enclosing chain record's id for second-prologue frames (RE-35).
  • Identity. Class tag and the class name it resolves to in the file's own schema, the BuiltInCategory, and the ElementId.
  • Sources. For each written value that is not read directly (body, profile, height, outline): the source the trust markers already name (BodySource, ProfileSource, SpaceOutlineSource, AreaBodyRefusal).

Per file

Revit release and build (BasicFileInfo), the schema's class count, the ElemTable record layout (28 or 40 bytes), and the partition count.

Where it goes

Diagnostics JSON and the decoded model the MCP server and bindings read, never users' IFC (hand-off values stay out of the IFC, 2026-11-03).

Done when

  • PartitionElementRecord, DecodedElement::byte_range and the native-record readers feed one ElementId-keyed provenance table.
  • An E2E check on the corpus confirms each reported offset: at that offset in rvt-dump's Partitions_NN.decomp, the record decodes to the same ElementId.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:partitionspriority:P1type:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions