Skip to content

feat(ifc)!: write the openings a cabinet and a door cut in a wall, and a curtain wall's where nothing trims it (#1165) (RE-338) - #1400

Merged
DrunkOnJava merged 23 commits into
mainfrom
feat/1165-unfilled-openings
Nov 5, 2026
Merged

DrunkOnJava merged 23 commits into
mainfrom
feat/1165-unfilled-openings

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Writes the IfcOpeningElements that Revit's export holds for a fire hose cabinet, for a door in a second wall that runs across the door's wall, and for a curtain wall where nothing trims its box, from the native records of the walls they cut. Every step of a wall's record that names one of these cutters and is not written is counted by reason in exported.wall_cut_openings_left_out, and the counts close. Report: RE-338.

Motivation

#1165: on the BIM4LCA office as built Revit's export holds 220 unfilled openings and main writes 75. Measure 41952363750 (head 04f60dd, base main at 77d71cb), box within 0.01 ft and GlobalId, name, type and both References equal on every opening written, none wrong:

kind Revit's, as built / permit written counted, not written
fire hose cabinet 39 / 38 39 / 38 none
door in a second wall 39 / 43 25 / 33 wall along the door's wall 9 / 9; door box not read 1 / 1; own-cut step in a wall it is not hosted in 4 / 0; shadow cutout 1 / 0
curtain wall 70 / 72 27 / 13 within half a foot of the wall's end 41 / 30; another wall beside the box 2 / 1; record copies disagree 0 / 27; shadow cutout 1 / 1

