Repository navigation
fix(ifc): an element's further pieces take their GlobalIds from the element's Revit GlobalId, so they hold from save to save (#1840) - #1850
Merged
Conversation
…lement's Revit GlobalId, so they hold from save to save (#1840) A slab's further pieces, a layered floor's parts and a curtain wall's parts share their element's Tag, and Revit gives only the first a GlobalId. The rest were derived from the document's Unique Document GUID, which changed between two saves of HWT-25's Revit 2027 structural model (#1829), so every part's GlobalId moved on each save while the host's held. They are now derived from the first piece's Revit GlobalId and their place among the entities sharing the Tag. Where the element has no Revit GlobalId, the document-derived one stays.
This was referenced Nov 12, 2026
… between saves, which #1840 makes them keep (#1840) The gate let only one GlobalId under a Tag of several products hold between saves, because the others came from the document's GUID. With the further pieces derived from the first piece's Revit GlobalId, every piece keeps its own, and the gate now compares each as it compares a single product: a piece that takes a new GlobalId, or two that swap, fails.
Owner
Author
|
Run 43322489213 (
Fix, Rows for the gates run on
|
DrunkOnJava
marked this pull request as ready for review
November 12, 2026 23:52
Owner
Author
|
Gates run 43330924424 on
|
…BCF users, with the pieces it moves once per measured model (#1840)
This was referenced Nov 13, 2026
DrunkOnJava
marked this pull request as draft
November 13, 2026 01:46
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
## Summary Release metadata for v0.20.0 (RELEASE.md, steps 4 to 7), cut from `main` at `925c482d` and merged with `main` up to `58395b62` (#1855, #1860, #1861, #1863, #1866, #1867 and #1868 among it): - every version file moves to 0.20.0 (`tools/release/bump_version.py`), and `CITATION.cff` is dated 2026-11-12; - the fragments under `changelog.d/` are assembled into a `[0.20.0]` section, with its introduction and "Upgrading from 0.19" (the work-budget bullet says a stop warns and the export is still written, as #1855 settled); - the README's release lines name v0.20.0; - Core Interior's two witness observations and verdicts, and the two synthetic IFC fixtures, are taken from CI's artifacts for `e10580d0`: only `witness_version`, the verdict hashes, the retired "Unmapped Revit unit identifiers" warning (RE-445) and an unset transparency (#1820) differ. Measured and rehearsed: - the comparison with 0.19.0 is in the section, from Measure runs [43357862138](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43357862138) (unfiltered, `58395b62` against `v0.19.0`'s `09b18bd3`: 49 of 146 exports move, 0 census regressions, 0 body regressions) and [43357979238](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43357979238) (timing: no file more than 3% slower except one that reads 0.98 in the earlier run of the same code, no peak higher by more than 2%, the samples of 2023 to 2027 at a median 0.76 times the peak memory). The release adds only notes, witness files, version strings and fixtures to `58395b62`, so a run of `main` is the run of the release; a run of this branch would move every export through the header's version string; - `publish.yml` rehearsal on `d9946f4b`: [43359414819](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43359414819) passed. Only the changelog changed since. **Why now.** `main` holds today's crafted-file and security fixes (#1815, #1831, #1833, #1845), and neither GlobalId move. #1850 is back in draft until the tag, and #1854's fix is #1859. Those two ship together in 0.21.0 (#1854 comment 6841360704). ## Testing - `python3 tools/release/changelog.py check` passes: no fragment is left. - `bump_version.py` checks the version files with the preflight's own `check_versions`. - The PII guard runs `release_preflight.py` on this PR. - Timing against 0.19.0 is in the section, from run 43357979238 on `58395b62`. ## Related issues Release 0.20.0. Milestone `0.20.0`.
DrunkOnJava
marked this pull request as ready for review
November 13, 2026 05:08
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
…ame three comment conflicts resolved to the text that says both rules
This was referenced Nov 13, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
…their GlobalIds from the entity they belong to, so they hold from save to save (#1854) (#1859) ## Summary Openings, property sets, quantities, material associations and the relationships between entities now take their GlobalIds from the entity they belong to, not from the document's `Unique Document GUID`, so they hold from save to save. #1840 found the GUID changes on every save, and #1854 showed it does so on every Autodesk sample. What belongs to no entity keeps the document seed. Closes #1854. ## Motivation `emit_data`'s `gid` closure seeded every derived GlobalId from the document's GUID. Between two saves of one project, every opening, property set, relationship and port took a new GlobalId while the elements kept theirs, so a tool that follows them by GlobalId (BCF on an opening, a property diff by set) saw every one removed and added again. `probe_1854_project_seeds` (run 43327315618, issue comment 6839343356) found no project-level seed that both holds across saves and differs between projects. The first episode and ProjectInfo's Revit GlobalId are the template's, one value on 64 of 102 models. ## Changes - `src/ifc/step_writer.rs`, `emit_data`: 44 of the 56 `gid` sites are now `stable_guid(<owner's written GlobalId>, <same key>)`. Each owner: | Derived entity | Seeded from | | --- | --- | | an element's opening, its void and fill relationships, and the opening's property and quantity sets | the host's GlobalId, then the opening's | | an element's property sets and material association | the element's | | an aggregate | its whole's | | ports, port connections and port nesting | the element's (the document where the element writes none) | | a type's property sets and its `IfcRelDefinesByType` | the type's | | storey and building sets, containment and space aggregation | the storey's or the building's | | the project, site and building aggregation | theirs | - Left on the document seed (12 sites, and the fallback of the two port sites): - the project, site, building and storey where Revit gives them no GlobalId; - classifications, materials and MEP systems; - types with no Revit GlobalId; - a port whose element writes no GlobalId. - `stable_guid`'s first parameter is now `seed`, and its doc says what may seed it. - `RevitGlobalIds::document` (`src/ifc/mod.rs`) and `docs/evidence.md`'s GlobalIds row say what the document seeds now. - `changelog.d/fixed/1854-owner-seeded-global-ids.md` carries the upgrade note for clash and BCF users: every derived GlobalId changes once, in this release. - `probes/examples/probe_1854_global_id_census.rs`: every GlobalId one export writes, by class, and how many it writes twice. For a sample and its later save, how many GlobalIds of each class both write. For a `rac_basic` sample, how many it shares with the `rac_advanced` sample of its year. This ships in the same release as #1850 (issue comment 6839580056), so each kind of entity moves once. ## Testing Unit tests are banned here. The evidence is one unfiltered Measure of this head against its merge-base with `main`: the samples of every year, the BIM4LCA models, the R2025 set, `rac_advanced` and the held-out models, with `probe_1854_global_id_census` and `probe_pair_release=2026`. Rows, registered before the run: 1. **Only derived GlobalIds move.** In every export that differs, every changed line is the same entity with only its GlobalId changed, apart from the header's timestamps. No `IfcBuildingElement` subtype, storey, type with a Revit GlobalId, project, site or building changes. Every `diagnostics.json` is equal. 2. **Unique.** `duplicates=0` on every model the probe reads. 3. **Across saves.** On each sample pair (2021 to 2027 against the 2026 save), every derived class that both saves write has `both` > 0. Reported per pair, against the building elements' share held: the share held for `IfcRelDefinesByProperties`, `IfcPropertySet`, `IfcOpeningElement`, `IfcRelVoidsElement` and `IfcRelAssociatesMaterial`. On the base every such GlobalId differs between two saves by construction, since the document GUIDs differ on all 13 saves of each project. 4. **Gates.** `same-project gates` pass. - [x] `rustfmt --edition 2024 --check` passes. CI runs the rest. - [x] Exporter output changes: GlobalIds only, rows 1 and 3 (read on this PR's comment on the runs at `1abc2fa5`: only derived GlobalIds move, and across saves they hold except for `rst_basic`'s containment and aggregation). ## Audit-honesty checklist - [x] Docs follow the change (`docs/evidence.md`, the `RevitGlobalIds::document` rustdoc). The fragment states what still moves. - [x] Changelog fragment under `changelog.d/fixed/`. - [x] No emojis, private paths or jargon. ## Legal and contribution hygiene - [x] Apache-2.0. No Autodesk proprietary content. revit-ifc's `GUIDUtil` was read for what Revit's export does, not copied (CLEANROOM source 5). ## Breaking changes Every derived GlobalId changes once (the upgrade note in the fragment). No API change.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
…does not declare are reported as what they are, not as an incomplete IFC (#1838) (#1874) ## Summary `rvt-ifc`, the diagnostics, `rvt-inspect` and the viewer said that the element records a file's element table does not declare use a layout this release cannot locate, and that the IFC is incomplete. The one case with a Revit export of the same save, a Revit 2027 structural model reported on #1829, shows all 84 of its records were roof framing deleted between two saves: the record chain of `Partitions/0` is the same in both saves, the table declares 143 fewer of its records, Revit's export of the latest save holds none of the 84, and every element it holds is in rvt-rs's export (2,355 of 2,355 by GlobalId). A file saved in place keeps the records of elements deleted since its last Save As, which is what they were on that one model. An element table read short would look the same and leave real elements out, as it did on Autodesk's Snowdon Towers 2024 architectural sample before RE-41, and other causes are not ruled out. So the count, the readiness score and the skipped item stay, and each text says what was measured on the one model (such records were elements deleted since the file's last Save As, #1838) and that the model is likely incomplete if nothing was deleted, not a rule (rvtDevelop's review). Wording only. ## Motivation #1838, found by the reporter of #1829, who then compared the saves with Revit's export of the same save. ## Changes - `src/bin/rvt_ifc.rs`: the warning. - `src/ifc/mod.rs`: the diagnostics' first warning, and the field's doc. - `src/bin/rvt_inspect.rs`: the failure mode's title and summary (its `kind`, `incomplete_model`, is unchanged), the readiness summary and the next step. - `viewer/src/main.ts`: the card's title and summary, and the field's comment. - `docs/export-diagnostics.md`, `docs/inspect.md`, `docs/schemas/export-diagnostics.schema.json`: what the records are, with the counts. - `changelog.d/fixed/1838-undeclared-element-records.md`. ## Testing - Text only: the count, the score, the item's reason and the failure mode's `kind` are as they were, and no test or gate pins the old texts (searched across `src`, `tests`, `viewer`, `docs`, `tools`). - `rustfmt --edition 2024 --check`, `tools/release/changelog.py check` and `tools/ci/api-doc-ids.py` pass locally. - Measure, rows registered on #1838 before the run (run 43370128477, unfiltered, against `main` at `9f43fe37`): `ifc.sha256` identical on 146 of 146, `diagnostics.json` on 121 of 121, no scorer differs beyond what only the head writes, and `same-project gates` pass on `e90f943a`. That head was cut before #1850 and the wording is hedged since, so `main` is merged in and a lighter run (the samples, no base side; rows on #1838) gives the gates verdict for the current head: the gate on `main` is now #1850's stricter `bodies_across_saves.py`, which a head without #1850 fails. - Not measured: no model of Measure carries the item (none of the 121 published `diagnostics.json` of the release's run holds it, and every `unexported_element_records` is 0), so none of the new texts appears in a measured output, and the one comparison with Revit's export is the reporter's, as counts. ## Related issues Closes #1838. Refs #1829.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
## Summary Release metadata for v0.21.0 (RELEASE.md, steps 4 to 7), cut from `main` at `9b7dee8c` and merged with `main` up to `b76ee16e`: - every version file moves to 0.21.0 (`tools/release/bump_version.py`), and `CITATION.cff` is dated 2026-11-13; - the five fragments under `changelog.d/` (#1843, #1838, #1840, #1854, #1871) are assembled into a `[0.21.0]` section, with its introduction, what is not measured, the comparison with 0.20.0 and "Upgrading from 0.20"; - the README's release lines name v0.21.0; - Core Interior's two witness observations and verdicts, and the two synthetic IFC fixtures, are taken from CI's artifacts for `10b0a299` (run 43382001273): only `witness_version`, the verdict hashes and the version strings of the IFC header and `IFCAPPLICATION` differ. **Why now.** The GlobalId pair (#1850 and #1859) is in `main`: the GlobalIds an export writes hold from one save of a project to the next, which 0.20.0 was cut without so that they ship together. `rvt-diff --elements` (#1843) and the `--redact` fix for Linux home folders (#1871) are in the same release, and #1874 corrects a warning that called deleted elements an incomplete IFC. Measured and rehearsed: - the comparison with 0.20.0 is in the section, from Measure runs [43381774360](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43381774360) (unfiltered, `main` at `9b7dee8c` against `v0.20.0`'s `9bb58fe1`: 146 of 146 exports move and `diagnostics.json` is equal on all 121 models that publish one; the MEP samples' `bodies_across_saves` goes from FAIL to PASS on 6 saves, and no other scorer output differs; that the exports move only in their GlobalIds is what #1850's and #1859's own line-by-line comparisons found, the run compares hashes) and [43381779893](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43381779893) (timing: 75 files at 0.94 to 1.06 times the time, median 1.00, and 0.99 to 1.01 times the peak memory). The release adds only notes, witness files, version strings and fixtures to `9b7dee8c`, apart from the probes and the one docs line (#1876, #1877, #1878, #1880) that landed after it and move no export; - `publish.yml` rehearsal on this branch: [43383528785](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43383528785), on `bfa6859c`; only the changelog has changed since. ## Testing - `python3 tools/release/changelog.py check` passes: no fragment is left. - `bump_version.py` checks the version files with the preflight's own `check_versions`. - The PII guard runs `release_preflight.py` on this PR. ## Related issues Release 0.21.0. Milestone `0.21.0`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A slab's further pieces, a layered floor's parts and a curtain wall's parts share their element's Tag, and Revit gives only the first of them a GlobalId.
element_global_idsderived the GlobalIds of the rest from the document'sUnique Document GUID, the Tag and the piece's place. They are now derived from the first piece's Revit GlobalId and the piece's place. Where the element has no Revit GlobalId, the document-derived one stays. Closes #1840.Motivation
#1840, from HWT-25's report on #1829. On two saves of a Revit 2027 structural model, the
Unique Document GUIDdiffers (ff4a120b-…,8add98bc-…). Floor 499263's 11 further pieces keep their Tag and their place, yet every GlobalId moves, while the host floor keeps Revit's own1GIEblKKb9aOPHLDpftUL6. Tools that track elements across versions (clash status, BCF) then see every part removed and a new one added on each save.Changes
src/ifc/step_writer.rselement_global_ids: the first entity carrying a Tag that has a Revit GlobalId seeds the GlobalIds of the further entities carrying that Tag.stable_guid's doc names the new seed.src/ifc/mod.rs(RevitGlobalIds::document) anddocs/evidence.md(the GlobalIds row) say so.changelog.d/fixed/1840-piece-global-ids.md.Testing
Unit tests are banned here. The evidence is one unfiltered Measure of this head against its merge-base with
main: the samples of every year, the BIM4LCA models, the R2025 set, BIMcollab and the held-out models, with the IFC kept.Rows, registered before the run:
diagnostics.jsonis equal.rac_advanced,rac_basicandrst_basicof 2024 to 2027), the kept IFCs are compared for each Tag whose first piece has the same Revit GlobalId in two saves. On the head, the further pieces' GlobalIds are equal between the saves. On the base, they differ wherever the two saves' document GUIDs differ. If no sample has a further piece of such an element, that is stated, and this row stands on Report: Revit 2027 structural model (CHL), compared element by element with Revit's IFC4 export and run through a clash engine #1829's data alone.same-project gatespass.What this does not cover: openings, relationships, property sets and type objects without a Revit GlobalId still take theirs from the document GUID (
emit_data'sgid). On HWT-25's two saves they still move, so a tool that follows openings across versions still sees them change. That is #1854.rustfmt --edition 2024 --checkpasses. CI runs the rest of the gate.Audit-honesty checklist
changelog.d/<section>/Legal and contribution hygiene
Breaking changes
None to the API. The GlobalId of each further piece of an element with a Revit GlobalId changes once.