Repository navigation
feat(ifc): every IfcSpace says what it is: SpaceKind room, area, mep_space or family_instance (#1437) - #1439
Merged
Merged
Conversation
DrunkOnJava
marked this pull request as ready for review
November 5, 2026 11:39
…, and area_plan_topology_unchecked among the Area outline sources (#1437)
DrunkOnJava
added a commit
that referenced
this pull request
Nov 5, 2026
#1261, #1194) (#1428) ## Summary This reopens #1371 by puzzbobb on a branch of this repository, as puzzbobb agreed on that pull request ("it can be reopened on a branch here"). puzzbobb's two commits are cherry-picked in order and keep them as author (`fec15008`, `c4889e7f`, signed by the committer, as `main-protection` requires); the maintainer's five commits that followed on #1371's branch come after them, with the archived head `refs/archive/2026-11-04/pr1371-area-plan-topology` (`e5b1c8be`) as the source. Their reader is the substance: an Area that the arrangement of its lines leaves without a region takes the loop of Revit's own plan topology, checked against the area Revit saves for it, and the Areas of Revit 2025 to 2027 are read. It supersedes the wall-line rule of #1367, which was worked out from the same IFC2X3 export it is scored against; #1367 becomes research notes only once this lands (Griffin, 2026-11-04). ## The gate (Griffin, 2026-11-05, "Ship, labelled", then "Same-project gate") The Areas of Revit 2025 to 2027 and the 108 Area spaces of the recorded Autodesk 2024 Snowdon Towers samples are written by default. They are **not measured against any Revit export**; RE-333 section 9, the changelog fragments and `docs/rooms.md`, `status.md`, `evidence.md` and `supported-profile.md` say so and name the evidence: the drawn loop equals the area Revit saves in the file for it and holds the Area's point, and on 2025 to 2027 the same project's 2024 save gives the same Areas. **The marker (Griffin, 2026-11-05, "Mark 2025 to 2027 in the file").** His earlier "their own outline source value" had two readings, and the docs-only one was mine; he wants the file to show it. Areas read from Revit 2025, 2026 and 2027 now get `SpaceOutlineSource` `area_plan_topology_unchecked`, wherever the marker shows: the IFC property, `list_rooms` (`space_outline_source`), the schedule CSV's outline source column, and the MCP field's description (the watcher syncs the contract). Snowdon Towers 2024 and every other 2024 file keep `area_plan_topology`, because they share a release and a code path with the office and a release is not split; 2015 to 2023 keep it too (they are the Areas with the IFC2X3 check). It is decided by release in one place, `partition_area_records::area_release_unchecked` (`AREA_UNCHECKED_RELEASES`, 2025 to 2027), which sets a field of the decoded Area that `export_content` reads. `BodySource` and `exported.body_sources` do not split: the body is read by the same code, and the marker says how far it is checked, not how it was read. `tools/re/areas_across_saves.py` expects exactly that per release: a 2025 Area reading `area_plan_topology` and a 2024 Area reading the unchecked value are failures. Consumers checked: `export_content` (marker, `contain_in_spaces`), `schedule_csv` and `element_record_plan_profiles` (keyed on `ProfileSource`, which does not split), `element_provenance` and the COVERAGE rows (keyed on `BodySource`, unchanged), `rvt-mcp` (passes the text through; descriptions updated), `space_profiles_vs_ifc.py` (knows the value). `#1439`'s `SpaceKind` scorer has its own list of Area values, and that lane adds the new one. **The first gate tested nothing, and I recommended it.** It was "no Area written that Revit's export lacks (`only in rvt-rs` 0) on every held-out Revit 2025 to 2027 model with Areas". None of the seven held-out Revit 2025 to 2027 models writes an Area, and all seven exports are byte-identical to main's (Measure run 42003913780 on `bcb02107`), so `only in rvt-rs` 0 could not have failed. I did not count what it would count before recommending it. **The gate now (Griffin's "Same-project gate"): this lands only if rac_advanced's 25 Areas on its 2025, 2026 and 2027 saves equal its 2024 save's, Area by Area.** The fields are GlobalId, number, name, storey, outline source (the value each release gets, above), body area (1e-6 relative), top surface (the symmetric difference of the two top surfaces, 1e-6 relative), height (1e-5 ft) and lowest vertex (1e-5 ft); Griffin's list is the first six and the rest are a floor raised, so that a translation, a rotation, a shear that keeps the area, a raised base or another outline source is a difference. `tools/re/areas_across_saves.py` compares them. `tools/ci/measure-reference-models.sh` runs it on the head side of any Measure run of the samples that holds the four rac_advanced samples (whatever `sample_years` says, as long as it includes 2024 to 2027), once every export is done and before any sample's IFC is deleted; with fewer than the four it checks nothing and prints a notice. The job "The Areas agree across rac_advanced's saves" in `measure.yml` turns the run red unless the output ends `exit 0` and has the scorer's `passed` line. It fails on a missing or unreadable save, on other than 25 Areas or other than 25 Areas with a body on any save (so 26 fails the same way the workflow's grep does), on an Area with no storey, and on any difference, missing or extra Area; a pass on nothing is impossible. **Measure is not a required check, so "blocks landing" means by the landing rule: the result is read before merging.** It prints counts by field and the number of Areas compared on each save, nothing else. **What the first two passes got wrong, found by the second review.** Runs 42008539696 and 42010805118 read "storey 25 equal" on `None` equal to `None`: the first version of the scorer read the storey with `get_container`, and rvt-rs writes a space under its storey with `IfcRelAggregates`, so the storey was never compared; and it pinned 25 Areas but not 25 bodies, so all four saves losing their bodies stayed green. Both are fixed (`get_aggregate`, a missing storey, other than 25 bodies and a missing body are failures). The real storeys of the four saves are `01 - Entry Level` (9), `02 - Floor` (9) and `03 - Floor` (7) with 0 differences, so the fix cannot turn a correct head red. **The proof, run through `read_areas` on written IFC and not through `compare()` on dictionaries.** The reviewer's generator (IfcOpenShell) writes the four saves, each Area an `IfcSpace` aggregated under an `IfcBuildingStorey` with its `SpaceOutlineSource` and an extruded body, and the fixed scorer reads them as it reads an export, then the workflow's own check reads its output file. 23 cases, 0 wrong. Green: the control (25 Areas, 25 with a body, every field equal) and a height 5e-6 ft off (within the tolerance). Red: (1) no body on any save; (2) one body on every save; (3) later saves that lose their bodies; (4) one Area moved to another storey; (5) storeys renamed on a later save; (6) no storey on any save; (7) every body of a later save moved 100 ft; (8) every body turned a quarter turn; (9) one body sheared to the same area; (10) the base of every body raised 5 ft; (11) a different outline source on a later save; (11b) one 2025 Area reading `area_plan_topology`; (11c) one 2024 Area reading `area_plan_topology_unchecked`; (11d) every later Area reading `area_plan_topology`, the release rule not applied; (11e) a lines value on 2027; (12) 26 Areas on every save; (13) 24 on every save; (14) one Area missing from the last save; (15) a save missing; (16) a height 2e-4 ft off; (17) a body area 1e-4 relative off. The harness is in the lane's scratch directory (it needs IfcOpenShell to write files), not in the repository. **Tried on real data.** Run 42008535484, main's exports of the four saves (this branch's scorer and workflow, main's binaries at `ce0b2398`, no #1428): 2024 has 25 Areas, 16 with a body, and 2025, 2026 and 2027 have 0, so each later save fails and the job turned red. Run 42008539696 and run 42010805118 (the pushed head `401f5244`, finished green): 25 Areas on each of the four saves, the gate passed, and the 58 sample exports' hashes are identical to run 42003913780's (I read the second run's myself). Both ran the scorer before the fix above, so their "storey equal" counts were `None` against `None`; the final run below is the first with the fixed scorer on real files. **What it cannot catch:** an error that the 2024 read shares with the later reads (the same wrong region, number, name or height on all four saves), and an error in how the saves are exported that is the same in all of them. It compares rvt-rs with itself, on one project of 25 Areas. ## The 2021 save does not move (a measured residual) Autodesk's `rac_advanced` 2021 save keeps its 25 Areas as `area_without_proven_body` (22 `boundary_lines_not_readable`, 3 `named_lines_not_in_scheme_and_level`), as on main, although RE-333 section 4 says the topology has a region for all 25 on it. From the code: the save holds both states of the model (RE-324 section 4), so 16 area boundary lines have two disagreeing copies; `group_arrangement` returns `Group::Unreadable` for a group that holds one, and `locate` returns that before the plan topology is asked; `draw_area` refuses the 3 Areas that name such a line. That order is the refusal about safety that the review of #1371 asked for (no fallback to the topology after conflicting copies, stray heights or a design option), so it is not changed here. Measured (probe run 42008543772): the topology's 25 regions on the 2021 save equal the 2022 save's and the 2023 save's, Area by Area, in vertex count, holes, arcs and area, so its current native copy holds the later state; no Revit export of that state exists. It gets its own issue. ## Motivation #1261: BIM Whale's 2021 Areas were not written, and on Autodesk's `rac_advanced` main writes 16 of the 25 Areas (the 9 it leaves out are the ones the plan topology draws; #1367's "18 of the 25 drawn" is not on main). #1194: Areas were read on Revit 2015 to 2024 only. RE-333 has the measurements and the reasons. ## Changes - **puzzbobb's reader** (`fec15008`, `c4889e7f`): `src/research/native_area_regions.rs` (the plan topology's loops, offsets, holes and checks) and the chain-entry count that lets Revit 2025 to 2027 records be read (`partition_area_records.rs`). - **The maintainer's commits on #1371's branch, cherry-picked**: the joins cross-check and RE-333 measurements, the vertex where a third line meets, `SpaceOutlineSource` `area_plan_topology`, the warning for dropped chain records only where an Area could be lost, arcs written as arcs (an `IfcIndexedPolyCurve`), the Snowdon Towers 2025 figures removed (below), `tools/re/space_profiles_vs_ifc.py` and the MCP tool descriptions for the new value. The archive's generated contract commit (`e5b1c8be`) is not carried: `docs/mcp-tools.json` and `.md` are never hand-edited, and `rvt-mcp/src/schema.rs` and `server.rs` gain the new `space_outline_source` value, so CI's `tool_contract_is_committed` needs the watcher's contract sync before the full CI is green. - **This branch's own commit** (`94cd0fd7`), the reconciliation with what landed on main since the merge base (`fdff7018`), whose conflicts git reported in `src/reader.rs`, `src/research/partition_area_records.rs`, `docs/status.md`, `docs/export-diagnostics.md` and `docs/format-reconnaissance.md`: - **Value sources (#1368).** #1403 gave Areas `area_boundary_lines` and `area_point`, noted for the lines' frames and the partition's point. An Area drawn from the plan topology was not drawn from either, so it no longer carries them; it carries `area_plan_topology` (rule `native`, `parts`): the Area's own `RoomElem`, the `LevelRoomPlan` that holds its circuit and the `CurveElem` of each line that bounds it, each at its place in its partition (`native_area_regions.rs` `record_place`, kept only while the handle records value sources, so the flag-off path allocates nothing; `partition_area_records.rs` `note_topology_source`). `tests/value_sources_offsets.rs` has the reader in `COVERAGE`, reads each part's id at its offset, and reads the records again from their ElementIds (`check_topology_areas`): the Area's record names a circuit and a point, exactly one part is the plan whose topology holds that circuit and the Area, and the other parts are the lines of that circuit and of the circuits it encloses, all of them and no others. The office's `MIN_READERS` pin `area_plan_topology`; `area_boundary_lines` and `area_point` are no longer pinned on any model of the gate, because the office's 30 Areas all take the topology first, and the test says so beside the row. - **Export decisions (#1326).** `exported.area_body_refusals` and `model_decisions` both derive from the Area's `AreaBodyRefusal` property, so the new reasons (`area_not_in_one_plan_topology`, `area_circuit_not_found`, `area_circuit_side_not_read`, `area_circuit_area_differs`, `area_arc_not_finite`, `area_point_outside_circuit`) are counted by both and there is no list to extend. The diagnostics schema and `docs/export-diagnostics.md` list them (`area_arc_not_finite` was missing from both). - **`SpaceOutlineSource` values and descriptions** (#1351, #1405, #1412): auto-merged; `area_plan_topology` is in the MCP tool descriptions and the docs. - `src/reader.rs` keeps #1389's record stages beside the new dropped-chain-entries note. The two merges of main that #1371's branch carried are carried by this commit and by a signed merge of main. - **The same-project gate** (this round): `tools/re/areas_across_saves.py`; `tools/ci/measure-reference-models.sh` runs it between the exports and the deletion of the samples' IFCs, on the head side of a shard that holds the 2024 to 2027 saves of rac_advanced; `measure.yml` turns the job red unless `areas_across_saves.txt` ends `exit 0` and has the scorer's `passed` line, and lists its counts in the summary. `actionlint` reports nothing on the lines this adds (its only findings are the `uses: $/...` forms already in main's workflows); the workflow parses with a YAML safe loader (ruby's, no PyYAML here), and `bash -n` and `shellcheck` pass on the script. No test target is added: `tools/ci/test-targets.txt` is unchanged. - **Docs and changelog** (`6dacca98`): `docs/rooms.md`, `docs/status.md`, `docs/evidence.md`, `docs/supported-profile.md` and `docs/support-matrix.json` say Revit 2015 to 2027 and name the plan topology; the fragments `changelog.d/added/1261-area-plan-topology.md` and `1194-areas-2025-2027.md` credit puzzbobb by name. ## The review findings on #1371, in code 1. **Crafted file panics.** `partition_area_records.rs:497-498`: `buf.get(span.start..body)` and `buf.get(body + span.entries..span.end)`; a narrow record is taken whole through `buf.get(span.start..span.end)`, and a span that does not lie in the partition is skipped. No raw slice of parsed spans is left in the module. 2. **The fallback to the topology after a refusal about safety.** `locate` returns `Group::Unreadable` (a non-primary design option, stray heights, conflicting copies, a missing line) before the topology is looked at (`partition_area_records.rs:1166`, from `group_arrangement` at `:1043-1062`); the topology is asked for only where the lines are sound but not arranged (`Group::Unarranged`) or an Area's region touches a line off the axes (`group.blocks`). The refusals before it (no Levels, an unaccounted line, no lines) refuse every Area as before. 3. **Arcs as chords.** Written as arcs, `IfcIndexedPolyCurve` with three-point arcs (`src/ifc/export_content.rs`, `indexed_area_curve`); the outline is checked as written, arcs as arcs, against the circuit's saved area, and an arc that cannot be read finitely refuses the Area (`area_arc_not_finite`). 4. **Unrecorded Snowdon Towers 2025 claims.** Out of the report, the changelog and the docs (Griffin, 2026-11-04). The Snowdon Towers figures that remain are the recorded Autodesk 2024 samples in `research/autodesk-sample-projects.tsv` (sha256 `33271010...`, `6dc833f9...`), quoted as counts of what rvt-rs writes. Nothing in the tree cites the 2025 file, its Revit 2025 export or the Japanese sample except RE-333 section 7's sentence that they await a recorded source. 5. **Behind main, RE number.** Rebuilt on main at 182ed21, then a signed merge of `a4044dc8`; RE-333 is free on main and in the open pull requests. 6. **Smaller.** The `REFUSED_*` reasons reach the diagnostics (`topology.remove(&u64::from(id))` is passed whole, with no `.and_then(Result::ok)`). `!sub` replaces `-sub - 1` (`native_area_regions.rs:784`, `:836`). `docs/status.md` and `docs/support-matrix.json` say 2015 to 2027. ## The second review, in code - **Bounds against a crafted file** (`native_area_regions.rs`): a circuit is refused before its edges are built once they pass `MAX_CIRCUIT_SIDES` (10,000), or once its lines' offset parts pass `MAX_CIRCUIT_OFFSET_PARTS` (20,000); the edges are no longer cloned. - **`checked_add`** in `chain_entries`; a circuit side whose line has no `u32` ElementId refuses the Area (`add_line_ids`); `byte_range` includes the skipped entry bytes (`AreaRecord::skipped`). - **Two readers, one region.** Where Revit's plan topology and the lines' arrangement both give a region and they are not the same one (net area to 1e-6, the same corners within 1e-4 ft, no arc in the topology's), the Area has no body and says `area_regions_disagree` in `exported.area_body_refusals` (and in the decisions log). Measured at `e9124b3a`, before the check: the regions were the same on 16 of 16 and 30 of 30; with the check, not yet measured, so whether it loses an Area is what the new run says. - **`dropped` chain records** are counted by ElementId, not by record and partition, and the warning says an area boundary line among them is not among the lines an Area is checked against. The Areas of the Snowdon Towers samples are still written. - **`BodySource` and `ProfileSource`** of an Area drawn from the topology are `native_area_plan_topology`, with their own `body_readers` row and `COVERAGE` row; `schedule_csv` and the plan-profile reader accept it. This moves `exported.body_sources` (the count of `partition_area_boundary_lines` splits) and nothing else that is measured. - **Tests.** The plan records are read with `NATIVE_RELEASES`. `area_boundary_lines` and `area_point` are pinned on no gate model: the office's 30 Areas all take the topology first and no other gate model is known to draw an Area from its lines, so a regression in `note_area_sources` would pass until one does (said at `MIN_READERS`). - **Docs.** RE-333 keeps no per-Area data of the three.js export (counts only, #1377; the archived commits of #1371 carry the earlier version, which is already public, and the policy is applied from here on); six plan-topology reasons, not five; the office's vertex wording is exact (3 outlines start at another vertex and the holes of 6 come in another order as built; 2 and 6 at permit); every figure says which run measured it: the counts of what is written come from Measure run 42003913780 on `bcb02107`, the vertex-level and equality figures from the archived head `e9124b3a`. ## The third round (the second review of this PR), in code - **Hole bound** (`native_area_regions.rs`): a hole that a plan lists again is one hole (`plan()` keeps the first listing of each pair); more than `MAX_REGION_HOLES` (1,000) is `area_circuit_too_large`; one `Budget` for sides, edges and offset parts covers the outer loop and every hole of a region, so duplicates cannot each ask for a full budget. - **A topology read and failed is not replaced by the lines** (`partition_area_records.rs`, `locate`): when `area_circuit_area_differs`, `area_point_outside_circuit`, `area_arc_not_finite` or `area_circuit_too_large` is the topology's answer and the lines draw the Area, the Area has no body and says that reason, counted in `exported.area_body_refusals`. Where the saved area disagrees with the face the lines give, the rule is fail closed. Where the topology was not read (`area_not_in_one_plan_topology`, `area_circuit_not_found`, `area_circuit_side_not_read`) the lines draw as before. No public model had an Area in the first case in run 42003913780: none of its refusals is one of these but Snowdon Architectural's single `area_circuit_area_differs`, and that Area was refused, so the lines did not draw it. - **`area_regions_disagree`, helpers and tests** (`regions_agree`, `same_outline`, `near_outline`, `ring_perimeter`, `point_segment_distance`): the comparison was by corner counts, which a step jog of a few micrometres changes and a ring over 5,000 corners refused outright. It is now by distance: every vertex of each outline within 1e-4 ft of the other's edges, and the area difference within 1e-6 relative plus the band that tolerance allows along the outline. The failure-first tests (a few, next to the helpers, under the pure-helper exception) cover a region of another area, a shifted, a sheared and a curved one, a hole one reader lacks and two holes matched to one, an outline that is not finite, and then the same region called the same: a ring turned to start elsewhere, a vertex on a straight edge, a 5e-5 ft step, a ring of 6,000 vertices, and the same holes in another order. **Which branch has run on real data:** the agree branch (16 of 16 `rac_advanced` joins and 30 of 30 office Areas at `e9124b3a`, and no `area_regions_disagree` refusal on any public model in run 42003913780); the refusal branch has run on no Revit file, only in those tests. A scheme whose lines all have one offset, where the arrangement could close at other positions than the topology, is not found in any file here; if it exists the Area is refused, the fail-closed side. - **Bounds on the gate's reach and wording**: see above. `arm.sh` should read "blocks landing by the landing rule". - **Docs.** No per-Area figure of the three.js export is left in the tree (RE-333 said "three four-sided Areas of under 83 ft2" and how that export writes the curved Area; `docs/rooms.md` said "worst 2.0e-7"; now "all 25 within 1e-6 relative", counts only). `docs/rooms.md` and `docs/status.md` name `area_regions_disagree`, mark `area_plan_topology` "not measured" on Revit 2025 to 2027 and the Snowdon samples, say that it is the Areas' own outline source and not per release (a 2024 Snowdon Towers Area and an office Area take the same path), no longer say "Areas as on 2024" beside models that write none, and say that the office no longer writes `area_boundary`. Snowdon's counts say which head they are from everywhere. RE-333 section 3 reports the disagree check measured (it said "not yet measured"). ## What the evidence is, exactly - **Revit's IFC4 export has no export of these Areas.** The `rac_advanced` check is against the one public export of it, from the three.js repository: IFC2X3, by a build of Revit 2021's exporter whose string ends "IU alternativa 21.0.0.383" (publisher not established), showing the project's 2015 to 2020 state. It is counted apart, never used to remove a value or to settle a disagreement between exporters, and its Measure uploads are counts only (`racadv-*`, #1377). - **It is out of sample for this rule.** The topology's loops, and the areas Revit saves for them (`PlanCircuit m_area`) that every loop is checked against, are in the file; nothing was read off the export. That is the difference from #1367's wall-line rule, whose rule was worked out from the export it was scored on. On the 2020 save, measured on the archived head `e9124b3a`: 25 Areas written, 25 in that export, 0 extra, all within 0.1% in area and 0.01 ft in outline; main's 16 joined Areas equal their topology loops. - **Revit 2025 to 2027** are checked against the same project's 2024 save only. - Per Griffin (2026-11-04): Areas checked against a non-IFC4 or third-party export may ship labelled; the trust marker `area_plan_topology` names the rule, and RE-333, the docs and the changelog name the oracle. ## Testing Unit tests are banned in this repository: none added. The test that changes is a real-file one (`tests/value_sources_offsets.rs`). - [ ] `tools/check-local.sh` passes: not run locally (no local builds on this checkout); `cargo fmt --all -- --check` and `python3 tools/release/changelog.py check` pass here, CI's clippy, MSRV and doc jobs and the corpus tests are the gate. No let-chains; every nested tuple in a collection has a `type` alias. - [x] Verified end to end on real Revit files, **on `5008247d`, the code before the `area_plan_topology_unchecked` marker**: Measure run 42017400629 (unfiltered, base main, nordic, r2025, holdout, samples, racadv). These are the figures of record for that code; the run after the marker (below) replaces them where it differs: - 26 of 117 exports move, the same set as in run 42003913780 (below); - `rules:` findings 0 on 90 models and on 18 held-out; - held-out spaces move on one model only, from (0 in both, 0 only in rvt-rs's, 8 only in Revit's) to (6, 0, 2); - the racadv pairs 2015 to 2020: 116 in both files, 0 only in rvt-rs's, 0 only in Revit's; - MCP: 0 differ on 629 lines; - refusals: `next_storey_not_proven` 9, `area_circuit_area_differs` 1, `point_not_read` 4, and no `area_regions_disagree` and no `area_circuit_too_large`; - the gate passes on the `2024 2099` shard, 25 Areas and 25 with a body on each of the 4 saves, every field equal, and says `skipped` on the `2008 2023` shard; - the semantic merge check (#1334) reads a pass, with 5 findings for #1428. Earlier, on `bcb02107`: Measure run 42003913780 and timing run 42003917325: 25 public exports move and one held out; bodies `native_area_plan_topology` 30 on each office, 25 on each `rac_advanced` save above, 96 on Snowdon Towers Architectural and 2 on Structural; time over main's at most 1.05 (`rst_basic` 2026), peak memory at most 1.03 (`rme_advanced` 2027, 559 to 573 MiB), and the lost `samples-2008-2023` job of run 41990405944 did not recur. The vertex-level and equality figures in RE-333 section 8 are from the archived head `e9124b3a` and were not re-read. The check on the earlier pushed head `401f5244`: run 42010805118, green, with the scorer that compared the storey as `None`; its `ifc.sha256` equal to run 42003913780's on 58 of 58. **The final unfiltered run on this head `7188e2e8`: 42023345111** (`-f base=main -f nordic=true -f r2025=true -f holdout=true -f samples=true -f racadv=true`), unread when this body is written. Expected, against run 42017400629: only the exports of `rac_advanced` 2025, 2026 and 2027 move (their Areas read `area_plan_topology_unchecked`), the gate passes on the new expectation, nothing else changes. No timing run: what changed since the timing run bounds crafted input, compares two regions by distance (quadratic in one ring's vertices, tens on the files measured) and sets a marker. - [ ] If this touches the IFC exporter: the witness verdicts replay or the changed observations are refreshed. Core Interior has no Areas, so its export is expected to be unchanged; the replay is CI's. - [ ] If this is a performance change: N/A. **Final unfiltered Measure on the code of this head, run 42023345111 (7188e2e; the later commit is the MCP contract sync), read by the maintainer:** against 42017400629's head exactly 3 exports move, `rac_advanced` 2025, 2026 and 2027, by the new marker. Against main 91 of 117 are identical and 26 move, the same set as before, 1 of them held out. The same-project gate passes on the expected values: 25 Areas with 25 bodies on each of the 4 saves, every field equal, `area_plan_topology` on 2024 and `area_plan_topology_unchecked` on 2025 to 2027. `rules:` findings 0 on 90 models and 18 held-out, MCP 0 differ on 629 lines, semantic check `pass: 5 findings in 34 models`. ## Audit-honesty checklist - [x] Docs reflect the state after this PR. - [x] A user-visible change has its fragment under `changelog.d/added/`, not in `CHANGELOG.md`. - [x] Limitations: the RE-333 report's "not measured" list is kept (Revit 2026 and 2027 against a Revit export, the Snowdon Towers 2025 file, a scheme with more than one plan on a Level, an Area Revit reports as not enclosed, the straight step where two offset curves do not cross, Revit 2008 to 2014). - [x] Commit messages describe what changed and why. - [x] No emojis, no private paths in committed files. - [x] Reverse-engineering finding: `probes/examples/probe_re333_area_plan_topology.rs`, `reports/element-framing/RE-333-area-plan-topology.md` and an addendum in `docs/format-reconnaissance.md`. ## Legal and contribution hygiene The declaration is puzzbobb's on #1371, quoted here, and the maintainer's commits are Apache-2.0 as the rest of the repository: > - [x] I agree this work is licensable under Apache-2.0 (see `CONTRIBUTING.md`) > - [x] This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see `CLEANROOM.md`) > - [x] Any new test fixtures use synthetic values (`testuser`, `111111`, `FY-20XX`, etc.) and contain no real-world PII > > The class and field names come from the schema each file embeds (`Formats/Latest`), as `rvt-schema` prints them. Autodesk's samples are fetched for the run and never stored. The office is CC BY-SA 4.0, read by byte range and never stored. (The last sentence of that declaration on #1371 about a local Revit 2025 export of Snowdon Towers is not repeated: those figures are out of this pull request.) ## Breaking changes None. `native_area_regions` is a new public module and `AreaRegion` a new public type. Areas of Revit 2025 to 2027 files are new `IfcSpace`, and an Area that main draws from its lines now says `area_plan_topology` where the topology is read. ## Output samples `SpaceOutlineSource` on `rac_advanced` (the archived head `e9124b3a`, run 41894715743): the 6 Areas main marks `area_boundary` and the 10 it marks `area_boundary_joined` say `area_plan_topology`, as do the 9 it did not write. ## Related issues Refs #1261, Refs #1194, Refs #763. Reopens #1371. Supersedes the wall-line rule of #1367. Co-authored-by: puzzbobb <[email protected]> --------- Co-authored-by: puzzbobb <[email protected]>
DrunkOnJava
enabled auto-merge (squash)
November 5, 2026 13:08
DrunkOnJava
added a commit
that referenced
this pull request
Nov 5, 2026
11 of 12 tasks
DrunkOnJava
added a commit
that referenced
this pull request
Nov 5, 2026
…so the walls that embed a curtain wall stop raising the export's peak (#1429) (#1441) ## Summary The saved-graphics pass kept every owner's decoded graph until it returned. #1401 added the 42 walls of the BIM4LCA office that embed a curtain wall as owners, and their graphs, about 66 MiB, sat under every later batch of door and window symbols. The pass now frees an owner's graph with its batch, and meshes the owners that name no symbol of their own before it reads any symbol. The elements it makes are the ones it made; the batches of symbols are the ones they were except where an owner names only other owners (see Changes). ## Motivation #1429: the default export's peak memory on the BIM4LCA office rose 8% with #1401 (917 to 993 MiB as built), time unchanged. The viewer's wasm32 build has a 4 GiB ceiling. The allocation, found with a peak profile on a runner (Measure 42026078557 at 999f4280 on f861227, and 42026084410 at de4bdfff on f55a95a, the parent of #1401, office as built): | | parent of #1401 | main | difference | |---|---:|---:|---:| | RSS peak of the `saved_meshes` stage (`probe_1075_memory_stages`) | 936,856 KiB | 1,014,664 KiB | +77,808 KiB (76.0 MiB) | | RSS peak of the `export` stage | 809,028 KiB | 808,700 KiB | -328 KiB | | live heap after the owners are read (`probe_1075_heap_stages`, event `saved-graphics`) | 681.3 MiB | 747.5 MiB | +66.2 MiB | | live heap at the pass's peak (`probe_1075_heap_stages`) | 864.3 MiB | 932.2 MiB | +67.9 MiB | | heap at the pass's peak, by dhat (`probe_1429_export_peak`, stage `meshes`) | 191.7 MiB in 812,171 blocks | 259.6 MiB in 1,273,774 blocks | +67.9 MiB | | owners meshed | 538 | 580 | +42 | At the pass's peak, dhat puts +58.6 MiB in the u64-keyed BTreeMap leaf nodes of the decoded graphs (278,954 blocks against 181,290), +5.5 MiB in `Cursor::field_as` and +4.2 MiB in the graph objects' vectors (595 blocks against 553: the 42 hosts), all under `extract_graphs` in `extract_in_batches_with_control`. The mesh outputs are the same at both refs. The growth of the live heap while meshing is the same too (+131.6 MiB against +129.9 MiB), so the peak is the same batch on a baseline 66 MiB higher. The issue's guess was half right: the cost is keeping the graphs of all 42 hosts, drawn from their mesh (6) or not, not reading them. The head's whole-export dhat stage was cut at its 540 s limit on a slower runner (inflate 812 ms against 597 ms); the stage probes and the parent's completed export profile (859.8 MiB heap peak) carry the pipeline-level claim. ## Changes - `src/research/native_saved_scene.rs`, `extract_in_batches_with_control`: the owners no other owner names are removed from the owners' map once their batch is meshed, and dropped with the batch's symbols on the thread that frees them; the owners that name no symbol of their own (a wall's graph is its geometry) end a batch of their own, so they are gone before the first symbol of their own is read; only a batch of symbols sets the size of the next batch. The invariant freeing rests on is now stated in the doc comment and kept in code: a shared symbol that names an owner already freed (no owner names it, so it was not kept) has that owner read again with the symbol, as a shared record, which is where the mesh looks it up, as it finds it among the owners in the one-shot read. Where it holds in the common case, the symbol batches are the ones they were (same order, same sizes). Where an owner names only other owners it does not: its set of symbols is empty, so it sorts first and is meshed in the batch of owners that name no symbol of their own, `add_references` reads the symbols of the owners it names with it, and that batch does not size the next one, which the first batch of symbols used to; and a batch of symbols none of which has a record sizes the next as before (1,024 symbols). Output is unaffected by either: sizes decide only which symbols share a batch. Among the doors and windows alone no owner names another (`owners_naming_owners` 0 on both office files), so the first case does not occur there; whether any file has a batch of symbols none of which has a record is not known. - `probes/examples/probe_1429_export_peak.rs`: the dhat profile above, with the real default pipeline (`ExportOptions::default()`, the STEP text written to a sink) and the saved-graphics pass alone. - `changelog.d/fixed/1429-embed-host-peak.md`. - `.github/workflows/measure.yml`, the timing-merge step: a run whose plan has one shard (a run with `models`, or with neither `nordic` nor `samples`) failed with `timing shard 1 left no table`, although the shard had timed its files. `actions/download-artifact` puts the one artifact a pattern matches straight into `path`, with no directory of its name, and the step looked in `shards/measure-timing-shard-1/`. With one shard it now reads `shards/`. Measure 42033494804 and 42033498434 failed this way; the repeat with the fix is 42035065408 and 42035069785, both with a table (one shard, Core Interior and the RE1 and Einhoven models). ## Testing Unit tests are banned in this repository: none added. - [ ] `tools/check-local.sh` is not run here (no local builds); `cargo fmt --all -- --check` passes locally and CI is the gate. - [x] Peak resident memory, `rvt-ifc` default export, median of three, base and head in turn on one runner, head f41eb75: - against the parent of #1401 (f55a95a), Measure 42029771994: office as built 916 to 914 MiB (1.00), at permit 979 to 971 MiB (0.99); time 1.02 and 1.00 (the 3-round median; runner noise is about that much); Core Interior 323 to 323 MiB, RE1 and Einhoven 1.00; - against `main` (aae3b77), Measure 42029769130, 68 files: office as built 993 to 914 MiB (0.92), at permit 1,058 to 971 MiB (0.92), Snowdon Towers architectural 1,108 to 1,062 MiB (0.96), time 0.98 to 1.02 across the 68 files (0.99 and 1.00 on the two office files); every other file 1.00 or 0.99 but Core Interior (310 to 323 MiB, 1.04, see below), the 2026 racbasic sample (1.01) and the 2027 rmeadvanced sample (1.02). - [x] Stage probes on the office as built, head f41eb75, Measure 42029765991: RSS peak of the `saved_meshes` stage 933,592 KiB (parent 936,856, main before this change 1,014,664); live heap at the pass's peak 861.9 MiB (parent 864.3, main 932.2). - [x] The batched read makes the elements the one-shot read makes (`probe_1075_saved_batches`, Measure 42029765991): the doors and windows (538 as built, 534 at permit) and, with their symbols as owners too (643 and 633; 538 and 534 owners named by another owner, which are kept), 0 elements different, the same progress events. The walls are not in that probe's selections on the offices (the every-element selection is skipped over 8,000 owners), so no symbol-free batch preceded the symbol batches there: the new path is exercised by the run below. - [x] Core Interior's resident peak takes one of two values on the same code: about 310 MiB (317,228 to 321,064 KiB) or about 323 MiB (330,568 to 331,272 KiB), round to round and run to run, and `main` itself is in both. `rvt-ifc` showed 310 MiB on `main` (aae3b77) and 323 MiB here in Measure 42029769130; that pair was the low mode of `main` against the high mode of this change, which is the mode `main` is usually in too. Over 21 rounds of `main`'s code in the runs below, 16 are high and 5 are low; this change has been high in all 12 of its rounds, as was the parent of #1401 in its three. What decides the mode is not known. The heap is the same either way: the stage probes on `main` and on f41eb75 (42032046664, 42032050573) give the same live heap (export peak 289.6 MiB, saved-graphics pass peak 288.8 MiB, both) and the same RSS peak of the `saved_meshes` stage (330,608 against 330,660 KiB). The rounds, in KiB: - 42029769130 (aae3b77 against this code): `main` 317,228, 321,064, 317,580; this code 330,692, 330,720, 330,772; - 42029771994 (f55a95a, the parent of #1401, against this code): the parent 330,856, 330,900, 330,568; this code 331,040, 330,820, 330,896; - 42033494804 (aae3b77 against itself): six rounds at 330,840 to 331,272; - 42033498434 (4baac80 against this code): `main` 330,940, 331,152, 317,592; this code 330,788, 331,048, 331,084; - 42035065408 (4baac80 against this code, with the timing fix below): `main` 331,004, 330,948, 331,016; this code 331,008, 331,028, 331,100; - 42035069785 (4baac80 against itself): 330,832, 331,020, 330,692 and 330,864, 317,564, 330,912. - [x] The IFC does not move at 0bd31d7, Measure 42033631386 (`-f base=4baac80c -f nordic=true -f r2025=true -f holdout=true -f samples=true`, head 0bd31d7 against `main` at 4baac80): `ifc.sha256` is identical on all 111 files, 0 different, none on one side only: 34 models (the reference models, the BIM4LCA office and the Revit 2025 models), 19 held-out and spent models (counts only) and 58 Autodesk samples of Revit 2015 to 2027. The scorer diff of the run (`compare-scorer-diff`) is one line, a file only the head side writes (`areas_across_saves.txt`). The set did not include BIMcollab's example or rac_advanced's IFC2X3 comparison (`bimcollab`, `racadv`), which the recipe leaves out. - [x] The IFC does not move at the final code, head 5808250, Measure 42037891871 (`-f base=a0639777 -f nordic=true -f r2025=true -f holdout=true -f samples=true`, `main` at a063977 with #1439 on both sides): `ifc.sha256` is identical on all 111 files, 0 different, none on one side only (34 models, 19 held-out and spent models, counts only, 58 Autodesk samples). The scorer diff of the run is the one line `Only in measure-head: areas_across_saves.txt`, as for 0bd31d7. - [x] The batched read makes the elements the one-shot read makes at the final code, `probe_1075_saved_batches`, Measure 42037895275 (head 5808250), 0 elements different in every selection of every model, the same progress events: - Core Interior (138 doors and windows): `owners_and_their_symbols` 149 owners (138 naming owners), `owners_and_every_other_symbol` 144 owners (45 naming owners), `every_boxed_element` 970 owners, all identical; - the office as built (538) and at permit (534): `owners_and_their_symbols` 643 and 633 (538 and 534 naming owners), `owners_and_every_other_symbol` 591 and 584 (272 and 250 naming owners), identical; `every_boxed_element` skipped over 8,000 owners (12,974 and 13,020); - RE1 Architecture: 5, 10, 8 and 85 owners, identical; RE1 Electrical, Mechanical and Plumbing: 21 and 11 / 15 and 8 / 20 and 10 symbol selections, 49 / 74 / 124 elements with a location, identical; their doors-and-windows selection is empty, which the reader takes for every record, so 10,266, 4,743 and 4,827 elements were compared, identical. The every-element selections have the walls as owners, so a symbol-free batch precedes the symbol batches there. - [x] The re-read of a freed owner that a shared symbol names did not run on any of these files, and is untested on real files. Measure 42040371054 times the same probe on a scratch branch (80d56115, since deleted) that is this change without the re-read, on Core Interior, the RE1 models and both office files: 0 elements different in every selection of every model (the same counts as with it), so no symbol read by a batch named an owner freed with an earlier batch in them, including with every second symbol as an owner (`owners_and_every_other_symbol`, 45 owners naming owners on Core Interior, 272 and 250 on the office as built and at permit). The re-read is the fail-closed answer to a shape the one-shot read handles and these files do not have; it makes the batched read equal the one-shot read where that shape occurs, and nothing here shows it doing so. - Merged since that run: `main` at afec5e3 (#1436: a probe, a report, and `default_representation` in `native_graphics_traversal.rs`, which reads an `InstanceInfo` of Revit 2015 to 2022 as the default representation; the release gate keeps those files out of every export). The merge, 1d7b12a, is clean and touches none of this change's files, and the comparison above was not repeated on it. - Not measured, stated as limits: the browser (wasm32, one thread, where the freed owners drop inline) is inferred from the same code, not measured: `viewer/tests/saved-meshes-measure.spec.ts` covers no model with an embed host. Whether this change can land in Core Interior's low resident-peak mode is untested (it has not in its 12 rounds). The 2027 `rmeadvanced` sample (559 to 568 MiB, 1.02) and the 2026 `racbasic` sample (1.01) are in the same plus or minus 2 percent class as the mode difference, and have no repeat. ## Audit-honesty checklist - [x] No claim in the docs changes: no export byte is meant to move. - [x] Changelog fragment `changelog.d/fixed/1429-embed-host-peak.md`; its figures are the timing runs' and the unfiltered Measure's above. - [x] No emojis, no private paths. ## Breaking changes None. ## Related issues Closes #1429. Its done-when is met: the allocation is found with a peak profile on the office (above), the peak is within 1.02 of the parent of #1401 on both office files (916 to 914 MiB as built, 979 to 971 MiB at permit, Measure 42029771994), and the IFC is byte-identical on every model of the unfiltered Measure (42033631386).
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
Every
IfcSpacegains aSpaceKindproperty in itsRvtElementRecordGeometryset:room,area,mep_spaceorfamily_instance, from the Revit class of the record it was read from. In diff terms, on each model with spaces:IfcSpace'sRvtElementRecordGeometrygains oneIfcPropertySingleValuenamedSpaceKind(an added property, one per space;IFCPROPERTYSINGLEVALUErises by the space count, 116 on Core Interior, andIFCPROPERTYSETandIFCRELDEFINESBYPROPERTIESdo not move);list_roomsgainsspace_kind; the summary (open_model,get_summary) gainsspace_kinds, the spaces by kind, and itsroom_count, which has always counted everyIfcSpace(308 on the office, of which 234 are rooms), is described as that; a sampledget_elementon a space shows the added property in itsRvtElementRecordGeometryset; andget_diagnostics(diagnostics.json) gainsexported.space_kindsandexported.spaces_without_kind;rvt-schedule --schedule rooms, Pythonschedule_csv, the viewer's room schedule) gains a last column,space_kind;SpaceOutlineSourceis unchanged and keeps meaning only where an outline came from.Motivation
#1437 (Griffin, 2026-11-05). An importer cannot tell an Area from a room by asking what it is: the only marker in a default export was
SpaceOutlineSource, and a filter on its values stops catching Areas when a release reads them by another rule (#1428, merged, gives the office's 30 Areasarea_plan_topologyand the Areas of Revit 2025 to 2027area_plan_topology_unchecked). #1359 reports what that costs an importer that places rooms by footprint.docs/rooms.mdnow leads with which property answers which question and says never to filter on the values ofSpaceOutlineSource.Closes #1437. The reply on #1359 was corrected by a comment Griffin approved (issuecomment-6657669525).
Changes
src/ifc/export_content.rs:SPACE_KIND_PROPERTYand the four values; the kind is added to the space'sRvtElementRecordGeometry(made for a space that has none) after every other step, in every export mode, sotyped_no_geometrycarries it too. Taken from the class (Room,Area,Space) or, for any other class written asIfcSpacethrough its own "Export to IFC As" (Nordic LCA office: Revit's export has 44 family instances as IfcSpace (their own Export to IFC As) that rvt-rs writes as proxies #763),family_instance.contain_in_spacesnow takes an Area from its kind and not from four values ofSpaceOutlineSource(the same Areas: an Area with a body has a kind and an extrusion, one without has no extrusion to contain anything in).SpaceOutlineSourceis otherwise untouched.src/ifc/mod.rs,src/bin/rvt_ifc.rs,docs/schemas/export-diagnostics.schema.json,docs/export-diagnostics.md:exported.space_kindsandexported.spaces_without_kind, counted from the model the IFC is written from;rvt-ifcsays so when a space has no kind.src/ifc/schedule_csv.rs,docs/user-guide.md,python/,rvt-py/,viewer/index.html: thespace_kindcolumn andRoomRow.space_kind, and the texts that list the room schedule's columns.rvt-mcp/src/{schema,views,server}.rs,docs/mcp.md:RoomOut.space_kind,SummaryOut.space_kindsand the redescribedroom_count, and thelist_roomsdescription, which lists no outline values beside the advice not to filter on them. The tool contract indocs/mcp-tools.*is main's, synced by the watcher on this head.tools/re/space_kinds_vs_ifc.py(new): per-model count ofIfcSpaceby kind, the spaces with no kind or another value, and the disagreements:areaholds exactly whereSpaceOutlineSourceis one ofAREA_SOURCES, and no other kind holds one.AREA_SOURCESandROOM_SOURCESare the one list of the values in code; a value in neither fails, on any kind, so a release that writes a new one has it listed here first.--totaljudges a run on each model's counts and not its verdict word, fails a model whose spaces are not the number its own export counted (diagnostics.json, or for a model kept as counts only the MCP server'srooms), so a result that saw none of a model's spaces cannot pass, and fails a geometry export whose spaces have lost theirSpaceOutlineSource(an export whose diagnostics saytyped_no_geometryhas none by design). A run of models with no space, such as one filtered to two Revit 2025 roofs, passes when every export agrees it has none. Wired intotools/ci/measure-reference-models.sh(every model and every sample),tools/ci/scrub-holdout-results.sh(thespace kinds:lines, fixed words and integers only, kept for the held-out models), the Measure compare job (last step, in a run that names noscorersor names this one) and the IfcOpenShell job of CI.tools/re/mcp_answers_vs_ifc.py:mcp answerschecks each room'sspace_kindagainst the IFC'sSpaceKind, the summary'sspace_kindsagainst the rooms and the diagnostics, and counts the rooms by kind. With--require-space-kind(Measure passes it on the head side, as it does--require-folded-field) a missing kind, in the answer, the IFC or the summary, is a difference, where two absences used to read as equal.tools/re/space_profiles_vs_ifc.pyandtools/re/areas_across_saves.pytake an Area fromSpaceKind(the first keeps its old inference, from the shared list inspace_kinds_vs_ifc.py, for an export from before this change, so main's side of a run prints the same lines); the second no longer has a list of its own.docs/rooms.md,docs/status.md,docs/support-matrix.json,docs/maintaining.md,docs/python.md, a changelog fragment; the Core Interior witness observations and the dated notes of the two project-count manifests.Looked at and left alone: the viewer's info panel lists the whole
RvtElementRecordGeometrygroup, soSpaceKindappears in it with no code change; the viewer's schedule summary groups by IFC entity and does not splitIfcSpace; the viewer's support matrix is drawn fromdocs/support-matrix.json.docs/schemas/has no schema for the room schedule orlist_rooms.RvtElementRecordGeometryis rvt-rs's own set:pset_property_value_countandpsets_vs_ifccountPset_sets only, soSpaceKindis in none ofPset_counting,decoded.parameter_value_countand the W7 census.Not done, and why:
RvtElementRecordGeometrygets no kind. That is a wall or floor read through the schema walker (RvtWallGeometry,RvtFloorGeometry) whose "Export to IFC As" namesIfcSpace; the diagnostics count it (exported.spaces_without_kind) and the texts now say so. Giving it a kind means a second property set on the entity and a second place to read it from in the diagnostics, the schedule and the MCP server: not a one-line change, for a case no model measured has (0 on all 111). A wall or floor read as a partition record carriesfamily_instance.ifc::build_ifc_model, the library builder, adds no kind: it writes the property sets its caller hands it, and no rvt-rs exporter uses it.mep_spaceis never written today, and "no model measured holds a Revit Space" is a statement about what rvt-rs writes: the schema walker'sSpaceclass is the only source,PRODUCT_RECORD_CATEGORIEShas no MEP space category, and none of the 93 class censuses (diagnostics.json) of Measure run 42019512273 lists aSpace, among them the 12rme_*samples', which list ducts, pipes and rooms. A census says what rvt-rs reads, not what the files hold. The texts say so.Testing
No local build; GitHub's runners are the build. The figures of record are those of Measure run 42027776156 at 04d1b10 (
-f base=main -f nordic=true -f r2025=true -f holdout=true -f samples=true, base main 5988d83); the code of the Rust and the scorers is the same at 34fcf83 (the watcher's contract sync) and at this head, which adds main's #1426 (other elements) and the figures.CI at 34fcf83 is green,
full / CI passedincluded. Its IfcOpenShell job runs the check on Core Interior (116 spaces, 116 rooms, PASS) and RE1 Architecture (11, PASS), then on three broken copies of Core Interior's export, each failing as it should: property renamedno SpaceKind 116, every room called an areaarea without an Area outline source 116, every room's outline source made an Area'sother kind with an Area outline source 116. It also runs atyped-no-geometryexport of Core Interior (room 116,not checked 116, PASS) and five cases of the run total (--total): a geometry export beside the typed one passes; a run of a model with no space passes; spaces that lost their outline source in a geometry export, a PASS over a failure count and a result that saw none of the 116 spaces each fail. Thepull_requestMeasure at 34fcf83 is green.Measure run 42027776156 (success):
tools/re/space_kinds_vs_ifc.pypasses on all 117 models and samples it exported, 66 of them with spaces, and its compare step passes: 4,453IfcSpaces, 3,733 rooms, 628 Areas, 92 family instances, 0mep_space. No space without a kind or with another value, none with an outline source the scorer does not know, noareawithout an Area outline source (all 628 have one) and no other kind with one.The 93 exports that keep their own results hold 3,421 spaces: 2,857 rooms, 472 Areas, 92 family instances; the 24 kept as counts only (18 held-out, 330 rooms and 6 Areas, and the six
rac_advancedsaves) hold 876 rooms and 156 Areas. The office holds 308 at both stages: 234 rooms, 30 Areas, 44 family instances;rac_advanced25 Areas and 91 rooms on every save but 2021's (91 rooms).Against base on that run, nothing else moved:
ifc.sha256(which leaves outFILE_NAMEandIFCOWNERHISTORY) differs on exactly the 66 models and samples with spaces and on none of the other 51;diagnostics.jsondiffers on every model only byexported.space_kindsandexported.spaces_without_kind;mcp answersand the held-outcounts.txtdiffer only by the kind lines and the three checks it gained; the schema rules read 0 findings on all 90 models that have them; every other scorer's output is equal; the Core Interior witness movesIFCPROPERTYSINGLEVALUE27708 to 27824 and nothing else.mcp answersis PASS on every model it scores except the sixrac_advancedsaves against the IFC2X3 export, whoseroomscheck reads 1 difference of 116 on base and head alike (not from this change).The Areas gate (
same-project-gates), which now takes Areas fromSpaceKind, passes on that run, andspace_profiles_vs_ifcprints the same lines as base.The new
--totalwas also run, in a Python session, on the 111 result files of the earlier run 42019512273 (with the one line the scorer has added since injected) and passes, then on copies with one thing changed each: a PASS overno SpaceKind 1fails; the same overSpaceOutlineSource this scorer does not know 3fails;not checked 116on a geometry export fails and on atyped_no_geometryone passes; a result of 0 spaces for Core Interior's 116 fails and for a model with none passes; a held-out count that differs from the MCP server's fails; a model with no result fails.Witness: refreshed from Measure, identical to the committed files on run 42027776156;
tools/ci/witness-verdict.pyreplays PASS for both artifacts with the committed verdict files unchanged. The project-count manifests'IFCPROPERTYSETstays 6510; their notes say so.An earlier run (42016267367, head a2dc72c) had the check crash on every file with a space, because it kept no reference to its IFC file; the compare step caught it and failed the run, as designed. Fixed in 0207224.
Audit-honesty checklist
changelog.d/added/1437-space-kind.mdBreaking changes
None. A column is added after the existing ones of the room schedule, a field to
list_rooms,space_kindsto the MCP summary and two fields to the diagnostics, and a property to the set of everyIfcSpace.