Unfilled openings written go 75 to 169 as built and 69 to 156 at permit; the census gains 182 equal property values and 198 equal quantities as built (Measure 41959375917, head f54b619, the census keyed by wall; main re-scored the same way). Core Interior (63 of 63) and RE1 Architecture are as main writes them, with wall_cut_openings_left_out empty. Of the 31 files of Measure 41952392277 (head 04f60dd; Autodesk's 2024 to 2027 samples and the reference models) all but rac_basic 2024 and 2025 are byte-identical to main's, and those two gain one opening each; the export of rme_advanced 2024, the largest MEP sample, takes 9,781 ms against 9,667 (peak 574 against 573 MiB) with every wall's record now read for its steps. The 19 held-out and spent models are byte-identical (Measure 41954664033, head 17623bf, the same code).

The thresholds (half a foot inside a wall's ends and the neighbour test for a curtain wall, a quarter foot of reach and a slenderness of 2 for a door, 0.05 ft of height, 0.01 ft between record copies) were fitted and checked on the office pair alone. The held-out and reference models exercise none of them.

Decided by the maintainer, 2026-11-04 (about 10:30 PM EST, AskUserQuestion): "Write them, count apart". Six openings are written that Revit's export of the same file lacks and its export of the other office file holds (as built two curtain walls, 1815871 and 1892067, and a cabinet, 3388647; at permit two cabinets, 3387194 and 3390319, and a door, 1728679). They are counted apart as a pair inconsistency by a generic rule with no ids: an unfilled opening this file's export lacks that its sibling file's export has. unfilled_openings_vs_ifc.py counts them on their own line, neither as extras nor as matches, and psets_vs_ifc.py now counts their property values on a line of their own (6 values on 3 openings as built, 8 on 4 at permit with RE-321's), not as values Revit does not write and not as matches; it keys an unfilled opening by its Tag and its wall. This differs from the 2026-11-03 case (RE-321 section 4): the records behind these six are not byte for byte the other file's (Measure 41955022785, head c0c3e0c, RE-338 section 6). The steps' fields are identical but for a stream offset on all six; the cutter's record is identical on four; the host wall's record on none (the walls' join steps and geometry history differ; over the 994 pairs both files hold it is identical on 110). rvt-rs's box is Revit's box in the sibling export to 0.000 ft on the four whose cutter is identical (the curtain walls 1815871 and 1892067, the cabinets 3387194 and 3390319) and 0.655 and 0.130 ft off on the cabinet 3388647 and the door 1728679, whose cutters moved 0.220 and 0.048 ft between the saves.

Changes

  • src/research/native_wall_cuts.rs: the step's m_bCutSomething; frame_boxes returns every copy of a record's box; instance_cut_boxes (a cabinet's cut box, refused for a symbol that cuts disjoint solids).
  • src/ifc/wall_cut_openings.rs: the cabinet (m_bCutSomething 1 only), door and curtain-wall rules, the refusal of a box outside its wall's height, and the reason of every step not written; the door boxes are the ones opening_cuts_through_hosts computes once for the exporter and the opening writer (ifc/mod.rs).
  • src/ifc/entities.rs, step_writer.rs, mod.rs: WallCutOpening takes the cutter whose type name is the Reference, RECESS and whether the quantities are written; IfcModel::wall_cut_openings_left_out and exported.wall_cut_openings_left_out. Aggregate-only: the counts are not backed by per-step entries in the --export-decisions log (Per-element export decisions: why an element, body, opening or outline was left out #1326); that is a follow-up.
  • tools/re/psets_vs_ifc.py, ifc_common.py, unfilled_openings_vs_ifc.py: the property census counts the sibling-only openings' values apart and keys an unfilled opening by its Tag and its wall (siblings moves to ifc_common).
  • probes/examples/probe_re338_sibling_records.rs (the records of the six openings); the void-tag probe belongs to fix(elements): a floor's void is tagged with the highest ElementId of its sketch lines where they run clockwise (#1165) (RE-339) #1402 and is not in this PR.
  • docs/export-diagnostics.md, docs/schemas/export-diagnostics.schema.json, docs/release-1.0-criteria.md, docs/contribution-map.md, docs/format-reconnaissance.md (addendum), reports/element-framing/RE-338-wall-cut-openings.md, changelog.d/added/1165-wall-cut-openings.md.

Testing

No unit tests (banned). Measured on real files against Revit's own IFC4 exports of the BIM4LCA office (CC BY-SA 4.0); reproduction in RE-338 section 7.

  • tools/check-local.sh passes: not run locally (no local builds). CI on this PR's head is the gate.
  • Verified end to end on real Revit files. Measure runs: 41952363750 (both offices, Core Interior, RE1 Architecture; unfilled_openings_vs_ifc, psets_vs_ifc, qtos_vs_ifc), 41952392277 (samples and timing), 41954664033 (19 held-out models, counts only), 41955022785 (the records of the six openings), 41959375917 (the census with the sibling rule, head f54b619, scorers from the branch). Earlier heads: 41946182305 (17966cb), 41947438218 (51db798, doors only where the box overlapped, superseded), 41949923936 (0bf87c7), 41950674065 (c2033d2); the figures above are the last head's, and 41950674065 had 16 curtain walls and 159 and 139 openings at permit before the record copies were compared. The unfiltered run is the main session's.
  • Witness verdicts: Core Interior's and RE1 Architecture's exports are byte-identical to main's, so no observation moves.
  • Performance: measured on the samples above (head over base 0.99 to 1.03 in time, 0.97 to 1.01 in peak memory over 31 files).

Audit-honesty checklist

  • README / docs reflect the state after this PR: RE-338, docs/release-1.0-criteria.md (the census sentences and the contradictory lines at 114, 161 and 192 to 197), docs/contribution-map.md, docs/format-reconnaissance.md, docs/export-diagnostics.md.
  • The user-visible change has its fragment, changelog.d/added/1165-wall-cut-openings.md.
  • The limitations are in RE-338 sections 5 and 6: the doors that cut a wall along their own, the curtain walls near a wall's end or beside another wall or with disagreeing copies, the door in a door and the wall in a wall are not written; the thresholds rest on the office pair; the six sibling-only openings are written by the maintainer's decision.
  • Commit messages say what and why; no emojis, no private paths.
  • A reverse-engineering finding: the probe is in probes/examples/ and the addendum in docs/format-reconnaissance.md.

Legal and contribution hygiene

  • Apache-2.0.
  • Clean-room declaration: the changes in this PR are based on public byte observations of the BIM4LCA office (CC BY-SA 4.0), whose native records the probe and the writer read, on Revit's IFC4 exports of it, and on the public structure of revit-ifc's opening numbering (CLEANROOM.md source 5), none of whose code is copied or translated. 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.
  • No fixtures added.

Breaking changes

IfcModel gains the public field wall_cut_openings_left_out, so struct literals must add it (wall_cut_openings_left_out: Default::default()). IfcEntity::WallCutOpening gains reference_from, recess and quantities; the variant is 0.14.0's and nothing outside the writer builds it. native_wall_cuts::frame_boxes (behind unstable-research) returns every copy of a record's box.

BREAKING CHANGE: IfcModel gains the public field wall_cut_openings_left_out, and IfcEntity::WallCutOpening the fields reference_from, recess and quantities.

Related issues

Refs #1165.

… a curtain wall's where nothing trims it, and count the steps left out (#1165) (RE-338)

A wall's native record lists the elements that cut it. A fire hose cabinet's step writes the box of the solid its symbol cuts, a door's step with m_bCutSomething 0 writes the door's own opening box in a wall that runs across the door's wall, and a curtain wall's step writes its box where it lies half a foot inside the wall's ends and no other wall touches the opening. Every other step is counted by reason in exported.wall_cut_openings_left_out.
@DrunkOnJava DrunkOnJava changed the title feat(ifc): write the openings a cabinet and a door cut in a wall, and a curtain wall's where nothing trims it (#1165) (RE-338) feat(ifc)!: write the openings a cabinet and a door cut in a wall, and a curtain wall's where nothing trims it (#1165) (RE-338) Nov 5, 2026
…ies within a quarter foot of (#1165) (RE-338)

Revit's export writes a door's opening in a second wall where the door's box only touches the wall's face or end: 14 of the 25 perpendicular doors on the office as built were refused for an overlap that Revit's own openings do not have.
…and curtain-wall openings, and the criteria page the census after them (#1165)
@DrunkOnJava DrunkOnJava added ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes area:ifc Work in the ifc area. type:feature New product or library capability. labels Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 5, 2026 01:37
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
…-aligned prism, so the left-out counts close (#1165) (RE-338)
… wall's height, a curtain wall whose record copies disagree and a symbol that cuts disjoint solids; compute the door cuts once (#1165) (RE-338)

Review of #1400: only m_bCutSomething 1 is measured for a cabinet; a box above or below its wall is not Revit's opening; frame_boxes now returns every copy of a record and a curtain wall's copies must agree to 0.01 ft; the door opening cuts the writer uses are the ones the opening writer used. The void-tag probe belongs to #1402 and leaves this branch; probe_re338_sibling_records digests the records behind each wall cut in the two office files.
… their stream offsets and prints the six cases (#1165) (RE-338)
…the figures at the final head and fixes the criteria and map lines (#1165)
…s export lacks and its sibling's holds apart, and keys each by its wall (#1165) (RE-338)

Griffin, 2026-11-04 (AskUserQuestion): write the six sibling-only openings, count them apart. psets_vs_ifc.py no longer counts their values as values Revit does not write; an unfilled opening is keyed by its Tag and the wall it voids, so the door whose Tag is also on its opening in another wall is not scored against that one. The rule names no ids.
… sibling-only openings, gives their boxes against the sibling's, and the census with the sibling rule (#1165)
@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 5, 2026 04:03
@DrunkOnJava
DrunkOnJava disabled auto-merge November 5, 2026 04:04
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 5, 2026 05:07
@DrunkOnJava
DrunkOnJava merged commit 61f2080 into main Nov 5, 2026
33 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1165-unfilled-openings branch November 5, 2026 05:18
DrunkOnJava added a commit that referenced this pull request Nov 5, 2026
DrunkOnJava added a commit that referenced this pull request Nov 5, 2026
…mesh where Revit raised its base (#1385) (RE-340) (#1401)

## Summary

A wall that embeds a curtain wall is drawn from the mesh Revit saved for
it where that mesh starts at least 0.5 ft above the wall's base, which
is where Revit has cut the wall's end stubs away and raised its base
(RE-340), on Revit 2024 to 2027. Every other wall keeps its body,
including the hosts that keep their stubs (2103576 as built, 2177158).

Commit subjects: 98262a3 names RE-336 and the commits up to 4750acc
say RE-338; both mean RE-340, the report and the title of this PR
(renumbered because #1398, #1400 and #1402 hold RE-337, RE-338 and
RE-339; commit subjects cannot be changed).

## Motivation

#1385, from RE-335. Six walls of the BIM4LCA office as built (eight at
permit) are drawn 8.2021 or 9.514 ft taller at the base than Revit's
body, because rvt-rs draws the wall whole where Revit draws it less the
curtain wall's prism and less whatever cuts its end stubs. No record of
the cut partners says which walls keep their stubs: every raised host's
stubs lie inside its partners' boxes, and so do those of 2177158 (as
built and at permit) and 2041479 (at permit), which Revit keeps (RE-340
section 2). The wall's own saved graphics do say: the lowest vertex of
its saved mesh is Revit's lowest point on 113 of 113 host states (57 as
built, 56 at permit), to within 0.001 ft.

## Changes

- `src/ifc/saved_meshes.rs`: `attach_scoped_with_control` also takes the
walls whose native record names a `WallEmbedWallGStep` of an
`IfcCurtainWall` of the model, drawn as plain extrusions or with
RE-320's stepped top and with no base cut at a floor (#1384), alone in
their Tag (decided over every entity, before any piece is dropped), and
with nothing hosted in them but the void their own curtain wall cuts
(#1400's `WallCutOpening` whose Tag is a cutter of the wall's own embed
steps is ignored; any other opening, door or window keeps the wall). It
reads their saved graphics in the pass that already reads doors' and
windows', and draws the wall from the mesh when it decodes whole (no
diagnostic, RE-224) and starts at least 0.5 ft above the wall's base and
ends as far below its top. `SavedMeshReport` gains `embed_hosts`,
`embed_raised`, `embed_partial` and `embed_error`; the RE-224 test and
the mesh-to-local-frame code became two helpers shared with the existing
path.
- `src/reader.rs`, `src/research/native_wall_cuts.rs`: `wall_cut_steps`
keeps the steps it read on the file's handle and reads only the walls it
has not been asked for, so #1400's pass over every wall's record and
this pass share one read instead of making two. (Folding it into #1400's
pass was not possible as such: that pass runs in the model builder and
this one in the export pipeline, after the saved-mesh scope and release
are decided, and handing one to the other would need a new field on
`IfcModel`.)
- `src/ifc/export_pipeline.rs`: two new last `ExportNote` variants,
`EmbedHostBodies` (hosts, drawn from their mesh, kept for a mesh that
did not decode whole) and `EmbedHostBodiesSkipped` (why the walls'
records could not be read); `rvt-ifc` prints them. No MCP tool changes;
`rvt-mcp/src/args.rs` is untouched because its `saved_meshes`
description, "Bodies drawn from saved meshes", is generic (#1375) and
still true, so `docs/mcp-tools.*` do not move.
- `rvt-ifc` and `rvt-gltf` help for `--saved-meshes` and
`--no-saved-meshes`, the Python docstring and stub, `docs/status.md`,
`docs/evidence.md`, `docs/compatibility.md`, `docs/python.md`,
`docs/release-1.0-criteria.md`, `README.md`, `docs/support-matrix.json`
(`element-record-wall-centreline-bodies`), all saying Revit 2024 to 2027
for the walls.
- `probes/examples/probe_1385_cut_partners.rs`,
`probe_1385_wall_saved_mesh.rs` and
`tools/re/wall_stub_bodies_vs_ifc.py`: the probes and scorer behind
RE-340. `reports/element-framing/RE-340-embedded-wall-stubs.md`, a note
in RE-335's status, `changelog.d/changed/1385-embed-host-bodies.md`.

## Testing

Unit tests are banned in this repository; none added.

- [ ] `tools/check-local.sh` is not run here (no local builds); `cargo
fmt`, `python3 tools/release/changelog.py check`,
`tools/ci/api-doc-ids.py` and `tools/ci/render-mcp-tools.py --check`
pass locally and CI is the gate.
- [x] Verified end to end on real Revit files (the BIM4LCA office as
built and at building permit, Revit 2024, CC BY-SA 4.0; Core Interior;
RE1 Architecture) against Revit's own exports, on the merged head with
#1400's openings written. Measure
[41973316830](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41973316830)
(head 3ad0762, this branch with `main` at 61f2080 merged, against
`main` at 61f2080; the height, top, quantity, layer, property, mesh and
opening scorers), figures in RE-340 section 5:
- **The 14 hosts Revit raises (6 as built, 8 at permit) have Revit's
base again**, with 6 of 42 and 8 of 41 considered hosts drawn from their
mesh: walls with base and top Revit's 598 to 604 of 607 as built and 577
to 585 of 589 at permit; `top Revit's, base not` 8 to 2 and 12 to 4 (the
rest are Basement walls on footings, not hosts);
- **#1400's void is present**: 2098938 and 2105250 as built carry it
over the raised strip (`voids R1 U1`, Revit's 1); every opening scorer
(`unfilled_openings_vs_ifc`, `openings_vs_ifc`, `opening_hosts_vs_ifc`,
`opening_boxes_vs_ifc`, `opening_guids_vs_ifc`) and the quantity and
property census are identical to `main`'s;
- **No other row moves against `main`**: `wall_heights_vs_ifc` and
`wall_quantities_vs_ifc` change 6 rows as built and 8 at permit, all
hosts; 2103576 as built and 2177158 are unchanged; Core Interior and RE1
Architecture are identical, `ifc.sha256` included;
- `Height` from rvt-rs's body equals Revit's on 578 of 579 walls as
built (572 on `main`) and 565 of 565 at permit (557); `NetVolume` on 331
of 607 (325) and 292 of 589 (284);
- the 14 meshes against Revit's bodies (`mesh_bodies_vs_ifc`, run
41945943795 at 847c373): 12 within 0.01% in volume with every vertex on
the other's surface; the other two are 2177212 (as built and at permit),
volume ratio 0.990, the strip 0.114 ft shorter than Revit's IFC draws
it. The mesh equals Revit's own `NetVolume` and `GrossSideArea` of the
wall (14.590083 against 14.590085 ft³ as built), so the 1.0% is Revit's
IFC tessellation against Revit's quantities; the wall stays in the rule
and its follow-up is the main session's to file.
- [x] **GLB layers** (`wall_layers_vs_ifc`, same run, #1405 in `main`):
as built, walls drawn in layers fall 602 to 596 (the six hosts have two
or more layers and are drawn in one material; layer centres within 0.001
ft 583 of 598 to 577 of 592, the same 15 misses; colours 710 to 704); at
permit 519 to 519, the one-layer hosts keeping their layer's colour
through `one_layer_solid_meshes`. The IFC keeps every host's layer set.
- [x] **Held-out, Revit 2025 and Einhoven on the merged head** (`-f
holdout=true -f r2025=true -f models="holdout-* spent-* r2025-*
einhoven"`, Measure
[41973319628](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41973319628),
head 3ad0762 against `main` at 61f2080): 44 models, 193 files, every
one identical to `main`'s. **Autodesk's samples** (Measure
[41973322205](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41973322205)):
58 samples of Revit 2015 to 2027, 526 files, identical but the export
time and the new note on 16 samples (0 of 1 to 15 hosts drawn from a
mesh; Snowdon Towers architectural 0 of 15). Whether a held-out model
holds an embed host is not known from what is kept.
- [x] Snowdon Towers architectural: Revit's own IFC4 export has one wall
that starts 0.5 ft or more above its placement (1996153, a parapet cap,
1.9167 ft) and it is not one of the file's 17 walls that name an embed
step (run 41952518382 at 4750acc), so none of its hosts is raised
there.
- [x] Exporter change: the witness verdicts' drift is checked by CI's
`IfcOpenShell validates exports` and `Corpus health` jobs. No unfiltered
Measure with every scorer on every model was run; that is for the main
session before arming.

## Audit-honesty checklist

- [x] Docs reflect the state after this PR (RE-340,
`docs/support-matrix.json`, `docs/evidence.md`, `docs/compatibility.md`,
`docs/python.md`, `docs/status.md`, `docs/release-1.0-criteria.md`,
`README.md`).
- [x] Changelog fragment under `changelog.d/changed/`.
- [x] The limits are in RE-340 sections 5 to 7 and here: the 0.5 ft
threshold was fitted and checked on the same two office files (113 host
states, 10 distinct raised walls) and nothing outside them has tested
it; an embed host with a door, window or other opening hosted in it, a
base cut at a floor, a Tag shared with another entity or an embedded
wall that is not a curtain wall keeps its body; Revit 2023 and earlier
are not touched (their wall records give no embed step); walls Revit
raises for another reason (footings) are not touched; the glTF draws the
six multi-layer hosts as built in one material; 2177212's mesh is 1.0%
under Revit's IFC body in volume at both dates; and `--no-saved-meshes`
keeps the records.
- [x] No emojis, no private paths.

## Breaking changes

None. `SavedMeshReport` and `ExportNote` are `#[non_exhaustive]`; the
first gains fields and the second its last two variants.

## Related issues

Closes #1385. All three done-when items are met by this PR: a byte-level
reading separates the two cases (the wall's saved mesh), the hosts Revit
raises draw Revit's base, and 2103576 (as built) and 2177158 do not
change.
DrunkOnJava added a commit that referenced this pull request Nov 5, 2026
… beneath it is drawn to that wall's face (#1396) (RE-337) (#1398)

## Summary

**This ships as a labelled approximation (Griffin, 2026-11-05 at about
12:30 AM EST, answering a question asked with the question tool: ship
it, labelled).** Revit steps the end up past the wall beneath, by a join
order that is not read, and the steps above the block are not drawn. A
wall whose block stops below its top carries `BodyEndSource`
`wall_end_to_base_wall_upper_step_omitted` (2 walls on each office file,
2057668 and 2057670, run 41980282001); `wall_end_extended_to_base_wall`
is kept for a block that reaches the wall's full height, which no
measured wall does.

A wall with an edited elevation profile that is a plain rectangle along
a model axis and is drawn from its record box now has an end drawn to
the face of the perpendicular wall beneath it that holds its base, where
the record box's end (before the join trim) lies inside that wall and
the cut of the wall's base still resolves over the longer plan. The
added end is a block drawn up to the lowest of the top of the wall it
reaches, the base of any other wall the pass reads that it would lie
inside, and the wall's own top; the wall's profile openings stay where
they were. Walls 2057668 and 2057670 of the BIM4LCA office have Revit's
lowest point as built and at building permit, and no wall has more
points above Revit's top in the plan rows than on `main`. No other wall
of either office file, Core Interior, RE1 Architecture, the 24 R2025
models, the 58 Autodesk sample projects or the 25 held-out models
changes. A wall that keeps an end the rule would have drawn carries
`BodyEndRefusal`, counted in `exported.wall_end_refusals`. Report:
RE-337.

## Motivation

#1396: after RE-336 the Basement walls 2057668 and 2057670 (and 2058499
and 2058501 at permit) were 0.123 ft (0.044 ft) off Revit's lowest point
because their plans end short of Revit's at the low end of the footing.
The record's join trims the end to the face of a Level_01 wall that
overlaps the wall by 0.66 ft of 9.5, while Revit's body at the base runs
on to the face of the Basement wall beneath
(`JoinEndGStep.m_geomJoined`), which the record box's end lies inside,
and steps up the height to the faces of the walls above. Each of these
walls has an edited elevation profile, which separates them from the
other ends a join trim moves: a rule on the join alone moved 25 Autodesk
sample projects, a held-out model and one more office wall.

## Changes

- `src/ifc/export_content/wall_tops.rs`: `extend_wall_ends`,
`decide_ends`, `axis_wall`, `stepped_top_wall`, `profiled_wall`,
`join_trims`, `SteppedPlan`, `finish_wall_ends` and helpers. The pass
runs after the tops are cut and before the bases are, returns early when
no wall has a profile opening, and reads the model once. It tries the
ends of each candidate on a copy, asks RE-336's `decide_base` again for
a wall whose base join names elements (and makes the solid with the
blocks, refusing if any piece is dropped or any piece has no height
above the base), and moves nothing if the base is no longer cut. It
moves the ends, moves the wall's profile openings back by the shift of
the origin, writes `BodyEndSource`
(`wall_end_to_base_wall_upper_step_omitted` where a block stops below
the wall's top, `wall_end_extended_to_base_wall` where every block
reaches it) and `EndCoverElementId`, or one `BodyEndRefusal`
(`walls_beneath_reach_the_end_at_different_faces`,
`base_cut_lost_on_extended_plan`, `base_not_cut_over_the_extended_plan`,
`wall_beneath_not_one_rectangle`, `wall_stands_in_the_added_end`). The
base pass takes the pieces (the wall's plan and a block for each end,
each to its own top); a wall with no base cut is made by
`finish_wall_ends`, whose first item is the whole plan so the glTF keeps
its layers.
- `src/ifc/export_content.rs`: the property names and values, the order
of the passes and `finish_wall_ends`. `src/ifc/wall_cut_openings.rs`:
`BodyEndSource` counts as a stepped body, so RE-321 openings still
attach (it applies alongside #1400's rewritten `host_of`).
- `src/ifc/mod.rs`, `src/ifc/export_decisions.rs`:
`exported.wall_end_refusals` and the decision
`wall_end_extension_refused` (stage `body_left_as_box`), as for
`wall_base_refusals`; `tests/export_decisions_counts.rs` counts them
against each other and names the reason for the as-built office.
- `docs/export-diagnostics.md`,
`docs/schemas/export-diagnostics.schema.json`, `docs/mcp.md`, and the
reason lists in the descriptions of `rvt-mcp/src/schema.rs` and
`rvt-mcp/src/server.rs` (the contract is synced on the branch).
- RE-337 report, `docs/support-matrix.json`, `docs/contribution-map.md`,
`docs/format-reconnaissance.md`, the RE-336 report, and a changelog
fragment for #1396 that also corrects 0.15.0's #1384 entry (its "other 2
(4) are off" sentence); the release deleted the #1384 fragment, so this
branch deletes it too.

## Testing

No unit tests (banned). Measure at head `1b3a6bd7` against `main` at
`b36477f1` (which includes #1401, RE-340), commands in RE-337 section 4:

-
[41980282001](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41980282001):
both offices, Core Interior, RE1 Architecture, `wall_heights_vs_ifc`,
`wall_top_cover_vs_ifc`, `wall_quantities_vs_ifc`, `wall_layers_vs_ifc`,
`qtos_vs_ifc`, `unfilled_openings_vs_ifc`, `keep_ifc`.
- The rule drew the ends of 2 walls as built (2057668, 2057670) and 2 at
permit (the same two). **Both office files carry the new label on 2
walls: `wall_end_to_base_wall_upper_step_omitted` on 2057668 and
2057670, as built and at permit; `wall_end_extended_to_base_wall` on
none.** It kept the ends of 2 as built (2058499, 2058501:
`base_not_cut_over_the_extended_plan`) and 2 at permit (the same:
`wall_beneath_not_one_rectangle`). `exported.wall_end_refusals` is
`{"base_not_cut_over_the_extended_plan": 2}` as built,
`{"wall_beneath_not_one_rectangle": 2}` at permit, empty on Core
Interior and RE1 Architecture, which are byte-identical (sha256).
- The scorer's own summary against `main` with #1401: walls with base
and top Revit's 604 to 606 of 607 as built and 585 to 587 of 589 at
permit; walls with the top Revit's and the base not 2 to 0 as built and
4 to 2 at permit; misses in the same storey 3 to 1 as built and 4 to 2
at permit. 2057668 and 2057670 go from 0.1230 ft (0.0439 ft at permit)
off Revit's lowest point to Revit's; no other wall's lowest or highest
point changes. Of the scorers run, only `wall_heights_vs_ifc`,
`wall_quantities_vs_ifc` and `wall_top_cover_vs_ifc` change.
- No wall has more `taller` points than on `main` in the plan rows of
`wall_top_cover_vs_ifc`, on either file. 2057668 as built: `equal 85
taller 10 lower 0` of 95 to `equal 85 taller 10 lower 5` of 100 (the
five are where Revit goes on to 182.087 ft and the block stops at
179.2979 ft); 2057670: to `equal 90 taller 10 lower 0` of 100 (Revit's
179.2979 ft); at permit both are `equal 80 taller 10 lower 0` of 90, as
on `main`. (The block to the top of the wall beneath, `1b417c45`, made
2057670 `taller 15`: Revit's end there follows the wall in front of it
from 179.2979 ft, which is the stop now.)
- Volume: 2057668 from 1.704 ft3 under Revit's to 0.593 under, 2057670
from 1.258 under to 0.147 under; at permit both from 0.374 under to
0.088 over, where the block itself is about 0.12 ft3 under Revit's end
(it stops at 180.610 ft, the wall beneath's lowest underside, where
Revit's step is at 182.087 ft) and the rest is about 0.21 ft3 of excess
in the body elsewhere that the short end of `main` masked.
- The area where a full-height top is higher than Revit's stays at
`main`'s 0.3363 ft2 on both walls and files; that metric counts only the
faces at the wall's full height, so it says nothing of the added end,
which is below it. The far-end tab is 0.4101 ft wide, as on `main`.
- `wall_layers_vs_ifc`, `qtos_vs_ifc` and `unfilled_openings_vs_ifc`
output is identical to `main`'s on all four models. 2058499 and 2058501
as built are what `main` writes (volume, height, plan, lowest point,
base). The IFC of each office differs from `main`'s (entity numbers and
timestamp taken out) in the bodies of the two walls that take the end,
the outlines of their profile openings and the property sets of the four
walls above, and nothing else. `decoded.parameter_value_count` equals
`main`'s (54,952 as built, 55,145 at permit): the markers are in
`RvtElementRecordGeometry`, not a `Pset_` set. The scorer's fit moves
the "taller" and "lower" areas of other walls by at most 0.0578 ft2 (54
walls as built) and 0.0188 ft2 (50 at permit), with the walls themselves
unchanged.
-
[41980285452](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41980285452)
(`-f r2025=true -f samples=true -f scorers=wall_heights_vs_ifc`, my own
run at `1b3a6bd7` against `main` at `b36477f1`): it exported and hashed
88 models (the 24 R2025 models, 58 Autodesk sample projects, Einhoven,
Core Interior and the four RE1 models), and the IFC sha256 is identical
to `main` on all 88. `wall_heights_vs_ifc` was scored on the 29 that
have a Revit IFC4 export (the 24 R2025 models, Core Interior and the
four RE1 models) and its output is identical to `main`'s on all 29; the
58 sample projects and Einhoven have no export to score against, so
their hash is the whole measurement.
-
[41980288900](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41980288900):
held-out, counts only, at `1b3a6bd7`: 25 models, identical to `main` on
all.
- The same two comparisons at `b47a9a00` before #1401 was merged,
[41978482673](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41978482673)
(88 models) and
[41978485557](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41978485557)
(25 held-out), are identical too.

-
[41982867204](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41982867204):
the final, unfiltered run, on this pull request's head `96baaafe`
against `main` at `40b86b80` (`-f base=main -f nordic=true -f r2025=true
-f holdout=true`, every default scorer): 53 models, 51 byte-identical,
all 18 held-out models among them; only the two office files differ.
`wall_heights_vs_ifc` reads as above (base and top Revit's 604 to 606 of
607 as built, 585 to 587 of 589 at permit). This run also scores the
wall ends, which the runs above did not: both ends within 0.001 ft go
from 512 to 514 of 607 as built and from 435 to 437 of 589 at permit, in
`wall_bodies_vs_ifc`, `wall_ends_cv_vs_ifc` and `wall_ends_list`, each
file one `start short` and one `end short` wall to `ok` and no wall
worse. No other scorer output moves. The MCP server's answers equal the
export: 900 consistency lines, 0 differ.

Head and merges: the measured head is `1b3a6bd7`, which merges `main`
(v0.15.0, #1400, #1412, #1416, #1401). The merge of `main` after it
(#1420, the 0.15.0 post-release docs) changes documents only: it
conflicted with this branch in `docs/contribution-map.md` alone,
resolved by keeping this branch's #1384 row and main's #1335 row (which
replaces the #1237 row), and changes no figure here. An earlier merge,
`8e0aa535`, touched three workflow files and no Rust. A final unfiltered
Measure of the pushed head `96baaafe` (`-f base=main -f nordic=true -f
r2025=true -f holdout=true`) is
[41982867204](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41982867204),
registered with the watcher and not read when this was written.

Measured limits, all in RE-337 section 5:

- Revit's end steps up and follows a wall at each height by a join order
that is not read, so the added end is a bound by the geometry the pass
reads, and "no wall is drawn above Revit's at an added end" is a
measured result on the four walls, not a derived one. The steps above
the block are not drawn; 2057668 as built goes five points under
Revit's.
- Walls 2058499 and 2058501 as built keep their ends 0.31 ft short of
Revit's: no footing covers the longer plan and their base is not cut
(before and after). A footing that covers a wall's plan in part is the
follow-up.
- Walls 2058499 and 2058501 at permit are not reached: the wall beneath
them is drawn with a stepped profile, so they stay 0.0439 ft off; the
skip is counted.
- No measured wall exercises: a stepped-top wall beneath whose lowest
underside is at or below the candidate's base (its higher pieces are not
checked against the block); two candidates at one corner; a candidate
with no base join; the `BodyEndSource` arm of `is_stepped` in
`wall_cut_openings.rs`, which only `finish_wall_ends` reaches; the
refusal reasons `base_cut_lost_on_extended_plan`,
`walls_beneath_reach_the_end_at_different_faces` and
`wall_stands_in_the_added_end`; `finish_wall_ends` (a wall with no base
cut); the Level branch of the blocks; the high end of a wall; walls
along x; an end reaching the wall's full height (and so the value
`wall_end_extended_to_base_wall`); the plane-offset term of the opening
shift. Nor does a beneath wall whose top a floor cut in steps over only
part of its plan (the block stops at the lowest underside, 180.6102 ft
for 1493966, where Revit's step at permit is 182.087 ft), a beneath wall
drawn as another kind of solid is neither reached nor refused (an
uncounted skip), and a wall standing in the added end that the pass does
not read (turned off a quarter turn, or a solid of another kind) does
not stop the block.
- A wall with one end drawn and the other kept carries `BodyEndSource`
and `BodyEndRefusal` both; `JoinTrimStart` and `JoinTrimEnd` stay the
record's once `BodyEndSource` is set (documented in
`docs/export-diagnostics.md`).
- Earlier heads are not evidence for the rule: the full prism with the
slid openings (`33529d0b`), the block to the wall beneath's top
(`1b417c45`, 2057670 over-drawn), the block stopped below walls in its
way with the pass moved after the tops (`74f5ee37`, Measure 41964576550,
which lost the permit refusals of 2058499 and 2058501 because a wall
beneath with a stepped top and a profile of its own was not read; fixed
in `0f80699b`), the rule without the join-trim condition (Measure
41944433297, which moved a Snowdon Towers soffit wall to 0.1016 m longer
than Revit's export, local only) and the rule that also drew 2058499 and
2058501 as built (Measure 41947542271, their volume 4.5 to 6.9 ft3 over
Revit's).

- [ ] `tools/check-local.sh` passes: not run locally (no local builds);
CI is the gate
- [x] Verified end to end on real Revit files: the BIM4LCA office as
built and at permit (Revit 24.0.5 IFC4 exports, CC BY-SA 4.0), against
Revit's own export, with the commands and the scorers in RE-337
- [x] IFC exporter touched: Core Interior's IFC is byte-identical to
`main`, so the witness observations do not move
- [ ] Performance change: N/A

## Audit-honesty checklist

- [x] Docs reflect the current state after this PR (support matrix,
contribution map, reconnaissance addendum, diagnostics reference and
schema, RE-336 pointer)
- [x] A changelog fragment under `changelog.d/fixed/`
- [x] A new limitation is documented here, in RE-337 section 5 and in
the `extend_wall_ends` doc comment
- [x] No emojis, private paths or personal addresses in committed files
- [x] Reverse-engineering finding: report RE-337 with the bytes, what
was tried and dropped, and reproduce commands; the probe is
`probe_1067_native_dump` (its `JoinEndGStep` and `GLine` lines)

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary source, decompiled internals or NDA
content: public byte observations and Revit's own IFC4 exports only
- [x] No new fixtures

## Breaking changes

None. Two new element-record properties on the two office walls above,
`BodyEndSource` with the new labelled value
`wall_end_to_base_wall_upper_step_omitted` (and
`wall_end_extended_to_base_wall`, which no measured wall carries) and
`EndCoverElementId`, and `BodyEndRefusal` on two more at each office
file; a new field `exported.wall_end_refusals` (default empty) and a new
decision reason `wall_end_extension_refused`; two MCP tool descriptions
list it (contract synced).

## Screenshots or output samples

RE-337 section 5.

## Related issues

Refs #1396. The done-when is met for 2057668 and 2057670 on both files
and for no other wall's length or base moving; it is not met for 2058499
and 2058501 at permit.
DrunkOnJava added a commit that referenced this pull request Nov 5, 2026
…dumps and Jev scores the diff (#1334) (#1419)

## Summary

The advisory semantic merge check of #1334. Measure diffs the two sides'
MCP dumps for each openly licensed model, and a `workflow_run` workflow
gives the diff to Jev `jev-1.13.0` beside the pull request's own `##
Summary` and `## Testing` and asks whether the export moves in a way
they do not state specifically (Griffin, 2026-11-05: a described,
intended change passes, an unexplained move fails; the main session,
2026-11-05: a move that only a general description such as "improves how
walls are exported" covers fails too). The verdict is the check run
`semantic diff (advisory)` on the commit Measure measured: not in the
ruleset, no pull request comment, and a `fail` is a red check. Only a
Measure run of every open model with a base on main writes it, it is
written on the commit Measure measured and no other, and it cannot be a
pass unless all 34 open models are compared in full and a
same-repository pull request has that commit as its head.

## Motivation

Measure is the byte-level oracle. A pull request that moves meaning
should say so, specifically, before it is armed, not only show that
bytes moved. The agent that makes a change also writes its Summary, so a
sweeping Summary must not cover a change. Refs #1334.

## Changes

- `tools/re/semantic_diff.py`: a pure function of two dumps. Elements
added, removed and changed with the value before and after; byte offsets
inside `provenance` dropped; order ignored; values compared to the
dump's six decimals; an empty object or list the same as no field;
identical changes collapsed by the whole (path, before, after) triple.
Its `measure` mode is what the compare job runs: it fails the job on a
dump in a model that is restricted or on neither list, and records in
the manifest the open models no diff covers (`OPEN_MODEL_NAMES`, 34),
each skipped model with its own reason, the groups dropped for size, and
whether the run was asked for every open model (`--requested-all`). The
measured commit and the base are the ones the compare job passes from
the plan job's resolved refs (`--head-sha`, `--base-sha`); the
`commit.txt` of a result folder is written by a shard job that runs the
measured code and is read only when none is passed.
- `tools/re/test_semantic_diff.py` and `tools/ci/test_jev_check.py`:
failure-first tests of pure helpers, run in the PII guard job. The diff:
0.35 vs 0.3500001, a reorder with moved offsets, a bulk collapse that
hides a different value, an uncovered model. The verdict logic: a model
with no dump, a diff that failed, a dropped group, an unscored chunk or
partial coverage never reads as a pass; an answer whose probabilities do
not add up is refused; a chunk of non-ASCII text is never sent over the
16,000-character cap; a head commit that is not a 40-character SHA, a
manifest with a non-string model, HTML and invisible characters in the
pull request's text, and control characters in printed text. Each was
checked to fail under the mutation it guards against.
- `.github/workflows/measure.yml`: the compare job checks out the
script, runs `measure` when there is a base, tells it whether the run
was dispatched with no `models` filter and the office and Revit 2025
models on, and uploads `semantic-diff`. The documented command is `-f
base=main -f nordic=true -f r2025=true` with no `models` filter.
- `tools/ci/jev_check.py`: merges findings across models, chunks them
(at most 8 findings, 16,000 characters as sent), reads the
same-repository pull request whose head is the measured commit through
the API, takes its `## Summary` and `## Testing` (HTML element tags and
invisible characters removed, each cut at 2,500 characters as sent, all
of it shown in the check's summary; text in angle brackets that is not
an HTML element, such as `<set>.<property>`, stays), and asks Jev blind
(labels A and B randomised per chunk; no model name, pull request
number, title or branch in the state). Per finding Jev chooses: stated
specifically / follows from a specific change they state / covered only
by a general description / unstated / only rounding, a reordering or a
spelling; "general" plus "unstated" is the finding's score, and the
probabilities must add up to 1. A finding at 0.85 or more is a fail in a
chunk rated 1.5 or more and a warn in one rated 1.0 or more. NOT
MEASURED, never a pass, for no key, no same-repository pull request
whose head is the measured commit (a fork's included, and an empty diff
does not excuse it: the lookup is first), a check asked for on a commit
other than the measured one (both commits in the title), a base that is
missing or could not be checked, a pull request with no `## Summary`
where the diff has findings, HTTP 402, a refused key, another model's
reply, a time-out, an error (named by its type), no model compared, any
open model not compared in full, a dropped group or a missing count,
sampled property sets that one of a model's dumps alone holds too often
(none held by both while either holds any, or more than a tenth of
them), or an unscored chunk. A run whose base is not main or an ancestor
of main writes no check, and names the base. The Jev call does not
follow a redirect. An empty diff passes without a call and needs no
Summary, but only on a complete run.
- `.github/workflows/semantic-check.yml`: `workflow_run` on Measure
(environment `jev`, main only), `workflow_dispatch` with a run id, and a
keyless run on a pull request that changes the check. It scores only a
Measure run whose event is `workflow_dispatch` and whose head repository
is this repository, from `measure.yml` at that path; any other run posts
nothing, with a notice. It writes the check on the commit the artifact
names as measured, not on a pull request's live head. actionlint reports
nothing on it and zizmor 1.32.0 reports nothing on it, `measure.yml` and
`ci.yml` (the one `dangerous-triggers` finding, on `workflow_run`, is
ignored inline with its reason).
- `docs/maintaining.md` (where to find the verdict: it is on the
measured commit, not necessarily the head, which the pull request page
does not show, so look it up with `gh api
repos/<repo>/commits/<sha>/check-runs?check_name=...`; a later commit
does not clear a fail, only a new score of the same pull request does; a
filtered Measure run writes no verdict, so a pull request that changes
output needs its final unfiltered run; the Summary must state each
change specifically: which classes, which property or geometry, how many
where measured; a fail is fixed by changing the code or by stating the
change in the Summary; a warn is answered in the body; the complete
command; what a pass means: the dumps agree, not that the exports are
identical, since the dump samples five elements per entity; what is
sent, including element names and values that can hold an ElementId), a
changelog fragment.

## Testing

No local build (the lane runs no cargo); the tests above are the
pure-helper exception and run in CI's PII guard job. End to end on real
dumps:

- [x] N/A for `tools/check-local.sh`: no Rust changed.
- [x] Verified end to end on real Measure runs: see "Output samples".
The keyed path (main's `workflow_run` job with the secret) is not yet
exercised.

## Audit-honesty checklist

- The keyed path cannot run before the workflow is on main:
`environment: jev` takes only main, and a `workflow_run` workflow runs
from the default branch. After the merge: `gh workflow run
semantic-check.yml --ref main -f run_id=<a complete Measure run with a
base>`.
- The keyless path is exercised by this pull request's own run of the
workflow, and it can only say NOT MEASURED: it writes on the pull
request's head, which is never the commit Measure measured. At c36b71f
(before the delta review) it did so with the wrong reason: Measure run
41987903774 (dispatched from this branch for #1425's head c8e55f5
against main 182ed21, `-f nordic=true -f r2025=true -f
scorers=mcp_answers_vs_ifc`, no `models` filter) compared all 34 open
models (0 skipped, 0 uncovered, `requested_all` true; findings only in
the two office files, 7 each), and this workflow's run 41987854258
(attempt 2) wrote check run 127117767677 on c36b71f through
`GITHUB_TOKEN` saying only "no Jev key", a check on a commit Measure had
not measured. At b4d1932 such a check says "this check is for <the
head>, but Measure measured <the other commit>" in its title (local
scenario below; the CI proof is Measure run 41993282068 on #1425's head
722244e against main a4044dc, and this workflow's pull-request run
after it: not yet measured on this head). Measure's own pull-request run
41987854320 covered 6 of 34 models and its compare step says "the
semantic check writes no check run (this run was not asked for every
open model)", the filtered path in a real run. An earlier pass of the
keyless path (run 41966963563, attempt 2, on fd90cdc: no semantic
difference in 6 models) predates the coverage rule and the commit check.
- A pass means the dumps agree, not that the exports are identical: the
dump samples five elements per entity, and a mesh vertex or a profile
point is not in it.
- The thresholds and the wording of the per-finding question were set on
the in-sample cases below, so those cases are in-sample for them. The
held-out round is the second table. Jev's answers move by about 0.02
between two calls with the same request (#1412's own Summary passes at
0.84 and fails at 0.86 on byte-identical requests, against a gate of
0.85), so a verdict within 0.05 of the gate is not stable.
- B3 (a fork's run) and the redirect behaviour are tested by reading the
code and the unit helpers, not by a fork's run: no fork pull request was
opened.

## Breaking changes

None.

## Output samples

Everything below was scored with `tools/ci/jev_check.py` and
`tools/re/semantic_diff.py` as committed at 49d5378, and the
delta-review block below as committed at b4d1932 (which changes who may
write a check, the gaps, and the stripping of HTML and invisible
characters in the pull request's text; no prompt, threshold or
chunking), and the key from the Keychain on this Mac, from the
`semantic-diff` and `measure-*` artifacts of the Measure runs named.
Nothing was scored with a threshold or a prompt other than the committed
ones.

**Ground truth is `ifc.sha256` per model**, not a pull request's title.
Of 13 pull requests in the in-sample set (Core Interior, Einhoven, RE1
and the Revit 2025 models in every run; 34 models with the BIM4LCA
office where `nordic` was on, 30 for #1402 and #1403 and 6 for #1398),
the IFC differs on the two office files for #1388, #1400, #1401 and
#1405 and on no model measured for the other nine. The semantic diff has
findings on exactly those two models in each of those four runs, and
none on any model whose IFC is identical, except the dump-only changes
of #1373, #1379 and #1412. The documented command (no `models` filter)
is what finds them: the earlier documented command, which filtered to
Core Interior, Einhoven and RE1, reads "pass" on all four.

**In-sample: the 7 pull requests whose diff is not empty** (runs
41972569847 #1388, 41972650013 #1400, 41972664107 #1401, 41972583508
#1405, 41972597118 #1373, 41972610208 #1379, 41972636527 #1412; each 34
models). "Own" is the pull request's real Summary and Testing.
"Sweeping" is a one-line Summary that names an area and no kind of
change ("Improves how walls and floors are exported." for #1388,
"Improves how openings are written in the export." #1400, "Improves how
walls are drawn in the export." #1401, "Improves how floors and walls
are exported." #1405, "Improves how rooms, profiles and pipes are
exported." #1373, "Improves how roofs are exported." #1379, "Improves
the MCP server's answers." #1412), alone and beside the pull request's
real Testing. "Wrong" is another pull request's full body: #1329 (a
memory change that states the output does not change) and one other. The
number in parentheses is the highest probability that Jev gave a finding
as not stated specifically.

| Pull request | Findings | Own | Sweeping alone | Sweeping + its
Testing | Wrong: #1329 | Wrong: other |
| --- | --- | --- | --- | --- | --- | --- |
| #1388 | 7 | pass (0.31) | fail (0.99) | pass (0.74) | fail (0.99) |
#1412: fail (0.95) |
| #1400 | 14 | **fail (0.94)** | fail (0.99) | fail (0.98) | fail (0.98)
| #1373: fail (1.00) |
| #1401 | 12 | pass (0.63) | fail (1.00) | pass (0.77) | fail (0.96) |
#1379: fail (1.00) |
| #1405 | 2 | pass (0.51) | warn (0.99) | warn (0.90) | warn (0.96) |
#1379: **pass (0.78)** |
| #1373 | 88 | pass (0.63) | fail (1.00) | fail (0.99) | warn (0.97) |
#1400: fail (1.00) |
| #1379 | 94 | pass (0.24) | fail (0.99) | warn (0.90) | fail (0.96) |
#1401: fail (1.00) |
| #1412 | 23 | pass (0.84) | fail (1.00) | fail (0.89) | fail (0.99) |
#1388: fail (1.00) |

- **No sweeping Summary alone passes (0 of 7): 6 fail, 1 warns.** Beside
the pull request's own Testing two pass (#1388 and #1401), because their
Testing states the figures: that is the rule working, since a measured
figure in Testing counts as stated.
- **False positives: 1 of 22 expected passes, a fail.** The 22 are the 7
own Summaries, 6 jitter controls, 6 reordered controls and 3 empty-diff
pull requests on complete runs (#1329, #1377, #1382: no finding on any
model, IFC identical, each a pass without a call to Jev). #1402 and
#1403 ran without the office, so under the new rule they write no check
and are not counted. #1400 is a diff of 14 counters of the diagnostics,
and the figure its Summary and Testing leave unstated is
`parameter_value_count` +188 (office as built) and +174 (permit); its
Motivation, which Jev is not given, gives 182. #1412's own Summary sits
at the gate: the same request scored 0.84 (pass) at 4e81a95, 0.86
(fail) in one rescoring on this head's code and 0.84 (pass) in the table
above, so it is a verdict the gate cannot hold; it could as well be
counted a second false positive.
- **False negatives: 1 of 21 expected non-passes** (7 sweeping alone, 7
with #1329's body, 7 with another's): #1405's whole diff is
`total_entities` +8 on each office file, which a roofs Summary does not
state (0.78, below the gate).
- **Controls, complete** (all 34 models on both sides, one model
changed; built from the dumps of run 41972569847): six jitter controls
pass, a move of 1e-6 in every measurement of the sampled elements, the
rooms' areas and the levels' elevations in Core Interior, RE1
architecture and mechanical, Einhoven, the office as built and a Revit
2025 model, scored beside #1329's body: highest probability 0.73 to
0.79, highest chunk rating 0.6 to 0.7, below the 1.0 rating gate; 412
findings in 65 chunks on the office. Six reordered controls (every row,
set and room in another order, every byte offset shifted) are empty
diffs.
- **Coverage, on #1401's stored diff** (run 41972664107, own Summary),
changing only the manifest: complete, **pass**; one model with no dump
on the head side, **NOT MEASURED** naming it; one model whose diff
failed, **NOT MEASURED** with that reason; a dropped group, **NOT
MEASURED**; the same missing model with a run not asked for every open
model, **no check run**; a manifest with a non-string model, an error
and no check run.
- **Unchanged by the review fixes:** 34 of 35 verdicts of the in-sample
matrix are as scored at 4e81a95 (the one that moved is #1373 with
#1329's body, fail to warn; both are non-passes), and #1401 and #1405
(the two the review asked for, runs 41972664107 and 41972583508) are
unchanged in all five bodies. 18 of the 35 requests are byte-identical
to the earlier scoring; the other 17 carry a Summary or Testing that is
now cut by its length as sent (a newline or a quote in the text counts
two, so a section over the cap is cut about 20 characters earlier),
which is the review's cap fix and not a change of method.

**Delta review (b4d1932).** Run on stored complete runs, with the key
from the Keychain and real GitHub lookups, nothing posted:

- Run 41972569847 (#1388's merge commit, base 240c7d7): the pull
request is found through the API from the measured commit, the base is
on main, Jev is asked with #1388's real Summary and Testing: **pass (7
findings in 34 models)**, as before. Run 41972583508 (#1405's merge
commit): **pass (2 findings)**, as before. Run 41972664107 (#1401's head
2a35ede, which has since moved): NOT MEASURED, "no pull request of this
repository has this commit as its head", the head-moved case in a real
run; scored offline with #1401's real body the verdict is **pass**, and
all five of its bodies give the verdicts of the table above (pass, fail,
pass, fail, fail). #1388's five bodies and #1405's five are the same
verdicts as the table, except #1405 with #1329's body, warn to fail (a
non-pass either way, at a rating of 1.5).
- Run 41987903774 (PR #1425's head c8e55f5 when measured): its head has
since moved to 722244e, so the real-lookup scenario reads NOT MEASURED,
"no pull request ... has this commit as its head". Asked to write on
another commit (c36b71f), the same run reads NOT MEASURED with "this
check is for c36b71f, but Measure measured c8e55f5". An empty diff
on a merged pull request's commit (run 41980023307, #1358) is a pass;
the same empty diff with a commit no pull request has is NOT MEASURED; a
base that is the pull request's own head writes no check and names the
base.
- **Property sets held by one dump only** (`details_one_side`) are a gap
per model only when none is held by both while either holds any, or when
more than a tenth of all of them are held by one dump only (exactly a
tenth is not a gap; main session, 2026-11-05). The dump samples the five
lowest ElementIds of each entity, so a change that adds or removes
elements of an entity moves the sample and a few are held by one dump
only: that is not a defect, and the literal rule (any non-zero count)
would have turned #1412's pass into NOT MEASURED. The defect it guards
against is a head that lost its details. The check's summary says how
many are held by one dump only, gap or not. On run 41972636527 (#1412, 1
of 115 sampled elements held by one dump only in each office file, no
gap), scored offline with #1412's body three times: pass (0.84), fail
(0.85), pass (0.83), all with no gap and the same chunk (a finding at
the 0.85 gate, in a chunk rated 3.6), so its own Summary is a pass
again, at the gate, and not a stable one. No other stored complete run
has a non-zero count.

**Held-out, thresholds and wording unchanged since they were set
above.** Ten merged pull requests that were not used to set them, run
with the same 34 models (`nordic` and `r2025` on):

- #1337, #1352, #1356, #1372, #1341 and #1344 (Measure runs 41973688732,
41973701739, 41973714367, 41973727101, 41973740400, 41973754042): the
IFC is identical on all 34 models and the dumps agree, so each has an
empty diff and passes without a call to Jev, with its own Summary, a
sweeping one, #1329's or another's alike. **They test the empty-diff
path and nothing else**: none of their changes lands on an open model.
- #1350, #1358, #1364 and #1370 (provenance and diagnostics additions;
the IFC is identical on all 34 models in each, so these are dump-only
changes), Measure runs 41980008692, 41980023307, 41980037727 and
41980053223, scored with the same four bodies per pull request (own
Summary and Testing, a sweeping one-liner written before the runs
finished, that line beside the real Testing, #1329's body, and another
pull request's body). Scored first with `jev_check.py` as it was at
4e81a95 and again with the code of this head; nothing was changed after
seeing a result, and the 20 verdicts are the same in both.

| Pull request (run) | Findings | Own | Sweeping alone | Sweeping + its
Testing | Wrong: #1329 | Wrong: other |
| --- | --- | --- | --- | --- | --- | --- |
| #1350 (41980008692) | 1034 in 142 chunks | **warn** (0.86, one chunk,
rated 1.13) | fail (1.00) | fail (0.88) | fail (0.99) | #1358: **pass
(0.84)** |
| #1358 (41980023307) | 0 | pass, empty diff | pass, empty diff | pass,
empty diff | pass, empty diff | pass, empty diff |
| #1364 (41980037727) | 159 in 37 chunks | pass (0.14) | fail (1.00) |
pass (0.60) | fail (0.97) | #1370: fail (0.92) |
| #1370 (41980053223) | 98 in 16 chunks | **warn** (0.90, one chunk,
rated 1.33) | fail (1.00) | fail (0.95) | fail (0.97) | #1350: **pass
(0.21)** |

The sweeping lines were "Improves what the export records about
elements." (#1350), "Improves the diagnostics of the export." (#1358),
"Improves what the export records about bodies." (#1364) and "Improves
what the export records about profiles and stairs." (#1370).

- **The held-out result is weaker than the in-sample one.** Real
Summaries: 1 of 3 non-empty pull requests passes, 2 warn and none fail.
Sweeping alone: 0 of 3 pass (all fail). #1329's body: 0 of 3 pass.
Another pull request's body: 2 of 3 pass. With the empty diff counted,
false positives are 2 warns (no fail) of 4 expected passes, and false
negatives 2 of 9 expected non-passes.
- **Why the two warns.** #1350 added fields to the dump's `summary.file`
block (`layout_release`, `omitted_entries`, `partition_count`), which
its Summary and Testing do not name: one chunk of 0.86 at a rating of
1.13, where a warn needs 0.85 and 1.0. #1370's warn is one chunk of
`value_sources` parts of Core Interior's shading devices at 0.90, rated
1.33; a fail needs 1.5. Both are near their gates.
- **The two cross-body passes are neighbours, not strangers.** #1350
(the provenance of every decoded element), #1358 (why an element was
left out) and #1370 (value sources for profiles, stair runs and
landings) all add provenance and diagnostics, so another's Summary
covers part of the diff. They are counted as false negatives as defined.
- **Run-to-run movement.** Jev's answers move by about 0.02 between two
calls with the same request, and by more in the maximum of very many
findings: with #1358's body on #1350 (1,034 findings) the highest scored
0.83, 0.97 and 0.84 in three scorings, only the middle one on a
different grouping of the chunks (since reverted: a chunk is packed at
full context). A verdict near a gate (0.85) is not stable.
- **What it says about the thresholds.** On provenance and diagnostics
additions Jev's probabilities for a change the pull request states sit
near 0.9 where in-sample they sat at 0.2 to 0.8, so the 0.85 gate is
close to the edge for real Summaries. A recalibration follow-up is
warranted.

#1314, #1316 and #1328 cannot be calibrated: their parents predate the
server crate (71c0677), so Measure builds no `rvt-rs-mcp` there.

## Related issues

Refs #1334
DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
…iblings() made every importer read dirname since #1400

siblings() moved into tools/re/ifc_common.py on 2026-11-05 (#1400) and uses os.path.split and os.listdir. The cache allowed ifc_common to list a directory (the mesh cache) but not to split a path, so every scorer that imports ifc_common was refused as reading dirname: on a warm run in which every lookup it made hit (42992706693), about 8,200 s of scorer time per side still ran, saved_meshes_vs_ifc alone 1,585 s. The split is allowed there now, a closure that calls siblings() is refused unless EXTRA_INPUTS hashes the files it lists, and psets_vs_ifc declares them as unfilled_openings_vs_ifc does (whose declaration had stopped finding the function). 102 of tools/re's scorers keyed before, 158 do now.
DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
… the side it restores, ifc_common's siblings()), a run that names no scorers skips the samples' schema checks, and the shards never cached are cut finer (#1704)

## Summary

An unfiltered Measure took 28.9 minutes and the score cache missed all
4,548 of its lookups. This makes the cache hit again and cuts the time a
run spends on what it caches: with the same refs and flags, a run whose
cache is warm takes 10.2 minutes (25.6 cold under the old key, 28.9 for
the last unfiltered run), 3,996 of its 3,996 cacheable lookups on the
side that ran hit, and every result file equals the cold run's. Four
things kept the cache from hitting, and a fifth made a probe run pay for
checks it did not ask for.

## Motivation

Griffin asked where Measure's time goes. From the job and step logs of
ten runs of today and the per-model `timings.log` of
[42980660819](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42980660819)
(28.9 min): a run is its longest shard (the builds take 3.3 min, 26
shards start within a minute of each other, Compare takes 30 s), every
shard is CPU-bound (88 to 98% busy on the 4-vCPU runner), and the work
is the score cache's. What kept it from skipping that work, found one at
a time as each proof run was read:

1. **The key hashed shell scripts.** `measure-cache.py` put every
non-Python file of `tools/re` and `tools/ci` in every key, and 25 of the
last 153 commits of `main` (72 hours) changed one
(`scrub-holdout-results.sh` 14 times, `measure-reference-models.sh` 8),
each resetting every entry.
2. **A run that pins its commits saved nothing.** The cache was saved
only by a run dispatched from `main` whose `base` was empty or `main`;
every comparison pins SHAs.
3. **Both sides restored whichever side saved last.** Head and base
export different files wherever the change reaches, so an entry of the
other side hits only for the models both write alike: a second run read
8% of its lookups as misses for that reason alone (91.7% and 89.9% hits,
run 42990521699).
4. **`ifc_common` made every body scorer uncacheable.** #1400 moved
`siblings()` into `tools/re/ifc_common.py` on 2026-11-05. It splits a
path and lists a directory; the cache allowed `ifc_common` the listing
(for the mesh cache) but not the split, so every scorer that imports it
was refused as `reads dirname`: on a warm run in which every lookup hit,
8,244 s of scorer time per side still ran (`saved_meshes_vs_ifc` 1,585
s, `box_bodies_vs_ifc` 795, `wall_bodies_vs_ifc` 704, 20 more). 102 of
the 207 Python files in `tools/re` could be keyed.
5. **A probe run, or `scorers=none`, still ran every sample's schema
checks.** `measure_sample` called `schema` unconditionally, 170 to 220 s
of IfcOpenShell's EXPRESS rules on a large MEP sample:
`samples-2024-2099` took 1,223 s in a run that asked for no scorer.

Rows were registered on this PR before each run:
#1704 (comment),
#1704 (comment),
#1704 (comment)
and
#1704 (comment),
and the results are read against them in the comments after each.

## Changes

- `tools/ci/measure-cache.py`: the key no longer hashes shell scripts
(1); `ifc_common` may split a path, and a closure that calls
`siblings()` is refused unless `EXTRA_INPUTS` hashes the files it lists,
which `psets_vs_ifc` and `unfilled_openings_vs_ifc` now do (their
declaration finds the function in the closure) (4). 158 of the 207 files
in `tools/re` key, from 102.
- `.github/workflows/measure.yml`: the plan job asks the compare API
whether the head and the base are on `main`'s history (`head_on_main`,
`base_on_main`), and a side whose commit is on it saves the score cache
(2); a side restores the newest entry of its own side first, then the
other side's, then `main`'s in the same order (3); the held-out shards
are cut in three (offices, `rvt-holdout-[0-9]*`, the rest) and `racadv`
in three, as they are never cached.
- `tools/ci/measure-reference-models.sh`: a sample's schema checks run
when the run's scorers include `schema` (5), as a reference model's do.
- `docs/maintaining.md`: the key, where the cache is saved and restored,
and the siblings rule.

## Testing

Measured on the Measure runner (workflow and CI scripts only; no local
build). Same refs and flags throughout (`ref` 1641128, `base` 5f928b4,
every flag), each pair with a cache name of its own
(`score_cache=warm1`, `warm2`) so a pair is not helped by another:

| run | what | wall | lookups per side | hits |
|---|---|---:|---:|---:|
|
[42980660819](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42980660819)
| the last unfiltered run, `main`'s workflow | 28.9 min | 2,274 | 0 |
|
[42986562320](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42986562320)
| cold, fixes 1 and 2 | 25.6 min | 2,274 | 0 |
|
[42990521699](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42990521699)
| warm, before fix 3 | 12.0 min | 2,274 | 2,086 and 2,044 |
|
[42992706693](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42992706693)
| warm, fix 3 | 10.7 min | 2,274 | 2,274 (100%) |
|
[42995189344](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42995189344)
| cold under fix 4 | 19.6 min | 3,996 | 0 |
|
[42997978043](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42997978043)
| warm, fix 4 (head side; the base side reused the cold run's saved
results) | 10.2 min | 3,996 | 3,996 (100%) |

- Replay is exact: all 5,810 result files of the third run equal the
cold run's, none differs and none is missing; the 2,905 result files of
the second pair's warm head side, among them the scorers fix 4 made
cacheable (`saved_meshes_vs_ifc`, `box_bodies_vs_ifc`,
`wall_bodies_vs_ifc`, `mesh_bodies_vs_ifc`, `door_bodies_vs_ifc`,
`layer_sets_vs_ifc`), equal the cold run's, none differs.
- Fix 5,
[42990655084](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42990655084)
(head only, `samples=true`, `scorers=none`): `samples-2024-2099`'s
Measure step takes 116 s (1,223 s), `samples-2008-2023`'s 46 s (258 s),
`ifc.sha256` equal to the reference run's on 58 of 58 samples, no
`schema.txt` on any.
- A sibling export edited on dummy files moves the keys of
`psets_vs_ifc` and `unfilled_openings_vs_ifc` and no other (checked with
`make_key`).
- [ ] `tools/check-local.sh`: workflow and CI script only; the PR's own
CI runs `env config lint`
- [x] The unfiltered run of this PR's head against `main`:
[43000996895](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43000996895)
(head `ab86d603` against its merge base `16411282`, every flag,
`score_cache=warm2`): its `same-project gates` verdict and the scorer
diff are read on the PR

## Audit-honesty checklist

- [x] The docs say what ships (`docs/maintaining.md`)
- [x] Limitations stated: the steps that read a directory of their own
(the probe-path scorers, `space_profiles_vs_ifc`) stay uncached, and so
do `rvt-gltf` and `mcp_answers_vs_ifc`; the held-out models, BIMcollab,
`spent-*` and `racadv-*` are never cached by design
- [x] No emojis, no private paths
- [x] No user-visible change

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk proprietary source or NDA'd SDK content

## Breaking changes

None. The first run after this lands starts a cold cache (the key's
helper hash changes).

## Related issues

Refs #1694 (the wall-time work it began with). #1400 is where
`siblings()` moved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ifc Work in the ifc area. type:feature New product or library capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant