Repository navigation
feat(elements): recover rooms from OST_Rooms element records, with names, numbers, storeys and envelopes - #278
Merged
Merged
Conversation
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_65edb178-9940-4e60-906b-5db552d1c410) |
14 tasks done
DrunkOnJava
enabled auto-merge (squash)
September 19, 2026 21:55
…me, number, storey and envelope Brute-scanned all 23,470 decodable element records on 2024_Core_Interior.rvt and histogrammed every BuiltInCategory against the export's 116 room ids: OST_Rooms (-2000160) with the unchanged RE-21 instance rule selects 116, TP 116 / FP 0 / FN 0, and no other category intersects the set at all. Names and numbers come from a parameter block anchored on the owning ElementId, read forward from RE-22's framing: 116 of 116 names equal IfcSpace.LongName and 116 of 116 numbers equal IfcSpace.Name, with no false positive across all 26,425 declared ids. All 116 bind their storey through the RE-27 Level reference, which scores that bind against Revit's own containment for the first time. The record bbox is the export's plan envelope and vertical extent on 116 of 116, worst 1.64e-06 ft in plan and 1.42e-14 ft in z. IFCSPACE goes from 18 to 116, storey containment from 853 to 969 of 970, and the partial_element_geometry diagnostic is gone because every emitted element now carries a body. entity_counts.IFCSPACE joins the OctetProof claimed surface with all three witnesses agreeing; both verdicts PASS with zero diffs. The boundary polygon is a measured negative and #90 stays open for it: no ordered vertex run exists at strides 2, 3, 4 or 6 in either winding, absolute or translation-invariant; no OST_SketchLines record is owned by a room; the record tail carries no coordinates. ProfileResolved stays false. 76 of 116 boxes equal their polygon in area and 40 over-state it, ratio 1.0658 overall. Refs #90 Closes #219
DrunkOnJava
force-pushed
the
feat/room-records-re29
branch
from
September 19, 2026 22:27
a26b91d to
ef15f8f
Compare
This was referenced Sep 19, 2026
This was referenced Nov 13, 2026
Merged
Merged
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
…cs-versus-code check (#1923) ## Summary Fixes on 20 user-facing pages: the README, status, export diagnostics, Python, the viewer and MCP references, the user guide, install, the supported profile and compatibility, the library, the viewer's privacy and build pages, the 1.0 criteria and verification protocol, benchmarks and reference models, demos, and two CLIs' doc comments. Among them: the rvt-write examples now parse (`--src`/`--dst`), the compatibility table maps the MEP classes the way `category_map.rs` does, the Python 2027 row matches the matrix, and the demo page's IFC excerpt is the committed fixture's. ## How these edits were made Batch 6 read the user-facing, maintainer and research pages against the code at 8accf4f. That was 30 DeepSeek auditors with a second reader for each; Griffin chose the workers' size and hosts. 218 findings were confirmed by the second reader. The maintainer session re-read every refuted and unsure finding and a sample of the confirmed ones, and found no errors. Griffin then chose "AI fixes, I review". One DeepSeek editor per file group re-checked each finding at 4b5ad24 and made the smallest edit that makes the page true. The maintainer session read every hunk and corrected the editors where they went wrong: - the octetproof spec's §6.1 manifest example went back to the values at its stated snapshot commit, `5da2570`; - ADR-001 no longer pins a release version; - `status.md` keeps its "Last reviewed" date and spells `relations.IFCRELFILLSELEMENT`; - `verification-protocol.md`'s surface paragraph now accounts for all fourteen fields, with `IFCSPACE` joining in #278. Three findings need code rather than text and are filed as #1919 (`rvt-doc --redact` and two `rvt-mcp` schema descriptions). `docs/mcp-tools.md` is generated, so no editor touched it. Docs only, plus doc comments in two CLIs; no export or output moves, so no Measure. `tools/ci/measured_numbers.py` and `tools/ci/api-doc-ids.py` pass on the branch.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
…docs-versus-code check (#1924) ## Summary Fixes on 8 maintainer pages: maintaining, RELEASE.md and the release checklist (the tag is signed with `git tag -s`), the ADRs, the decoder guide and its template (`rvt-schema --grep`, since the text dump never prints "class <Name>"; changelog fragments, not CHANGELOG.md), and validation evidence. ## How these edits were made Batch 6 read the user-facing, maintainer and research pages against the code at 8accf4f. That was 30 DeepSeek auditors with a second reader for each; Griffin chose the workers' size and hosts. 218 findings were confirmed by the second reader. The maintainer session re-read every refuted and unsure finding and a sample of the confirmed ones, and found no errors. Griffin then chose "AI fixes, I review". One DeepSeek editor per file group re-checked each finding at 4b5ad24 and made the smallest edit that makes the page true. The maintainer session read every hunk and corrected the editors where they went wrong: - the octetproof spec's §6.1 manifest example went back to the values at its stated snapshot commit, `5da2570`; - ADR-001 no longer pins a release version; - `status.md` keeps its "Last reviewed" date and spells `relations.IFCRELFILLSELEMENT`; - `verification-protocol.md`'s surface paragraph now accounts for all fourteen fields, with `IFCSPACE` joining in #278. Three findings need code rather than text and are filed as #1919 (`rvt-doc --redact` and two `rvt-mcp` schema descriptions). `docs/mcp-tools.md` is generated, so no editor touched it. Docs only, plus doc comments in two CLIs; no export or output moves, so no Measure. `tools/ci/measured_numbers.py` and `tools/ci/api-doc-ids.py` pass on the branch.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
…om batch 6's docs-versus-code check (#1925) ## Summary Fixes in format-reconnaissance.md, the octetproof spec and the element-table layout note. Dated history stays as it was; what changes is what the notes state about the code now: schema sizes over the page-stripped stream (RE-264, RE-323), the walker's line references, probe paths under `probes/examples/`, and the element table's 28- and 40-byte records from `0x06`. ## How these edits were made Batch 6 read the user-facing, maintainer and research pages against the code at 8accf4f. That was 30 DeepSeek auditors with a second reader for each; Griffin chose the workers' size and hosts. 218 findings were confirmed by the second reader. The maintainer session re-read every refuted and unsure finding and a sample of the confirmed ones, and found no errors. Griffin then chose "AI fixes, I review". One DeepSeek editor per file group re-checked each finding at 4b5ad24 and made the smallest edit that makes the page true. The maintainer session read every hunk and corrected the editors where they went wrong: - the octetproof spec's §6.1 manifest example went back to the values at its stated snapshot commit, `5da2570`; - ADR-001 no longer pins a release version; - `status.md` keeps its "Last reviewed" date and spells `relations.IFCRELFILLSELEMENT`; - `verification-protocol.md`'s surface paragraph now accounts for all fourteen fields, with `IFCSPACE` joining in #278. Three findings need code rather than text and are filed as #1919 (`rvt-doc --redact` and two `rvt-mcp` schema descriptions). `docs/mcp-tools.md` is generated, so no editor touched it. Docs only, plus doc comments in two CLIs; no export or output moves, so no Measure. `tools/ci/measured_numbers.py` and `tools/ci/api-doc-ids.py` pass on the branch.
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
Revit rooms are carried by the same partition element record every other category uses —
BuiltInCategoryOST_Rooms(-2000160), under the unchanged #211 instance rule — and their number, name and host Level sit in the room's own parameter block. Recovering both replaces the 18 name-onlyIFCSPACErows with 116 record-backed rooms whose id set, names, numbers, storeys, plan envelope and floor-to-ceiling extent all match Revit's own export exactly. The boundary polygon stays a measured negative, so #90 stays open for it.Motivation
#90 asks for real space boundaries in place of a "placeholder 10x10x8 ft bounding box". #219 records the 18 name-only
IFCSPACEas the largest remaining unbound set. Measured first, the shape onmainwas worse than #90 describes: 18 rows namedRoom-unnamed,Representation$, no body at all, and no storey.The winning pattern in this repo is RE-21 → RE-22 → RE-25: find the per-instance element record for the category, prove the instance set against the export's ElementId set, then recover geometry from the same record family. That is what this does.
What was proven, with numbers
All against
IFC Exports/2024_Core_Interior_slim.ifc(sha256bfdf36ff…), Revit's own full-project export.1. The carrier, measured not assumed.
probe_re29_room_recordsbrute-scans every offset of every inflatedPartitions/*stream, histograms everyBuiltInCategoryacross all 23 470 decodable records, and scores each one's instance-rule selection against the 116 room ElementIds the export carries inIfcSpaceType.Tag(IfcSpacedeclares noTag, so the id travels one hop throughIfcRelDefinesByType):-2000160OST_RoomsNo other category intersects the wanted set at all.
2. Number, name and Level, from the room's own parameter block. RE-22 found a parameter value at a fixed negative offset from two copies of the owning
ElementId; a room's strings are the same shape read forward from the owner:The name's offset is not fixed because the number's length is not, which is why the block is parsed forward rather than backward from either string.
IfcSpace.LongNameIfcSpace.NameRecovery is all-or-nothing per room: blocks that disagree drop the room rather than pick a side.
3. The body. The record bbox is the export's plan envelope and vertical extent — not an approximation:
zbaseztop(stream, offset)111 of 116 rooms carry frames that disagree about the plan box, so the RE-26 newest-frame tie-break is load-bearing here. Re-measured on the emitted IFC after the metre round-trip: plan envelope exact 116/116 (worst 1.640e-06 ft, the writer's six-decimal rounding),
zrange exact 116/116 (worst 1.421e-14 ft).4. Storey containment (#219). All 116 bind through the RE-27 Level reference — every room record names exactly one Level, unlike columns and walls which carry base and top constraints. The ten Level ElementIds map one-to-one onto ten
IfcBuildingStorey, and each is the storey the export aggregates the room into. This is the first part of RE-27's bind scored against Revit's own containment. The parameter block's own Level slot agrees 116/116 independently, as does the record basezagainst the storey elevation.What stayed negative, and why
The boundary polygon is not in the file. Four independent tests:
OST_SketchLinesowners RE-25 recovers include 0 rooms.0.0,NaNsentinels and small words.[3, <Level>, <wall>, <wall>, <own id>], length 5 on all 116, against a room with nine vertices.All 108 distinct reference coordinates and all 186 distinct vertices are in the file, as wall faces — what is absent is any place a room's own vertices sit in order. This matches Revit's model: a room's boundary is computed from its bounding elements, not stored.
ProfileResolvedstaysfalse; recovering the enclosure from the recovered wall set is a different problem and is not attempted.How good the box is, stated rather than glossed: 76 of 116 record boxes equal their room's polygon exactly in area, 40 over-state it (total 20 870.7 sq ft of box against 19 582.1 sq ft of polygon, ratio 1.0658, worst 2.037 on the 22-vertex room 25945).
Measured before / after on
2024_Core_Interior.rvtIFCSPACEstorey_bound_elementsIfcBuilding(storey unknown)IFCPROPERTYSET/IFCRELDEFINESBYPROPERTIESIFCWALL/IFCDOOR/IFCWINDOW/IFCCOLUMN/IFCSLAB/IFCSHADINGDEVICE/IFCBUILDINGSTOREY/IFCRELFILLSELEMENTunsupported_featurespartial_element_geometrycurve=18, missing_level=19, missing_dimensions=18missing_level=1partial_element_geometrydisappearing is the honest consequence of the last geometry-free elements gaining a body.Both OctetProof verdicts stay PASS, and the full-project claimed surface goes 13 → 14 fields (excluded 3 → 2):
entity_counts.IFCSPACEjoins it, with rvt-rs, IfcOpenShell 0.8.5 and IFClite 7.1.1 all at 116, 0 diffs.Changes
src/partition_room_parameters.rs(new) — the parameter-block framing, the confirmation test, the forward parse,resolve_unique.src/partition_element_records.rs—OST_ROOMS.src/partition_schema_mvp.rs—rooms_from_partition_category_records/room_instances_from_records; the string-derived rooms stand down where records decode, the same trade the plan-loop floors take against record-backed slabs.src/ifc/export_content.rs—RoomNumber/RoomNamejoin the record property set.src/ifc/step_writer.rs—IfcSpace.LongNameis the recovered room name when there is one (the slot Revit uses for it);Namekeeps theRoom-<ElementId>identity, becauseIfcSpacedeclares noTagand the STEP line would otherwise carry no source id.src/ifc/compare.rs— theIFCSPACEdivergence note.examples/probe_re29_room_records.rs(new) — the reproducible probe: category histogram, instance scoring, record dump, vertex-run search, name-carrier search, parameter-block scoring.reports/element-framing/RE-29-room-instance-and-envelope.md(new).tests/iter_elements_typed.rs—core_interior_2024_room_instances_names_and_envelopes, which re-reads the reference export and scores the id set, names, numbers and Level bindings directly.tests/fixtures/project-counts/*.json,research/witness/**,docs/{status,user-guide,ifc-compare,contribution-map,support-matrix},CHANGELOG.md— measured numbers only.Deliberately not touched beyond what the space path needs:
export_content.rskeeps its structure (two constants and one field read), andstep_writer's change is one private function signature with a single call site.Testing
cargo test --allpasses locallycargo clippy --all-targets --all-features -- -D warningspassescargo fmt --checkpassessrc/partition_room_parameters.rs(written against synthetic blocks before the implementation, covering the happy path, a longer number shifting the name, a disagreeing confirmation slot, a wrong anchor, implausible and zero lengths, a control character, truncation at three offsets, scan scoping, agreeing and disagreeing duplicate blocks, an unsupported release, and a Level slot outside the recovered set) plusspace_long_name_comes_from_the_room_name_propertyinsrc/ifc/step_writer.rstests/fixtures/synthetic-project.ifcis byte-identical — the synthetic fixtures emit no space with aRoomNameproperty, so theLongNamebranch falls back to the elementName, which is what it wrote beforeelements/sense (the recovery is a record scan, gated bysrc/partition_room_parameters.rs::testsand the corpus gate)Commands run:
All green, re-run after
git merge origin/main.Audit-honesty checklist
docs/status.md,docs/user-guide.md,docs/ifc-compare.md,docs/contribution-map.mdanddocs/support-matrix.jsonall carry the new numbers, and the stale 801-of-872 / 853-of-872 / "18 name-only spaces" claims are correctedrooms_spacesmovesknown_gap→knownon the full-project manifest at 116 tolerance 0;partial_element_geometryis removed fromunsupported_featuresbecause it genuinely no longer firesexamples/probe_re29_room_records.rsand a dated report atreports/element-framing/RE-29-room-instance-and-envelope.md. Following the convention of RE-21 through RE-28, the dated addendum lives inreports/element-framing/rather than indocs/rvt-moat-break-reconnaissance.mdClean-room declaration. The changes in this PR are based on public byte observations of
2024_Core_Interior.rvt(magnetar-io/revit-test-datasets, MIT), Autodesk's publicly documentedBuiltInCategoryconstants, and the buildingSMART IFC4 specification plus Revit's own publicly-exported IFC file. 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.Breaking changes
None to the API. Two output changes a consumer may notice, both intended:
IFCSPACEgoes 18 → 116 on Revit 2024 project files where the records decode. Earlier releases and files with no decodable element record keep the string-derived rooms unchanged (verified on the 2023 Einhoven sample).IfcSpace.LongNamenow carries the room's Revit name instead of repeating the elementName, for rooms that recovered one.Output samples
Before (
main):After:
Revit's own export of the same two rooms, for comparison — same
LongName, same body:Note on the report number
RE-28was taken by the wall-type lane (#273) while this branch was in flight, so the room work is renumbered RE-29 throughout. The merge commit resolves one conflict — both lanes appended a corpus gate to the end oftests/iter_elements_typed.rs— by keeping both.Related issues
Refs #90 #219
Note
Medium Risk
Changes real-project IFC export volume and spatial semantics (116 spaces, storey containment, LongName mapping) on a measured but single-file Revit 2024 edge; fail-closed parsing limits blast radius on other releases.
Overview
Replaces 18 name-only
IFCSPACErows (no ElementId, no body, no storey) with 116 record-backed rooms on Revit 2024 when partition element records decode, matching Revit's export id set on the Core Interior corpus.Decoder path: Rooms are selected from
OST_Roomspartition records under the existing #211 instance rule. Number, name, and host Level come from a newpartition_room_parametersscan (owner-anchored parameter block, same family as RE-22). Geometry uses the record bounding box with the RE-26 newest-frame tie-break. String-derived rooms frompartition_name_candidatesare dropped whenever record rooms succeed (same pattern as record slabs vs plan-loop floors).IFC output:
RoomNumber/RoomNameland in the record property set;IfcSpace.LongNameis the recovered Revit name when present (elementNamestaysRoom-<ElementId>). Storey containment rises 853 → 969 of 970 as the 116 rooms bind via RE-27 Level references;partial_element_geometryis removed from diagnostics because every emitted building element now has a body.Not in scope: Room boundary polygons remain a documented measured negative (#90 stays open). Docs, witness/OctetProof fixtures,
probe_re29_room_records, RE-29 report, and corpus gates (core_interior_2024_room_instances_names_and_envelopes) carry the evidence.Reviewed by Cursor Bugbot for commit 4acddc3. Configure here.