Repository navigation
feat(diagnostics): say when most of a file's element records could not be attributed - #293
Merged
Merged
Conversation
…t be attributed On Autodesk's Snowdon Towers 2024 samples most wall, door, window, column, floor and room records use a prologue with no ElementId at +0x00 (RE-30). The fail-closed decode skips them, so the IFC carries a small fraction of the building while the diagnostics looked like any other partial export. partition_element_records::count_unattributed_frames counts, in one memmem pass over the bbox marker, frames whose category is one the exporter recovers and whose +0x00 is not an ElementId. The export diagnostics add them as a skipped item (reason element_record_without_element_id, per-class counts) and put a warning first in the list that the model is incomplete, since the viewer shows only the first warning inline. Snowdon architectural: 2,043 (1,216 walls, 245 doors, 198 floors, 180 columns, 150 windows, 54 rooms); structural: 75; Core Interior and every project-count fixture: none, which tests/project_count_fixtures.rs now asserts. The "Suppressed N low-confidence schema scan candidates" warning read skipped[0], which is the below-confidence item whenever one exists; it now finds its own item.
…-30) The What-does-not-work-yet row listed the Core Interior results without saying they do not carry to Autodesk's Snowdon Towers 2024 samples, where 7 of 2,171 records in the recovered categories decode and the export diagnostics now count the rest.
DrunkOnJava
enabled auto-merge (squash)
September 22, 2026 20:31
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_8aa2b7c5-3068-414e-9b79-1d33f72c0440) |
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
When most of a file's element records can't be attributed to an ElementId, the export now says so: a per-class
skippedcount, plus a warning at the top of the list that the model is incomplete. Before this, a Snowdon Towers export carrying a few percent of the building looked like any other partial export.Motivation
RE-30 (#290) measured that on Autodesk's Snowdon Towers 2024 samples, most wall, door, window, column, floor and room records use a second prologue with no ElementId at
+0x00. The fail-closed decode rightly skips them. Nothing in the diagnostics told a user that the IFC they downloaded holds 6 walls of a 1,200-wall building.Changes
partition_element_records::count_unattributed_frames(pure, over bytes) andscan_unattributed_frames(every partition, keyed by class):memmempass over the bbox marker. It counts frames whose+0x12category is one of the newRECOVERED_CATEGORIESand whose+0x00is 0 or aboveu32::MAX.skippeditemelement_record_without_element_idwith per-classclasses.skipped[0]. Whenever below-confidence elements exist, that item is the below-confidence one, so the warning reported the wrong count. It now finds its own item.tests/project_count_fixtures.rs: every manifest project must report no unattributed frames.docs/export-diagnostics.md, the schema'sreasondescription, CHANGELOG.Testing
tools/check-local.shwith both corpora: fmt, clippy -D warnings, rustdoc -D warnings, full test suite (see below)FFwall and a0x00000006_ffffffffdoor are, each under its own category; a category outside the set is notproject_count_fixtures: Core Interior, Einhoven and tier-1 report none2024_Core_Interior.rvtRevit_IFC5_Einhoven.rvtrvt-inspecton the structural sample now opens its Warnings block with: "75 wall, door, window, column, floor or room record(s) in this file use an element-record layout whose ElementId this release cannot locate, so they are not exported and the model is incomplete (RE-30)."Audit-honesty checklist
Legal and contribution hygiene
CONTRIBUTING.md)CLEANROOM.md)Breaking changes
None. Diagnostics gain a
skippedreason and, on affected files only, one warning.Note
Low Risk
Additive export diagnostics and documentation; decode/export selection is unchanged aside from fixing which skipped item feeds the low-confidence schema warning.
Overview
Export diagnostics now flag incomplete models when most partition element records have no attributable ElementId (RE-30). A partition scan counts wall/door/window/column/floor/building-pad/room frames that look like element records (
BuiltInCategoryat+0x12, bbox marker at+0x50) but carry no valid id at+0x00, and surfaces them as askippedentry with reasonelement_record_without_element_idand per-class counts. When that total is non-zero, a model is incomplete warning is inserted first inwarningssorvt-inspect,--diagnostics, and the viewer’s inline Warnings row show it prominently.The implementation adds
RECOVERED_CATEGORIES,count_unattributed_frames, andscan_unattributed_framesinpartition_element_records, wired from IFC export diagnostics assembly insrc/ifc/mod.rs.Bug fix: the “Suppressed N low-confidence schema scan candidates” message no longer uses
skipped[0]; it looks up thelow_confidence_schema_scan_candidateitem so unrelated skipped buckets (e.g. unattributed frames) do not skew the count.Tests and docs:
tests/project_count_fixtures.rsasserts manifest corpus projects report zero unattributed frames; CHANGELOG, README,docs/export-diagnostics.md, and the diagnostics JSON schema document the new reason.Reviewed by Cursor Bugbot for commit 78858f2. Configure here.