Repository navigation
fix(elem-table): report each record's owner from the field that closes it (#152) (RE-31) - #499
Merged
Merged
Conversation
DrunkOnJava
enabled auto-merge (squash)
September 28, 2026 15:53
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e24c4c5f-4a52-4903-8e79-00b283e952df) |
7 of 8 tasks
DrunkOnJava
added a commit
that referenced
this pull request
Sep 28, 2026
## Summary Prepare v0.4.0. Merging this is not the release: the release is the signed `v0.4.0` tag, which runs `publish.yml` (crates.io, PyPI, the release binaries and the container image). **Why 0.4.0.** The CHANGELOG follows semver, and before 1.0 a breaking change bumps the minor version. Changes since 0.3.0 that consumers will notice: - `IfcSpace.Name` is now the room number (#503). - Only building-story Levels become storeys (RE-118). - System families are named in the file's saved locale (RE-123). - `ElemRecord::owner_id` values change (#499). - Public structs gained fields. ## Changes - **Versions 0.3.0 → 0.4.0:** `rvt`, `rvt-py` and its pin, the `stream_evidence` pin, both lockfiles (only the version lines change), `.release-please-manifest.json` and `viewer/package.json`. - **`CHANGELOG.md`:** `[Unreleased]` becomes `[0.4.0] — 2026-09-28`. - A new **Upgrading from 0.3** section covers the room naming, storey filtering, locale names, `owner_id`, struct fields and changed bodies and counts. - The 55 entries are regrouped by what they mean for a 0.3 user: Added (Revit 2023 projects; every supported release), Changed and Fixed. They were under two "Added" headings, with most additions under "Changed". Entry text is unchanged. - **Witnesses:** the IFC header carries the version (#417), so both Core Interior `rvt-rs.json` observations are regenerated. `witness-verdict.py` gives PASS with three replay matches for each. ## Checks - fmt, clippy, rustdoc, MSRV 1.85, the fuzz check (locked), integration tests, and `verify-real-files.sh --profile ci`. - `cargo install --path . --locked`: `rvt-inspect --version` prints 0.4.0, and `rvt-info`, `rvt-inspect --json` and `rvt-ifc --diagnostics` run on the 2024 sample family. - `maturin build`: the 0.4.0 wheel installs in a clean venv and imports, reporting `rvt.__version__ == "0.4.0"`. The docs keep describing 0.3.0 as the latest release until each 0.4.0 channel has been verified from its published artifacts. That follows in a separate PR. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Diff is version metadata, changelog curation, and witness JSON version strings only; behavioral breaking changes ship in prior feature merges, not in this PR. > > **Overview** > This PR **cuts the 0.4.0 release line** without changing decoder or exporter code: it bumps **`0.3.0` → `0.4.0`** on `rvt`, `rvt-py`, the viewer, `.release-please-manifest.json`, path/version pins in `stream_evidence`, and the lockfiles. > > **`CHANGELOG.md`** promotes the accumulated work from `[Unreleased]` to **`[0.4.0] — 2026-09-28`**, adds an **Upgrading from 0.3** section (room `IfcSpace.Name`, building-story storeys, locale system-family names, `ElemRecord::owner_id`, new public struct fields, geometry/IFC count shifts), and **reorganizes** the ~55 entries into Added / Changed / Fixed (Revit 2023 vs all releases) without rewriting entry text. > > Both Core Interior witness **`rvt-rs.json`** observations update **`witness_version`** to `0.4.0` so replay metadata matches the IFC header version. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 518f90c. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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
Global/ElemTable's records start at0x06and each ends with its owner field. rvt-rs parses a frame starting at0x1E, so the owner field that opens each parsed frame belongs to the record before it.ElemRecord::owner_id(RE-31, #294) paired every owner with the next element.STE1200 reported this on #152 (and again in Discussion #112), together with the test that settles it: an ownership tree has no self-owned record and no cycle.
Measured
RE-31's independent oracle is the element's own partition reference list naming its owner.
examples/probe_re31_owner_frame.rsmeasures it:The wall→wall, floor→floor and symbol→symbol pairs RE-31 could not explain were artefacts of the shift, and are gone.
Change
parse_records_from_bytesgives each record the owner field that follows it.0x06, is still not parsed. Its owner (the0x0011header_flagreports on family files) is documented as such.rvt-elem-tablelayout label and the CHANGELOG.Nothing in the IFC export uses
owner_id.Checks
verify-real-files.sh.Clean-room declaration
This finding comes from public byte observations of the corpus files only. The report and the self-ownership test are from STE1200 (Discussion #112, #152), credited.
Note
Medium Risk
Changes decoded metadata for every explicit-layout ElemTable consumer (
rvt-elem-table, Pythonelem_table_records()); behavior is better validated but is a semantic fix, not a no-op.Overview
Fixes
ElemRecord::owner_id(RE-31, #152):Global/ElemTablerecords begin at0x06and end with an owner field, but parsing starts at0x1E, so the marker at each frame's start actually closes the previous record. Owners were previously paired with the next element, which produced hundreds of self-ownerships and weaker agreement with partition reference lists.parse_records_from_bytesnow assigns each record the owner read from the following frame (and reads the last record's owner from the table tail, only when that id is declared). Docs, corpus tests (no self-owners; Einhoven owner count 338→339),probe_re31_owner_frame, RE-31 §6, support matrix, andrvt-elem-tablelayout text are updated. IFC export still does not useowner_id.Reviewed by Cursor Bugbot for commit e08a591. Configure here.