Skip to content

(Feat) 2008 2010 native records - #2307

Open
puzzbobb wants to merge 2 commits into
DrunkOnJava:mainfrom
puzzbobb:feat-2008-2010-native-records
Open

puzzbobb wants to merge 2 commits into
DrunkOnJava:mainfrom
puzzbobb:feat-2008-2010-native-records

Conversation

@puzzbobb

@puzzbobb puzzbobb commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Summary

RE-511. The native record reader, and with it saved parameters, now works on Revit 2008 to 2010. Stacked on the 2011 to 2014 PR (RE-510); review that first.

A partition of these releases has no segments. After the 8-byte header (word 4 on 2008, 5 on 2009 and 2010) it is one gzip member, which holds three sections followed by a word of 0:

section channel record closed by
1 101 id, length, body, length an empty record with id u32::MAX
2 102 id, word, length, body, length an empty record with id u32::MAX and word 1
3 103 as section 2 as section 2

On 2008, sections 2 and 3 have no id. Their records are channel 101's in the same order, as 2009 and 2010 list them.

native_segments::walk_selected reads this layout where the schema has no SegmentMarker and the header word is 4 or 5. It gives each section to the callback as one group of its channel, so group_records frames the records as it does from 2011 on. On 2008 it writes each record's id in, in a copy. No marker declares counts on these releases, so the walker checks each record's two lengths, each section's close, that every section has section 1's length and ids, the final word, and that the terminal is under one page.

NamedParam has no m_reporting before 2011, so such a slot is read as not reporting. FRAMED_RELEASES and PARAMETER_RELEASES now start at 2008. Every other reader keeps NATIVE_RELEASES.

Evidence

Four local, closed-source files (2008, 2009 twice, 2010), the only files of those releases held. Hashes are in the report.

  • Framing: all 10 partitions frame whole. 98.7 to 100% of the elements' graphs decode; the refusals are VarSketch, RefPlane and Viewport, as on later releases. Every decoded graph names its record's id as its owner, 17,769 of 17,769 on 2008, which checks the positional ids.
  • rvt-elements: 721, 1,154, 54 and 8 saved parameter values where there were none. Everything else it prints is identical, and it prints the same bytes as the 2011 to 2014 branch on that branch's files and four later controls.
  • rvt-ifc default export: identical to main apart from the timestamp on all 16 files.
  • Not checked: no later save of these models is held, so no value is held to another reading. As a check of sense, the 2008 bridge's lengths are whole millimetres, and its ElementId values name materials and nested types.

Tests and checks

  • New tests/pre2011_native_records.rs, a local target reading RVT_PRE2011_DIR, holds the four files to the report's counts. CI does not run it.
  • The integration suite passes with every local corpus (358).
  • fmt, clippy (--test integration), rustdoc, MSRV 1.87, measured_numbers, api-doc-ids, cited-runs-kept, readme-matrix, changelog.py check and verify-real-files.sh --check-only pass. clippy --lib stops only on partition_name_candidates.rs, as it does on main.

…r saved parameters (RE-510)

Five things stopped the native reader before Revit 2015:
- a schema of 2008 to 2013 has no GUID list after a class's fields;
- the element table writes its IdentifierSource after a shared-object
  token, not u32::MAX, on 2008 to 2014;
- an Element of 2008 to 2013 has up to five fields 2014 dropped;
- 2008 to 2011 have no extensible storage;
- Revit 2011 writes its partition segments with no class tag.

With them read, every record group of nine local files of 2011 to 2014
frames as on 2015 to 2017, 98.7 to 99.4 per cent of the graphs decode and
the Element base decodes on every record. FRAMED_RELEASES (2011 to 2027)
is what frames; NATIVE_RELEASES stays the readers' measured default, and
only saved parameters widen. On Autodesk's 2013 rac_advanced every one of
the 59,683 values rvt-elements reads that its 2015 save holds is equal.
The default IFC export is unchanged. Revit 2008 to 2010 partitions are
one gzip member with no record channels and stay unread.
…r saved parameters (RE-511)

A Revit 2008 to 2010 partition is one gzip member, not segments. The
member holds the partition's records as three sections, channels 101,
102 and 103 in that order, each framed as from 2011 on, closed by an
empty record and listing the same elements in the same order. On 2008
the records of channels 102 and 103 carry no id: they are given channel
101's in the same place, and every graph they decode to names that id
as its owner.

On the four local files of 2008 to 2010, all 10 partitions frame and
98.7 to 100 per cent of the graphs decode. NamedParam has no m_reporting
before 2011; such a slot is read as not reporting. FRAMED_RELEASES and
PARAMETER_RELEASES start at 2008. rvt-elements gives these files' elements
their saved parameters; nothing else it prints and no IFC changes. No
later save of these models is held, so the values are not checked
against another reading.
@DrunkOnJava

Copy link
Copy Markdown
Owner

@puzzbobb, thank you. main's offline checks from the PII guard job pass on your head, and CI is running. Next, ours: a read of the change and a full Measure run on its head, with what it shows posted here.

@DrunkOnJava

Copy link
Copy Markdown
Owner

@puzzbobb, one more thing: this branch predates today's framing changes on main (#2295, #2298), so the same-project check can't pass on its head as it stands. A merge of main into the branch (not a rebase) fixes that. (Stacked on #2306, so after that one's merge.)

@DrunkOnJava

Copy link
Copy Markdown
Owner

@puzzbobb, the measurement and the code read, on a merge of main into your head (a scratch branch here, 6c475691; run 47658842883, with the family files):

  • 119 of 120 exports and diagnostics identical. The 2014 family was not measured at the head: its host refused the download, HTTP 403 on all four tries, while the base side fetched it (Measure: a family's host refused one side's download (HTTP 403), leaving the only 2014 file unmeasured at the head #2308). Nothing Measure reads is a 2008 to 2010 save in any case, and tests/pre2011_native_records.rs is in the local class, so as RE-511 says, these reads are checked only against each file's own consistency, as RE-260's were.
  • The changes beyond feat(native): read the native records of Revit 2011 to 2014 #2306 hold up. The one-member reader: it is reached only where the schema has no SegmentMarker and the header word is 4 or 5; the inflated member is held to the group byte cap; every record's two lengths must agree; each section must close where channel 101's does, with the same ids in the same order where it writes them; and the member must end four bytes after the third section, with the terminal under one page.

To change:

  1. m_reporting: a slot with no m_reporting is now read as not reporting on every release. The field is missing exactly where the schema lacks it, so please gate this to 2008 to 2010, as I asked for the older checks on feat(native): read the native records of Revit 2011 to 2014 #2306, or say why a later schema can't drop it.
  2. Revit 2008's ids, channel 103. Each record of a 2008 section gets section 1's id by position. On channel 102 the record reader already refuses a graph whose owner isn't that id, so a wrong order fails closed there. Channel 103's records get theirs the same way with nothing to check them by: is there anything in a channel-103 record to check its id against? If not, the report should say so beside §3's test.
  3. A hardening case for the one-member reader: nothing CI holds reaches it. Hand-made bytes in a hardening target (a section that doesn't close, lengths that disagree, a member that runs past its third section) would put it under test.

Docs: the same three asks as on #2306, for RE-511's table and this description: full SHA-256, the local files by kind unless their names are public, and a ## Clean-room section.

Next, yours, after #2306's: those and the merge of main. Then ours: a Measure run on the merged head.

This branch has not been deployed

No deployments
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.

2 participants