Skip to content

fix(ifc): the project's own GUID gives Revit 2017 to 2027 files their project, building and site GlobalIds and Revit 2017 to 2022 files their storeys', and a history with an entry closed by 0x1e is read (#878, #1929) (RE-459) - #1934

Merged
DrunkOnJava merged 16 commits into
mainfrom
research/1929-global-id-rule
Nov 13, 2026

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

The project's own GUID, which the header of Global/History holds four times, gives the project, building and site of a Revit 2017 to 2027 file that stores none the GlobalIds Revit's export gives them, and the storeys of a Revit 2017 to 2022 file theirs. A storey of a Revit 2023 to 2027 file keeps its Level's own episode GlobalId, as before (Core Interior, 15 of 15); on any other release a storey with no stored or project-derived id gets none from an episode, where nothing measured supports it. A history with an entry closed by another byte than 0x28 is read, which gave the elements of the two Revit 2018 Vitoria projects their GlobalIds.

Motivation

#878 (Revit 2015 to 2022 GlobalIds) and #1929 (is the episode rule measured on 28-byte tables). RE-220 §1 found no source for the project-level GlobalIds of a file made before 2023, and the Revit 2018 Vitoria "Before" model read 0 of 1,314 elements because EpisodeHistory::parse refused four entries closed by 0x1e. The registered rows and every result are on #878 (comments 6862931598, 6863264079, 6863512925, 6863546629, 6864138309).

Changes

  • src/research/revit_global_ids.rs: project_guid (the four equal, non-zero copies at 0x16, 0x26, 0x36, 0x56, else none), project_guid_of, the fake ids -16, -15, -14, the release ranges PROJECT_GUID_RELEASES (2017 to 2027), PROJECT_GUID_STOREY_RELEASES (2017 to 2022) and STOREY_EPISODE_RELEASES (2023 to 2027), each closed at the top so that a file of a later release gets nothing from a rule nobody measured there, and EpisodeHistory::parse reading an entry whatever byte closes it; three failure-first tests of the history parse and two of the project GUID reader (pure helpers, no file I/O).
  • src/ifc/mod.rs (revit_model_global_ids): project, building and site: the id the file stores, else the project's GUID with the fake id XORed in; a storey: stored, else the project's GUID with the Level's ElementId (2017 to 2022), else the Level's episode as before (2023 to 2027 only; on any other release none is written and the writer derives it). revit_global_ids failing no longer drops the stored and base ids.
  • probes/examples/probe_re459_history_terminators.rs and tools/re/history_base_vs_ifc.py (the probe and its scorer), tools/ci/scrub-holdout-results.sh (keeps the scorer's history base: count lines of held-out models, never an id).
  • reports/element-framing/RE-459-episode-global-ids-2015-2023.md, docs/status.md, docs/evidence.md, docs/contribution-map.md, changelog.d/fixed/878-project-guid-global-ids.md.

Testing

Unit tests are banned in this repository; the helpers' tests above are the pure-helper exception (the ways a header can fail are written first). The change is shown end to end on real files:

  • Measured end to end on the 67 models of Measure that have a Revit export (the header GUID against Revit's own exports, held-out files as counts only): the four copies are equal on 268 of 268; project, building and one site are Revit's on 63 of the 64 files of 2017 to 2027 whose export is of their own project; the storeys are Revit's on 69 of 69 on 11 files of 2017 to 2022 and on none of 229 from 2023 (runs 43493324842, 43496098202; scorer tools/re/history_base_vs_ifc.py).
  • Unfiltered Measure of this change, run 43506982243 (head a6ee9016, base ff40a492, every flag, held-out as counts): 50 models' project, building and site go from 0 of 1 to 1 of 1 and none goes the other way; the storeys of 11 files move to Revit's (from none to all on 9, from 6 to 8 of 9 on one and from none to 10 of 16 on one); the spent Vitoria's elements go from 0 of 1,314 to 1,297 and the held-out Vitoria project's from 0 of 1,441 to 1,420, and each one's 73 rooms to 73 of 73 (its rooms pair by GlobalId now, so its other scorer lines move); 130 of 146 exports differ, diagnostics.json is equal on all 121; same-project gates pass (check run on a6ee9016). An earlier run of this branch (43498066087, head e5516b73) gave the same counts before the release ranges were bounded.
  • Exports kept from both builds (run 43500234436 at e5516b73, 22 models; the later commits bound the rules to the releases measured and change none of those exports): with the GlobalIds made equal, the two exports differ in two lines each, the file name's time and the owner history's time.
  • tools/check-local.sh: not run (no local builds here); CI runs it. rustfmt --check passes on the files changed.
  • If this touches the IFC exporter: the witness verdicts replay or the observations are refreshed in this PR: Core Interior's export changes only in GlobalIds (8 lines), which the witness's counts do not hold; CI's replay is the check, and a drift is refreshed here.

Audit-honesty checklist

  • The docs say what is measured: docs/status.md (RE-459), docs/evidence.md, docs/contribution-map.md.
  • A fragment: changelog.d/fixed/878-project-guid-global-ids.md.
  • Limitations are stated in the report and the fragment: Revit 2015 and 2016 have no file to measure the base rule on (not applied); one held-out Revit 2018 project follows no rule for its project, building, site and storey ids (not claimed; its elements are fixed by the parse change); BIMcollab's Revit 2015 example stores its ids, which win; the 17 family files get ids from their own header GUID with no Revit export to compare.
  • No emojis, no private paths; the probe prints a file's GUIDs and Level names and never leaves the runner for a held-out model.
  • A reverse-engineering finding: the probe is probes/examples/probe_re459_history_terminators.rs and the report is RE-459.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk proprietary source, decompiled internals or NDA content (CLEANROOM.md): the fake ElementIds are named by revit-ifc's GUIDUtil.ProjectLevelGUIDType, as RE-220 does, and the layout comes from the files' bytes.
  • No new fixtures.

Breaking changes

Every project, building, site and storey GlobalId of a file of 2017 or later the rule applies to changes once (50 of the 146 exports of an unfiltered Measure). It ships with the next release, after 0.22.0 (tag pushed 11-13 20:29Z), which this PR is not in.

Screenshots or output samples

Core Interior, base against head, GlobalIds made equal: 8 lines carry a new GlobalId (the project, site, building and three aggregations among them) and nothing else changes. The 2018 rac_basic sample: 35 lines (its six storeys and what they own).

… a file's Global/History and the entries that are not closed by 0x28 (#878, #1929) (RE-459)
…from the header and the Levels, and a scorer asks Revit's export whether its project, building, site and storeys are that GUID with an id XORed in (#878) (RE-459)
…ses, with three failure-first tests, and the first RE-459 draft (#878, #1929)
… Measure passes and compares the base with the oldest and newest episode, and the held-out scrub keeps its count lines (#878) (RE-459)
…ts them from the project's own GUID in the header of Global/History, with failure-first tests of the reader (#878) (RE-459)
…res and the scorer counts how many of Revit's project, building, site, storey and element ids are among them (#878) (RE-459)
… GlobalId, and the project-level ids are read only on the releases they were measured on (#878) (RE-459)
…vit's exports of 67 models, the storeys of 2017 to 2022, the files that store their ids and the history parse (#878, #1929)
…y where Revit's project, building, site and storey GlobalIds come from (#878) (RE-459)
…nd storey GlobalIds come from and that the episode rule holds on 2015 to 2023 tables (#878, #1929) (RE-459)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 13, 2026 20:56
…nd a storey's episode GlobalId is written on 2023 to 2027 only, where it was measured (#878) (RE-459)
@DrunkOnJava
DrunkOnJava merged commit 040fc01 into main Nov 13, 2026
83 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/1929-global-id-rule branch November 13, 2026 21:43
DrunkOnJava added a commit that referenced this pull request Nov 13, 2026
…isode rule measured equal to Revit's and where not, as RE-459 measured it (#1929) (#1942)

## Summary

The doc comment of `revit_global_ids` said the episode rule is equal to
Revit's on files of 2018, 2020, 2021 and 2023 and "not on two 2018
projects and a 2015 example". Since #1934 the two 2018 projects read
1,297 of 1,314 and 1,420 of 1,441 elements, and the rule is equal to
Revit's on 84% to 100% of the elements both exports hold on every file
measured but BIMcollab's Revit 2015 example. The comment now says that.
Comment only: no export changes.

## Motivation

#1929 item 1, whose measurement is RE-459 and #1934. The stale sentence
is the one #1929 quoted as saying the rule was unmeasured.

## Changes

- `src/research/revit_global_ids.rs`: the doc comment of
`revit_global_ids`.

## Testing

Unit tests are banned in this repository. A change to a comment has no
output to measure: `rustfmt --check` passes on the file, and CI builds
the docs.

- [ ] `tools/check-local.sh`: not run (no local builds here); CI runs
it.

## Audit-honesty checklist

- [x] The figures are RE-459's and the Measure run 43506982243 of #1934
(`rac_advanced` 2015 to 2020 98.6%, Frigento 96.0%, Gdynia 100%, BIM
Whale 99.9%, Warmond 84.2%, the two Vitoria projects 98.7% and 98.5%,
the 2022 files 100%).
- [x] No fragment: nothing user-visible changes.

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk proprietary source, decompiled internals
or NDA content (CLEANROOM.md).

## Breaking changes

None.
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