Repository navigation
fix(native): bound the storage increment table's values by its size (RE-78) - #758
Conversation
|
Independent check of this fix in a separate fork, done on the same two files, Revit 2024 BIM4LCA Housing_Timber (CC BY-SA 4.0). Nothing from the files is quoted, only counts. Same change, same effect. On the base,
No side effects seen. On the 27 models we test (12 Nordic LCA, 7 Snowdon Towers, DACH and 7 other Autodesk samples), the export without We added a real-file test that asserts the four numbers above. It fails on the base with the budget message and passes with the fix. Your report says no test is registered because the files are not in CI; it is a skipped test when the folder variable is unset, so it could be registered the same way as |
…RE-78) Global/DocumentIncrementTable grows with the document. On the two BIM4LCA timber houses (Revit 2024) it holds 109,543 and 106,289 values, past the 100,000-value default budget, so the native preamble failed and no saved graphics were read: every family instance stayed a box. The table's format is the same as in the other files. On all 15 project files measured the table spends at least 3.9 bytes per value, so its value budget is now the larger of the default and its byte length. Other decodes keep the default. Housing_Timber_BuildingPermit: 0 -> 1,022 of 1,083 box bodies from saved meshes, 867 of 979 scored bodies within 0.01 ft of Revit's IFC export (the rest are saved meshes decoded only in part). Housing_Timber_As-Built 0 -> 1,026 of 1,087. Every other file's IFC unchanged; Core Interior and Einhoven glb and diagnostics identical. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… BIM4LCA (RE-78) Co-Authored-By: Claude Opus 5.5 <[email protected]>
872722c to
8f3ab99
Compare
|
Thank you, and sorry for the wait. GitHub holds a new account's CI until a maintainer approves the run, and nobody was watching the queue for two weeks. The change is right, and its bound is the right shape: As on #737 and #738, I replaced your two commits with the same changes, signed and rebased onto current On tests: as your report says, CI has no BIM4LCA file, so a corpus-gated test would skip there. It's fine to land without one. Getting the BIM4LCA set into a CI tier, so tests like this actually run, is maintainer work I'm tracking separately. This lands once CI is green. |
[Unreleased] becomes [0.5.0] — 2026-10-18, with an introduction, the contributors, and what to change when upgrading from 0.4. The community pull requests' entries are added and credited (#737, #738, #744, #751, #752, #753, #755, #757, #758), and the repeated Added, Changed, Fixed and Research headings are folded into one each, keeping every entry (107) and its order; everything from [0.4.0] down is unchanged. CITATION.cff said 0.1.2 (2026-04-20), though RELEASE.md has it agree with Cargo.toml at every tag. Its abstract now describes the project as the README does, without the "first open-source tool" and "verified against 11 releases" claims.
## Summary Prepare v0.5.0. Merging this is not the release: the release is the signed `v0.5.0` tag on the merged commit, which runs `publish.yml` (crates.io, PyPI, the release binaries and the container image). The tag waits for the maintainer's go-ahead. ## Motivation `main` is 0.4.0 plus everything under `[Unreleased]`: Revit 2026 projects (experimental), MEP ports, connections and systems, Revit's level, category, family, type and phase properties, rooms aggregated into their storeys, Snowdon Towers exporting again, and the first pull requests from outside contributors. Before 1.0 a breaking change bumps the minor version, and these are breaking for a 0.4 user: - The MSRV is 1.87 (was 1.85). - `rvt` has no `wasm` feature; the bindings are the `rvt-wasm` crate (C6). - Each `IfcSpace` is aggregated into its storey instead of contained in it (#744). - `ElemTableHeader::record_count` is a `u32` (#764). - Type objects take Revit's GlobalIds (RE-167). ## Changes - **Versions 0.4.0 → 0.5.0:** `rvt`, `rvt-py` and its pin, `rvt-wasm`, the `stream_evidence` pin, both lockfiles (only the workspace crates' version lines change), `.release-please-manifest.json` and `viewer/package.json`. - **`CHANGELOG.md`:** `[Unreleased]` becomes `[0.5.0] — 2026-10-18`. - An introduction, the contributors, and an **Upgrading from 0.4** section. - The community pull requests' entries are added and credited (#737, #738, #744, #751, #752, #753, #755, #757, #758). - The repeated Added, Changed, Fixed and Research headings, which later merges had appended, are folded into one each. All 107 entries are kept as written (checked as a multiset) and in their order, and everything from `[0.4.0]` down is byte-identical. - #778's clean-room policy change is added under Changed, so the section has 108 entries. - **`CITATION.cff`:** it said 0.1.2 (2026-04-20), though `RELEASE.md` has it agree with `Cargo.toml` at every tag. Its abstract now describes the project as the README does, without the "first open-source tool" and "verified against 11 releases" claims. - **Registry descriptions:** crates.io showed 0.4.0's description, which leaves out Revit 2023, and PyPI one that called element extraction and geometry "active research" and the export "document-level IFC4 scaffolding". `Cargo.toml` and `pyproject.toml` now say what the README says: typed elements from Revit 2023 to 2025 projects, 2026 experimental. - **Witnesses:** the IFC header carries the version (#417), so both Core Interior `rvt-rs.json` observations and their verdicts are refreshed from this pull request's CI run. ## Testing - CI on this pull request: every job `CI passed` requires, the witness replays among them. - On the tag, the publish workflow runs its own checks before anything is published: wheel install and model open on each OS, `cargo install` and the CLI sample smoke, the docs.rs build preview and the viewer load smoke. crates.io and PyPI publish only after all of them pass, and PyPI only after crates.io. ## Audit-honesty checklist - The docs keep describing 0.4.0 as the latest release until each 0.5.0 channel has been checked from what was published. That follows in a separate pull request (`docs/install.md`, `docs/python.md`, `docs/status.md`, `docs/supported-profile.md` and the README's release section). - crates.io's trusted publisher (repository DrunkOnJava/rvt-rs, workflow `publish.yml`, environment `crates-io`) has to be in place before the tag, as `docs/maintaining.md` says; it is a registry-side setting this repository cannot check. ## Legal and contribution hygiene N/A: release metadata only. Contributors are credited by their GitHub names in the CHANGELOG. ## Breaking changes Listed under Motivation, with the migration for each in the CHANGELOG's **Upgrading from 0.4**.
Summary
On two Revit 2024 houses
rvt-ifc --saved-meshesread no saved graphics at all: the native preamble stopped inGlobal/DocumentIncrementTableon the 100,000-value default budget, so every family instance stayed a box. The table's format is the same as in every other file; it is just bigger. Its value budget is now the larger of the default and the stream's byte length.Motivation
Decoded with a larger budget, the table holds 109,543 and 106,289 values on the two timber houses. On all 15 project files I have (twelve BIM4LCA models, Core Interior, Einhoven, the flowbim.ee 2026 house from RE-124) it spends 3.95 to 4.49 bytes per value, so one value per byte bounds it with about 4x margin without capping large documents. What would falsify this: a table that needs more values than it has bytes.
Changes
src/native_parameters.rs:decode_object_fields_with_limitstakes explicitGraphLimits;decode_object_fieldscalls it with the defaults (no behaviour change).src/native_index.rs:storage_incrementsdecodes withmax_values = max(default, bytes.len()). Every other decode keeps the default.reports/element-framing/storage-increment-table-budget.md: the per-file table, the measurement and what is not claimed.Testing
tools/check-local.shpasses (fmt, clippy, rustdoc, build, real-file / CLI / contract checks), withRVT_SAMPLES_DIRandRVT_PROJECT_CORPUS_DIRset: 231 passed, 0 failed.ARCH.zip, linked from VTT's "BIM files to download" page). Not committed. One caveat: the publisher's site footer says "all rights reserved", which the page does not reconcile with the CC BY-SA statement for the models; only measurements on them are in this PR.rvt-ifc <model>.rvt -o <model>.ifc --saved-meshes --diagnostics <model>.diagnostics.jsontools/re/saved_meshes_vs_ifc.py(IfcOpenShell 0.8.5), as in RE-78:python3 tools/re/saved_meshes_vs_ifc.py <rvt-rs.ifc> ARK_NordicLCA_Housing_Timber_BuildingPermit_Revit.ifc --source saved_graphics_mesh --rotate-deg -60.631748527001605(Revit's site placement turns its export by that angle; the residual offset is then zero). Of 1,022 bodies: 867 within 0.01 ft, 44 within 0.1, 59 within 1, 9 over 1 ft, 43 with no reference in Revit's export; the per-class table is in the report. The bodies outside 0.01 ft are saved meshesnative_saved_meshdecodes only in part (51 of them doors whose frame Geometry is dropped by one rejected face), a separate gap.--profile ci): tier-1 export +ifcopenshell.validate+ schema arity,validate-real-ifc.pyon Einhoven, schema validation of Einhoven and Core Interior, and both OctetProof verdicts for Core Interior (full and slim):status: PASS, replaymatchfor rvt-rs, IfcOpenShell and IFClite against the committed observations.No test is registered: the change needs the BIM4LCA files, which are not among CI's corpora, and on the corpora CI has the output is unchanged.
Audit-honesty checklist
--saved-meshesstays experimental;docs/status.mdanddocs/support-matrix.jsonare untouched.Provenance
The changes in this PR are based on byte observations on the BIM4LCA sample files and comparison with Revit's own IFC export of the same files. I have not used Autodesk SDK source, ODA SDK source, leaked internal documentation, NDA material, or decompiled internal Revit implementation code beyond public symbol exports.
🤖 Generated with Claude Code