Skip to content

fix(ifc): carry the element translation once, and follow the witness on PredefinedType - #236

Merged
DrunkOnJava merged 1 commit into
mainfrom
fix/placement-composition-and-predefined-types
Aug 30, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
fix/placement-composition-and-predefined-types

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Aug 30, 2026 •

Copy link
Copy Markdown
Owner

Two conformance fixes to the IFC4 writer, both measured against Revit's own export of the same project. Corpus: .rvt sha256 c805df445d613b408e37337765572021265e3f5dfdc7d1fa53b22ba1600b8014, slim IFC sha256 bfdf36ffb0bb768f3409d818403990e64d4c262c6780603be87f8077387ad86d.

#232 — every element was placed twice

The writer emitted the element's own IfcAxis2Placement3D in both the IfcLocalPlacement's RelativePlacement and the swept solid's Position. IFC4 has a conforming consumer compose ObjectPlacement × Position, so the element translation was applied twice. Viewers that ignore Position drew the file correctly, which is exactly why it shipped on every release: two tools could disagree about the same bytes with neither of them misreading.

The Position decision, and the export's evidence

Read with IfcOpenShell 0.8.5 on 2024_Core_Interior_slim.ifc, Revit's own exporter is consistent about one thing — the element translation appears exactly once — and splits it two different ways depending on the frame the profile is authored in:

Revit entity ObjectPlacement.RelativePlacement.Location IfcExtrudedAreaSolid.Position.Location
IfcWall #2240 (SweptSolid body) (48.0, 57.667, 0.0) (0.0, 0.0, 0.0) — identity
IfcSlab #1590 (0.0, 0.0, 0.0) — identity (90.444, 71.185, -0.167)
IfcSlab #1619 (0.0, 0.0, 0.0) — identity (93.5, 69.5, 0.0)
IfcSpace #186 (0.0, 0.0, 0.0) — identity (51.694, 69.556, 0.0)

Never both. Revit's walls put the location in the placement and leave Position at identity because the wall profile is authored in the element-local frame; its slabs and spaces do the mirror image because those profiles are authored in storey coordinates.

rvt-rs authors every profile in the element-local frame — the rectangle always did, and the plan profile recovered in #231 uses the same frame — and it already carries the location on the element's own IfcLocalPlacement. So the correct half of Revit's own convention is the IfcWall row: Position becomes the project-level identity placement, and the placement carries the translation once. That is what this PR does. No entity is added or removed — the per-element axis is still emitted, the solid just stops pointing at it.

The representation-map path is deliberately left alone, with a comment saying why: a mapped item resolves as MappingTarget × MappingOrigin⁻¹ × geometry, so a Position equal to the MappingOrigin cancels against the inverse instead of compounding, and origin_feet is [0,0,0] on every map rvt-rs builds today anyway.

World-coordinate verification

IfcOpenShell geometry iterator, use-world-coords, matched by Tag against the Revit export, deltas in feet.

BEFORE

Class shared Tags max centroid delta max min-vertex delta Tags within 1e-3 ft
IfcColumn 256 166.0000 ft 166.0000 ft 0/256
IfcSlab 80 185.3333 ft 185.3333 ft 0/80
IfcWall 360 170.2500 ft 166.2500 ft 0/360
IfcDoor 132 166.0748 ft 166.0000 ft 0/132
IfcWindow 6 157.1805 ft 155.7300 ft 0/6
Class Tag rvt-rs world centroid (ft) Revit world centroid (ft) delta (ft)
IfcColumn 20375 (48.0000, 220.0000, 159.1667) (23.8750, 110.0000, 81.5833) (24.1250, 110.0000, 77.5833)
IfcColumn 20376 (98.0000, 220.0000, 159.1667) (49.1250, 110.0000, 81.5833) (48.8750, 110.0000, 77.5833)
IfcSlab 20311 (181.3000, 139.0000, 151.7500) (88.3000, 69.5000, 75.9167) (93.0000, 69.5000, 75.8333)
IfcSlab 20345 (187.0000, 139.0000, 151.7500) (93.5000, 69.5000, 75.9167) (93.5000, 69.5000, 75.8333)
IfcWall 20796 (122.7500, 162.0000, 159.5000) (60.1042, 81.0000, 81.7500) (62.6458, 81.0000, 77.7500)
IfcWall 20797 (96.0000, 138.7500, 159.5000) (48.0000, 69.1667, 83.5000) (48.0000, 69.5833, 76.0000)
IfcDoor 20810 (194.0874, 118.9189, 156.1247) (97.0437, 58.0499, 80.0499) (97.0437, 60.8689, 76.0748)
IfcWindow 20898 (65.4902, 172.2757, 165.9056) (30.8441, 86.1378, 83.7251) (34.6460, 86.1378, 82.1805)

The doubling reads straight off the table: the rvt-rs value is 2× Revit's wherever the element's own frame is the whole story — slab 20345 at (187.0, 139.0) against (93.5, 69.5), column 20375 at 220.0 against 110.0.

AFTER

Class shared Tags max centroid delta max min-vertex delta Tags within 1e-3 ft
IfcColumn 256 1.5833 ft 0.3333 ft 107/256
IfcSlab 80 0.2083 ft 0.0000 ft 79/80
IfcWall 360 2.5336 ft 0.7500 ft 78/360
IfcDoor 132 1.5095 ft 3.0022 ft 0/132
IfcWindow 6 1.9010 ft 0.8012 ft 0/6
Class Tag rvt-rs world centroid (ft) Revit world centroid (ft) delta (ft)
IfcColumn 20375 (24.0000, 110.0000, 83.1667) (23.8750, 110.0000, 81.5833) (0.1250, -0.0000, 1.5833)
IfcColumn 20376 (49.0000, 110.0000, 83.1667) (49.1250, 110.0000, 81.5833) (-0.1250, 0.0000, 1.5833)
IfcSlab 20311 (88.3000, 69.5000, 75.9167) (88.3000, 69.5000, 75.9167) (-0.0000, 0.0000, 0.0000)
IfcSlab 20345 (93.5000, 69.5000, 75.9167) (93.5000, 69.5000, 75.9167) (-0.0000, 0.0000, 0.0000)
IfcWall 20796 (60.1875, 81.0000, 81.8123) (60.1042, 81.0000, 81.7500) (0.0833, 0.0000, 0.0623)
IfcWall 20797 (48.0000, 69.3750, 83.5000) (48.0000, 69.1667, 83.5000) (0.0000, 0.2083, 0.0000)
IfcDoor 20810 (97.0437, 59.4594, 80.1247) (97.0437, 58.0499, 80.0499) (-0.0000, 1.4095, 0.0748)
IfcWindow 20898 (32.7451, 86.1378, 85.1756) (30.8441, 86.1378, 83.7251) (1.9010, -0.0000, 1.4505)

All 80 slabs now agree with Revit's export on every world-space vertex to 0.0000 ft. That is the class where rvt-rs recovers a real plan profile (#231), so it is the class where a placement fix can be checked at full precision, and it is exact.

The residuals that remain elsewhere are geometry recovery fidelity, not placement composition, and each is an existing tracked gap: columns sit 0.125 ft off in plan and 1.58 ft off in Z (insertion point and base elevation), walls up to 2.53 ft on location-curve-derived bodies, and doors and windows carry the record's bounding-box envelope rather than a panel (#86, #82). None of them scales with the element's distance from the origin any more, which is the signature the doubling had.

The gate

tools/ci/ifc_schema_arity.py closes the class two ways, both fail-closed:

  1. Structural invariant, every file, every product — a swept solid's Position may not be the very IfcAxis2Placement3D instance its product's IfcLocalPlacement already uses as RelativePlacement. Run against the pre-fix export it produces 992 findings, first one: #216 IfcColumn reuses #207 as both its ObjectPlacement's RelativePlacement and its IfcExtrudedAreaSolid.Position.
  2. Pinned composition — for five elements the gate computes ObjectPlacement × Position × first-profile-point explicitly (ifcopenshell.util.placement, no geometry kernel) and compares against a pinned coordinate at 1e-6. Two are in synthetic-project.ifc, one in synthetic-structural.ifc and two are the recorded artifact's column 20375 and slab 20345, so the probe fires in the fixture-only CI step and on the real export. A file that does not hold the Tag skips the probe rather than failing.

#220 — PredefinedType follows the authoring witness

The issue's suggested rule is adopted: where a recorded edge shows the witness's choice, take it. Agreement with the export is what the OctetProof verdicts score, and a value the witness demonstrably wrote is a recorded observation, not an invention.

Per-type agreement, measured with IfcOpenShell

Entity Revit's export writes rvt-rs before rvt-rs after rvt-rs count agreement
IfcWall .NOTDEFINED. ×360 .STANDARD. .NOTDEFINED. 360 360/360 exact
IfcSpace .SPACE. ×116 .INTERNAL. .SPACE. 18 18/18 exact (recall gap tracked separately)
IfcDoor .DOOR. ×132 $ .DOOR. 132 132/132 exact
IfcWindow .WINDOW. ×6 $ .WINDOW. 6 6/6 exact
IfcColumn .COLUMN. ×256 .COLUMN. .COLUMN. 256 256/256 exact (unchanged)
IfcSlab .FLOOR. ×78, .ROOF. ×2 .FLOOR. .FLOOR. 80 inside the witness's value set (unchanged)
IfcShadingDevice .NOTDEFINED. ×20 $ $ 20 not changed — see #235

Area, Space and GenericModel keep $: no recorded edge shows what the witness does with those Revit classes, and inventing a value is the thing this table exists to avoid. IfcSlab keeps .FLOOR. for all 80 because splitting floors from roofs is a per-element decode, not a mapping default; the gate accepts {FLOOR, ROOF} for that type.

IfcShadingDevice is the one row the witness rule reaches that this PR does not change — category_map.rs carries an explicit prior decision for it ("$, not an invented .NOTDEFINED."), and flipping a written-down decision deserves its own verdict rather than riding along here. Filed as #235.

No new observation surface class

PredefinedType is an attribute value; the observation payload counts entity type names plus relations and storeys. Both changes are therefore invisible to the observation hash, which was confirmed rather than assumed — see below. So instead of widening the surface, the agreement check went into the arity gate as --witness-agreement, run on the recorded artifact in CI:

PredefinedType agrees with the witness: IfcColumn.COLUMN=256, IfcDoor.DOOR=132,
  IfcSlab.FLOOR=80, IfcSpace.SPACE=18, IfcWall.NOTDEFINED=360, IfcWindow.WINDOW=6

IfcDoor and IfcWindow also joined PREDEFINED_TYPE_REQUIRED, since every category_map row for them now supplies a value.

Observations did not move

Regenerated all three witnesses on both recorded edges and diffed against the committed files:

Edge rvt-rs ifcopenshell ifc-lite verdict
magnetar-2024-core-interior byte-identical byte-identical byte-identical PASS, 6 fields, 0 diffs, replay match ×3
magnetar-2024-core-interior-slim byte-identical byte-identical byte-identical PASS, 13 fields, 0 diffs, replay match ×3

Nothing under research/witness/ was regenerated, because nothing moved. Entity counts, relations and storeys are unchanged.

Fixtures

Both committed fixture IFCs are regenerated with their test pins, since the writer change alters them:

  • synthetic-project.ifc — 7 IFCEXTRUDEDAREASOLID rows repoint from the element axis to #14 (the project identity placement), 4 IFCWALL move to .NOTDEFINED., the door and two windows gain .DOOR. / .WINDOW..
  • synthetic-structural.ifc — 4 IFCEXTRUDEDAREASOLID rows repoint to #14. Its predefined_type values are hardcoded in the test model, not looked up, so they are untouched.

synthetic-project.ifc also picks up a change it should have carried since #222: it was last dumped at f4b88df (#217), before 08f7858 gave IfcOpeningElement the Tag of the element that fills it, so its one opening still wrote $ there. Fixtures only regenerate behind DUMP_IFC=1, which is how it drifted a commit behind the writer with no test noticing.

Two Rust tests moved with the mappings: lookup_known_class now expects .NOTDEFINED., and door_and_window_have_no_predefined_type_by_default — which asserted the old decision — is rewritten as door_and_window_follow_the_witness_predefined_type, with a comment recording why the old reading (type variance belongs on IfcDoorType) is defensible and still wrong here: Revit populates both. A new witness_following_predefined_types covers all five changed rows.

Verification run

Gate Result
cargo fmt --all clean
cargo clippy --all-targets -- -D warnings clean
cargo +1.85.0 check --all-targets clean
cargo test --profile ci × 6 named targets, corpus set 16 passed, 0 failed
Tier-two decoder gates (#209), 7 targets, corpus set 40 passed, 0 failed
cargo test --profile ci --workspace --all-targets, corpus set 152 result blocks, 0 failed
tools/ci/ifc_schema_arity.py --witness-agreement on a fresh export pass — 20105 instances, 992 solids, 2 pinned probes matched
Same gate on the pre-fix export fails, 992 composition findings
tools/ci/validate-real-ifc.py (Einhoven) pass
tools/check-local.sh --ifcopenshell all requested gates passed
OctetProof verdicts, both edges, --compare-committed PASS, replay match on all six observations

Follow-ups

Closes #232
Closes #220

https://claude.ai/code/session_01BaHKf1Rw5aJBGK5y3xmx7C


Note

Medium Risk
Changes core IFC geometry placement and attribute emission for all extruded products; mitigated by new fail-closed CI gates and unchanged OctetProof observation hashes per the PR description.

Overview
Fixes two IFC4 writer conformance issues measured against Revit's export of the 2024 Core Interior project.

Placement (#232). Swept solids no longer reuse the element's IfcAxis2Placement3D as both IfcLocalPlacement.RelativePlacement and IfcExtrudedAreaSolid.Position. Translation lives only on the local placement; solid Position is the project identity frame so ObjectPlacement × Position is not applied twice. The same rule applies to extrusions, openings, and the generic emit_solid_shape path (mapped-item geometry is documented as a separate composition case).

PredefinedType (#220). category_map now emits witness-aligned values where a recorded edge exists: walls .NOTDEFINED., rooms .SPACE., doors .DOOR., windows .WINDOW. (replacing .STANDARD., .INTERNAL., and $). Tests and docs/compatibility tables are updated accordingly.

CI and gates. tools/ci/ifc_schema_arity.py adds placement-composition checks on every file (no shared placement instance; pinned Tag probes) and optional --witness-agreement for the real-project export in CI. Synthetic IFC fixtures are regenerated (solid positions, enum values, opening Tag catch-up from #222).

Reviewed by Cursor Bugbot for commit 1e78616. Configure here.

…on PredefinedType

Two conformance fixes to the IFC4 writer, both measured against Revit's own
export of the same project.

#232 — the writer emitted the element's own IfcAxis2Placement3D in both the
IfcLocalPlacement's RelativePlacement and the swept solid's Position. IFC4 has
a consumer compose ObjectPlacement x Position, so every element on every
release was placed at twice its translation; viewers that ignore Position drew
it correctly, which is how it survived. The solid's Position is now the
project-level identity placement. Verified with IfcOpenShell's geometry
iterator under USE_WORLD_COORDS, matched by Tag against the reference export:
all 80 slabs agree on every vertex to 0.0000 ft, against a 185.33 ft worst case
before.

#220 — four category_map rows disagreed with what the authoring witness
writes. Adopting the issue's rule (follow the witness where a recorded edge
shows its choice): IFCWALL .NOTDEFINED. (360/360), IFCSPACE .SPACE. (116/116),
IFCDOOR .DOOR. (132/132), IFCWINDOW .WINDOW. (6/6). Area / Space /
GenericModel keep $ — no edge records the witness's answer for them.

tools/ci/ifc_schema_arity.py gates both: a swept solid may not reuse the
IfcAxis2Placement3D its product's placement already uses, five pinned elements
must land on a pinned coordinate when the two are composed for real, and
--witness-agreement checks every written PredefinedType against the witness's
value on the recorded artifact.

No observation surface class was added. All six committed observations replay
byte-for-byte and both OctetProof verdicts stay PASS.

Closes #232
Closes #220

Claude-Session: https://claude.ai/code/session_01BaHKf1Rw5aJBGK5y3xmx7C
@cursor

cursor Bot commented Aug 30, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_9c22aa8d-cfe4-4811-8fd1-fc2c3d8b4382)

@DrunkOnJava
DrunkOnJava merged commit 2d772a8 into main Aug 30, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/placement-composition-and-predefined-types branch August 30, 2026 21:54
DrunkOnJava added a commit that referenced this pull request Aug 30, 2026
…to their family type (#215) (RE-26) (#237)

With #232's double translation gone, the world-coordinate gap between
rvt-rs and Revit's own export of the same project was finally small
enough to read. #236's follow-up list said *"columns sit 0.125 ft off in
plan and 1.58 ft off in Z, walls up to 2.53 ft."* This takes those two
apart. One of them was not a geometry gap at all; the other was two real
ones, and both are now closed on the majority of walls.

Report: `reports/element-framing/RE-26-world-coordinate-residuals.md`.
Corpus: `.rvt` sha256
`c805df445d613b408e37337765572021265e3f5dfdc7d1fa53b22ba1600b8014`,
slim IFC sha256
`bfdf36ffb0bb768f3409d818403990e64d4c262c6780603be87f8077387ad86d`.

## The metric first

#236 scored `max centroid delta`, where the centroid is the mean of the
emitted mesh vertices. That is only comparable when both sides
tessellate
the same way, and they do not: rvt-rs emits a box while Revit emits an
`IfcPolygonalFaceSet` for 62 of its 256 columns and 105 of its 360
walls.
Everything below scores the **world axis-aligned bounding box**,
`max(|Δmin|, |Δmax|)` in feet, matched by `Tag`, IfcOpenShell 0.8.5
geometry iterator with `use-world-coords`. Same geometry, same reader,
tessellation-invariant summary.

Under it, the column "1.583 ft in Z" is `0.0000 ft`:

| IfcColumn 20375 | rvt-rs | Revit | Δ |
|---|---|---|---|
| world z min (ft) | 76.0000 | 76.0000 | **0.0000** |
| world z max (ft) | 90.3333 | 90.3333 | **0.0000** |
| vertex-mean z (ft) | 83.1667 | 81.5833 | 1.5833 |

## Hypotheses and what the file answered

### Columns

| # | hypothesis | test | verdict |
|---|---|---|---|
| C1 | the bbox spans a base plate while Revit extrudes between bound
levels | record box z vs Revit world z, 256 columns | **rejected** —
exact on 256/256, both ends |
| C2 | the placement should sit at the box base rather than its centroid
| as above | **rejected** — the 1.5833 ft was the vertex-mean artifact |
| C3 | the profile is the type symbol's real section, joined via the
`+0x88` list | join, then compare sections | **adopted, join exact
256/256** — and it moves no vertex |
| C4 | the plan residual is the section being wrong | record plan
extents vs Revit's body plan extents | **rejected** — the envelope is 2
× 2 ft on all 256; Revit's *body* is cut inset on 80 |

**C3 (#215).** The last slot before a column record's own ElementId in
the counted list at `+0x88` that is itself an `OST_Columns` type-symbol
record is `5755` (`Column_Sqaure:24" x 24"`) on **256 of 256** — the
`IfcColumnType.Tag` Revit's export writes for every one of them. Slots
*after* the own id are excluded by measurement, not preference: every
column record also carries `75407` there.

```text
20375  refs1 = [3, 4258, 4546, 5755, 20307, 20308, 20375, 20843, 75407]
                              ^^^^                ^^^^^         ^^^^^
                              type              own id      a symbol,
                                                            after self
```

Symbol `5755`'s box is `(-1, -1, -0) → (1, 1, 9)` — and that is the
honest result: the section it yields is the rectangle the envelope
already had, agreeing to **8.0e-15 ft** on all 256, so **no vertex
moves** and the pinned composition probe for 20375 is unchanged to
1e-10. What changes is authority: `ProfileResolved` now means the type
said so, behind a fail-closed check that the section and the envelope
agree to 1e-6 ft. A round or I-shape family fails that check and keeps
the envelope.

**C4.** Revit's own column body plan extents: 2.0 × 2.0 on 176,
1.6667 × 1.6667 on 38, 1.75 × 1.6667 on 20, 1.4167 × 1.6667 on 18,
2.0 × 1.6667 on 4. The record envelope is 2 × 2 on **all 256**. The 80
that miss have a body Revit *cuts*; no section produces an inset prism.

### Walls

| # | hypothesis | test | verdict |
|---|---|---|---|
| W1 | one element is framed more than once and the tie-break picks the
wrong frame | thickness / type-slot agreement per frame | **adopted** |
| W2 | the box is the untrimmed location line and the joins cut it | box
ends vs Revit's `Axis` polyline, 720 ends | **adopted** |
| W3 | the trimmed endpoints are carried in the record | `f64` search of
4 KiB past all 638 wall records | **rejected** — no fixed carrier |

**W1.** 171 of 360 walls carry two frames that disagree about the plan
box, because Revit rewrites an edited element into a higher-numbered
`Partitions/*` stream and leaves the earlier copy. `20796` in
`Partitions/46` has thin extent 0.5000 and names type `17341`; in
`Partitions/59` it has 0.6667 and names `17328`. Both are internally
consistent — they are two *versions*.

| test | oldest frame | newest frame |
|---|---:|---:|
| thin plan extent equals the nominal thickness of the `IfcWallType`
Revit assigns | 201 / 360 | **360 / 360** |
| `refs1[1]` equals that `IfcWallType.Tag` | 183 / 360 | **356 / 360** |
| world bounding box equals Revit's | 27 / 360 | 39 / 360 |

`Global/ElemTable` corroborates from a different stream: the `u32` at
`+0x1c` is a monotone version counter that ranks with the newest
partition holding a frame, over all 976 exported instances — 19–30 for
the 344 framed only in `/46`, 33 for the 18 whose newest is `/51`, 35
for
the 12 in `/55`, 36 for the 480 in `/59`. **No frame of any instance
disagrees about the box's `z`**, so this cannot move an element between
storeys.

**W2.** With the right frame, box and body differ only along the run:

```text
20796  box x 47.7500 … 75.0000     Revit Axis x 47.7500 … 74.6667
20797  box y 57.6667 … 81.0000     Revit Axis y 57.6667 … 80.6667
20798  box x 48.0000 … 100.2500    Revit Axis x 48.2500 … 100.2500
20799  box y 58.0000 … 81.3333     Revit Axis y 58.3333 … 81.3333
```

20796 ends on 20799's *centreline* and is cut to its near face — half of
20799's 8". 20798's high end is 20806's *far face*, not a centreline,
and
is left alone. Across all 720 wall ends every non-zero delta is exactly
0.25, 0.3333 or 0.75 ft — half of the 6″, 8″ and 18″ thicknesses on the
file — and zero elsewhere.

The solver: for each end, find every perpendicular recovered wall whose
centreline is exactly this end, whose run spans this wall's centreline
and whose elevation overlaps. None → no trim. One thickness → half of
it.
Disagreeing thicknesses → decline the element. Every input is a recorded
bounding box; nothing is fitted.

Scored per end: **689 of 720**. The 31 misses are all over-trims, in two
feature classes that also produce a real trim 125 and 22 times, so no
byte in the record separates them — Revit stores the join decision per
wall pair. Not in the box, and not in the 4 KiB after it (W3: the best
fixed offset carries an `Axis` endpoint pair 29 times against 360
walls).

Variants tried:

| variant | bbox-exact | max | mean |
|---|---:|---:|---:|
| record box, oldest frame (`main`) | 27 / 360 | 0.7500 | 0.2701 |
| record box, newest frame | 39 / 360 | 0.7500 | 0.2657 |
| + trim, skipping corner candidates | 328 / 360 | 0.3333 | 0.0296 |
| **+ trim at every junction (shipped)** | **336 / 360** | **0.3333** |
**0.0220** |

## Residuals, before and after

World AABB, `max(|Δmin|, |Δmax|)` in feet; "exact" is ≤ 1e-3 ft on both
corners.

| class | n | exact before | exact after | max before | max after | mean
before | mean after |
|---|---:|---:|---:|---:|---:|---:|---:|
| `IfcWall` | 360 | 27 | **336** | 0.7500 | **0.3333** | 0.2701 |
**0.0220** |
| `IfcColumn` | 256 | 176 | 176 | 0.5833 | 0.5833 | 0.1217 | 0.1217 |
| `IfcSlab` | 80 | 80 | 80 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| `IfcShadingDevice` | 20 | 20 | 20 | 0.0000 | 0.0000 | 0.0000 | 0.0000
|
| `IfcDoor` | 132 | 0 | 0 | 3.0855 | 2.9208 | 2.8938 | 2.9190 |
| `IfcWindow` | 6 | 0 | 0 | 4.8228 | 4.8228 | 4.8228 | 4.8228 |
| `IfcOpeningElement` | 138 | 0 | 0 | 4.9213 | 4.9213 | 3.0604 | 3.0846
|

Per wall: **309 improve, 35 unchanged, 16 regress**; the residual set
after is `0.0000` × 336, `0.2500` × 1, `0.3333` × 23. The 16 regressions
are the over-trims above, on walls that were accidentally exact
untrimmed. They are named in the report and the follow-up, not hidden by
a tolerance.

**Doors, honestly.** 96 of 132 carry disagreeing frames, so W1 moves
them: 24 improve, 72 worsen, 36 unchanged, **0 of 132 exact either
way**.
No measurement on this file adjudicates it, because a door's record box
is not what Revit exports — its body is the panel, its opening is the
wall cut, and scored against the export's own opening bodies the two
frames are just as far apart (3.0604 vs 3.0846 ft mean, 0 of 138 exact).
What *is* unchanged is what doors are gated on: **no door or window
record has frames that disagree about the preceding reference**, both
give 138 of 138 correct hosts, and the `IfcRelFillsElement` pair set is
untouched.

## Nothing that is gated moved

| | before | after |
|---|---:|---:|
| `IFCWALL` / `IFCDOOR` / `IFCWINDOW` / `IFCCOLUMN` / `IFCSLAB` /
`IFCSHADINGDEVICE` | 360 / 132 / 6 / 256 / 80 / 20 | unchanged |
| `IFCBUILDINGSTOREY` | 15 | 15 |
| `storey_bound_elements` | 801 | 801 |
| `IFCRELFILLSELEMENT` | 138 | 138 |
| entity **types** | 43 | 43 |
| `IFCPROPERTYSINGLEVALUE` | 5611 | 8435 |
| total instances | 20105 | 22929 |
| diagnostics sidecar | — | **byte-identical** |

The 2824 new property rows are exactly the new provenance: 360 walls × 5
plus 256 columns × 4. Because the OctetProof observation payload counts
every emitted entity type, that one row moves the observation hash, so
**the two committed `rvt-rs` observations were regenerated** —
`70f8df9d…` → `3c210a6f…`, one line different in each. The four
bridge-witness observations and **both `verdict.json` files are
byte-identical**; both verdicts stay `PASS` (element fixture 6 fields /
10 excluded, full project 13 fields / 3 excluded, 0 diffs, all three
witnesses replaying).

## The gate

`tools/ci/ifc_schema_arity.py` gains wall `20800` as a third pinned
`ObjectPlacement × Position × profile-point` probe. It is cut at
**both**
ends, so its first profile point is a trimmed corner — Revit's own world
corner for that wall, exactly. Run against the pre-change export the
gate
reports it:

```
before.ifc: #3076 IfcWall Tag 20800: ObjectPlacement x Position x profile-point
= (26.060400, 24.612600, 23.164800), pinned (26.162000, 24.587200, 23.164800),
delta 0.1016 > 1e-06
```

Both halves fire on that one pin: the x is the join trim, the y is the
frame's wrong thickness.

## Verification run

| Gate | Result |
|---|---|
| `cargo fmt --all` | clean |
| `cargo clippy --all-targets --all-features -- -D warnings` | clean |
| `cargo +1.85.0 check --all-targets` | clean |
| `cargo test --profile ci --workspace --all-targets`, corpus set | 153
result blocks, 0 failed |
| Tier-two corpus + decoder gates, 10 targets, corpus set | 46 passed, 0
failed |
| `tools/ci/ifc_schema_arity.py --witness-agreement` on a fresh export |
pass — 22929 instances, 43 types, 992 solids, **3** pinned probes
matched |
| Same gate on the pre-change export | fails on the `20800` pin, delta
0.1016 |
| OctetProof verdicts, both edges, `--compare-committed` | PASS, replay
match on all six observations |
| `tools/check-local.sh --ifcopenshell` | all requested gates passed |

New corpus gates: `core_interior_2024_wall_join_trimmed_bodies` (360 of
360 walls resolve, 329 take a trim, wall 20800 walked explicitly) and
`core_interior_2024_column_type_symbol_join` (256 of 256 join to 5755).
Unit gates in `src/element_record_wall_joins.rs` and
`src/partition_element_records.rs`.

## Follow-ups

- **The 31 over-trimmed wall ends** (16 walls). Revit's per-pair join
  decision is not in the wall's box and not in the 4 KiB after its
  record; finding its carrier is the next question.
- **The 80 cut columns.** A section cannot produce an inset prism; what
  cuts them has to be recovered.
- **Doors and windows** still carry the record envelope where Revit
  exports a panel — 0 of 132 and 0 of 6 exact — and the opening bodies
  with them (#227).
- **The `18" Basement` type slot** names `1851` where the export's
  `IfcWallType.Tag` is `3897` on all four walls. The thickness is right;
  the id space is not understood.

Refs #228
Closes #215

https://claude.ai/code/session_01BaHKf1Rw5aJBGK5y3xmx7C

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes real-project wall/column IFC geometry and multi-frame instance
selection; gated by corpus tests and CI pins, but 16 walls regress from
over-trimming and door boxes can shift without a world-exact gate.
> 
> **Overview**
> Closes **#215** by improving Revit 2024 partition element-record
geometry for walls and columns on the Core Interior corpus, without
changing element counts, relations, or storey binding.
> 
> **Partition framing:** When one ElementId appears in multiple
partition records, instance selection now keeps the **newest** frame
(greatest `(stream, offset)`), not the first — fixing stale wall (and
some door) plan boxes after Revit rewrites into higher-numbered
`Partitions/*` streams.
> 
> **Walls:** New `element_record_wall_joins` trims each wall’s plan run
by half the thickness of perpendicular walls whose centreline meets an
end (fail-closed on ambiguous joins). IFC export emits join-trimmed
extents, thickness, and provenance (`BodySource`, trim properties).
> 
> **Columns:** Records keep the full `+0x88` reference list;
`type_symbol_reference` joins each instance to the last same-category
type symbol before its own id, and emission uses that symbol’s section
when it matches the envelope within 1e-6 ft (`ProfileResolved` from the
type, not a square bbox).
> 
> **Verification:** Corpus/integration tests, support-matrix entries,
RE-26 report, CI pin for wall `20800` in `ifc_schema_arity.py`, and
regenerated OctetProof `rvt-rs` observations (more
`IFCPROPERTYSINGLEVALUE` from provenance; verdicts still PASS).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
7db12ff. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
…on PredefinedType (#236)

Two conformance fixes to the IFC4 writer, both measured against Revit's
own export of the same project. Corpus: `.rvt` sha256
`c805df445d613b408e37337765572021265e3f5dfdc7d1fa53b22ba1600b8014`, slim
IFC sha256
`bfdf36ffb0bb768f3409d818403990e64d4c262c6780603be87f8077387ad86d`.

## #232 — every element was placed twice

The writer emitted the element's own `IfcAxis2Placement3D` in **both**
the `IfcLocalPlacement`'s `RelativePlacement` and the swept solid's
`Position`. IFC4 has a conforming consumer compose `ObjectPlacement ×
Position`, so the element translation was applied twice. Viewers that
ignore `Position` drew the file correctly, which is exactly why it
shipped on every release: two tools could disagree about the same bytes
with neither of them misreading.

### The Position decision, and the export's evidence

Read with IfcOpenShell 0.8.5 on `2024_Core_Interior_slim.ifc`, Revit's
own exporter is consistent about one thing — **the element translation
appears exactly once** — and splits it two different ways depending on
the frame the profile is authored in:

| Revit entity | `ObjectPlacement.RelativePlacement.Location` |
`IfcExtrudedAreaSolid.Position.Location` |
|---|---|---|
| `IfcWall` #2240 (`SweptSolid` body) | `(48.0, 57.667, 0.0)` | `(0.0,
0.0, 0.0)` — identity |
| `IfcSlab` #1590 | `(0.0, 0.0, 0.0)` — identity | `(90.444, 71.185,
-0.167)` |
| `IfcSlab` #1619 | `(0.0, 0.0, 0.0)` — identity | `(93.5, 69.5, 0.0)` |
| `IfcSpace` #186 | `(0.0, 0.0, 0.0)` — identity | `(51.694, 69.556,
0.0)` |

Never both. Revit's walls put the location in the placement and leave
`Position` at identity because the wall profile is authored in the
element-local frame; its slabs and spaces do the mirror image because
those profiles are authored in storey coordinates.

rvt-rs authors **every** profile in the element-local frame — the
rectangle always did, and the plan profile recovered in #231 uses the
same frame — and it already carries the location on the element's own
`IfcLocalPlacement`. So the correct half of Revit's own convention is
the `IfcWall` row: **`Position` becomes the project-level identity
placement**, and the placement carries the translation once. That is
what this PR does. No entity is added or removed — the per-element axis
is still emitted, the solid just stops pointing at it.

The representation-map path is deliberately left alone, with a comment
saying why: a mapped item resolves as `MappingTarget × MappingOrigin⁻¹ ×
geometry`, so a `Position` equal to the `MappingOrigin` cancels against
the inverse instead of compounding, and `origin_feet` is `[0,0,0]` on
every map rvt-rs builds today anyway.

### World-coordinate verification

IfcOpenShell geometry iterator, `use-world-coords`, matched by `Tag`
against the Revit export, deltas in feet.

**BEFORE**

| Class | shared Tags | max centroid delta | max min-vertex delta | Tags
within 1e-3 ft |
|---|---:|---:|---:|---:|
| IfcColumn | 256 | 166.0000 ft | 166.0000 ft | 0/256 |
| IfcSlab | 80 | 185.3333 ft | 185.3333 ft | 0/80 |
| IfcWall | 360 | 170.2500 ft | 166.2500 ft | 0/360 |
| IfcDoor | 132 | 166.0748 ft | 166.0000 ft | 0/132 |
| IfcWindow | 6 | 157.1805 ft | 155.7300 ft | 0/6 |

| Class | Tag | rvt-rs world centroid (ft) | Revit world centroid (ft) |
delta (ft) |
|---|---|---|---|---|
| IfcColumn | 20375 | (48.0000, 220.0000, 159.1667) | (23.8750,
110.0000, 81.5833) | (24.1250, 110.0000, 77.5833) |
| IfcColumn | 20376 | (98.0000, 220.0000, 159.1667) | (49.1250,
110.0000, 81.5833) | (48.8750, 110.0000, 77.5833) |
| IfcSlab | 20311 | (181.3000, 139.0000, 151.7500) | (88.3000, 69.5000,
75.9167) | (93.0000, 69.5000, 75.8333) |
| IfcSlab | 20345 | (187.0000, 139.0000, 151.7500) | (93.5000, 69.5000,
75.9167) | (93.5000, 69.5000, 75.8333) |
| IfcWall | 20796 | (122.7500, 162.0000, 159.5000) | (60.1042, 81.0000,
81.7500) | (62.6458, 81.0000, 77.7500) |
| IfcWall | 20797 | (96.0000, 138.7500, 159.5000) | (48.0000, 69.1667,
83.5000) | (48.0000, 69.5833, 76.0000) |
| IfcDoor | 20810 | (194.0874, 118.9189, 156.1247) | (97.0437, 58.0499,
80.0499) | (97.0437, 60.8689, 76.0748) |
| IfcWindow | 20898 | (65.4902, 172.2757, 165.9056) | (30.8441, 86.1378,
83.7251) | (34.6460, 86.1378, 82.1805) |

The doubling reads straight off the table: the rvt-rs value is 2×
Revit's wherever the element's own frame is the whole story — slab 20345
at `(187.0, 139.0)` against `(93.5, 69.5)`, column 20375 at `220.0`
against `110.0`.

**AFTER**

| Class | shared Tags | max centroid delta | max min-vertex delta | Tags
within 1e-3 ft |
|---|---:|---:|---:|---:|
| IfcColumn | 256 | 1.5833 ft | 0.3333 ft | 107/256 |
| IfcSlab | 80 | 0.2083 ft | **0.0000 ft** | 79/80 |
| IfcWall | 360 | 2.5336 ft | 0.7500 ft | 78/360 |
| IfcDoor | 132 | 1.5095 ft | 3.0022 ft | 0/132 |
| IfcWindow | 6 | 1.9010 ft | 0.8012 ft | 0/6 |

| Class | Tag | rvt-rs world centroid (ft) | Revit world centroid (ft) |
delta (ft) |
|---|---|---|---|---|
| IfcColumn | 20375 | (24.0000, 110.0000, 83.1667) | (23.8750, 110.0000,
81.5833) | (0.1250, -0.0000, 1.5833) |
| IfcColumn | 20376 | (49.0000, 110.0000, 83.1667) | (49.1250, 110.0000,
81.5833) | (-0.1250, 0.0000, 1.5833) |
| IfcSlab | 20311 | (88.3000, 69.5000, 75.9167) | (88.3000, 69.5000,
75.9167) | (-0.0000, 0.0000, 0.0000) |
| IfcSlab | 20345 | (93.5000, 69.5000, 75.9167) | (93.5000, 69.5000,
75.9167) | (-0.0000, 0.0000, 0.0000) |
| IfcWall | 20796 | (60.1875, 81.0000, 81.8123) | (60.1042, 81.0000,
81.7500) | (0.0833, 0.0000, 0.0623) |
| IfcWall | 20797 | (48.0000, 69.3750, 83.5000) | (48.0000, 69.1667,
83.5000) | (0.0000, 0.2083, 0.0000) |
| IfcDoor | 20810 | (97.0437, 59.4594, 80.1247) | (97.0437, 58.0499,
80.0499) | (-0.0000, 1.4095, 0.0748) |
| IfcWindow | 20898 | (32.7451, 86.1378, 85.1756) | (30.8441, 86.1378,
83.7251) | (1.9010, -0.0000, 1.4505) |

**All 80 slabs now agree with Revit's export on every world-space vertex
to 0.0000 ft.** That is the class where rvt-rs recovers a real plan
profile (#231), so it is the class where a placement fix can be checked
at full precision, and it is exact.

The residuals that remain elsewhere are **geometry recovery fidelity,
not placement composition**, and each is an existing tracked gap:
columns sit 0.125 ft off in plan and 1.58 ft off in Z (insertion point
and base elevation), walls up to 2.53 ft on location-curve-derived
bodies, and doors and windows carry the record's bounding-box envelope
rather than a panel (#86, #82). None of them scales with the element's
distance from the origin any more, which is the signature the doubling
had.

### The gate

`tools/ci/ifc_schema_arity.py` closes the class two ways, both
fail-closed:

1. **Structural invariant, every file, every product** — a swept solid's
`Position` may not be the very `IfcAxis2Placement3D` instance its
product's `IfcLocalPlacement` already uses as `RelativePlacement`. Run
against the pre-fix export it produces 992 findings, first one: `#216
IfcColumn reuses #207 as both its ObjectPlacement's RelativePlacement
and its IfcExtrudedAreaSolid.Position`.
2. **Pinned composition** — for five elements the gate computes
`ObjectPlacement × Position × first-profile-point` explicitly
(`ifcopenshell.util.placement`, no geometry kernel) and compares against
a pinned coordinate at 1e-6. Two are in `synthetic-project.ifc`, one in
`synthetic-structural.ifc` and two are the recorded artifact's column
`20375` and slab `20345`, so the probe fires in the fixture-only CI step
*and* on the real export. A file that does not hold the Tag skips the
probe rather than failing.

## #220 — PredefinedType follows the authoring witness

The issue's suggested rule is adopted: where a recorded edge shows the
witness's choice, take it. Agreement with the export is what the
OctetProof verdicts score, and a value the witness demonstrably wrote is
a recorded observation, not an invention.

### Per-type agreement, measured with IfcOpenShell

| Entity | Revit's export writes | rvt-rs before | rvt-rs after | rvt-rs
count | agreement |
|---|---|---|---|---:|---|
| IfcWall | `.NOTDEFINED.` ×360 | `.STANDARD.` | `.NOTDEFINED.` | 360 |
360/360 exact |
| IfcSpace | `.SPACE.` ×116 | `.INTERNAL.` | `.SPACE.` | 18 | 18/18
exact (recall gap tracked separately) |
| IfcDoor | `.DOOR.` ×132 | `$` | `.DOOR.` | 132 | 132/132 exact |
| IfcWindow | `.WINDOW.` ×6 | `$` | `.WINDOW.` | 6 | 6/6 exact |
| IfcColumn | `.COLUMN.` ×256 | `.COLUMN.` | `.COLUMN.` | 256 | 256/256
exact (unchanged) |
| IfcSlab | `.FLOOR.` ×78, `.ROOF.` ×2 | `.FLOOR.` | `.FLOOR.` | 80 |
inside the witness's value set (unchanged) |
| IfcShadingDevice | `.NOTDEFINED.` ×20 | `$` | `$` | 20 | **not changed
— see #235** |

`Area`, `Space` and `GenericModel` keep `$`: no recorded edge shows what
the witness does with those Revit classes, and inventing a value is the
thing this table exists to avoid. `IfcSlab` keeps `.FLOOR.` for all 80
because splitting floors from roofs is a per-element decode, not a
mapping default; the gate accepts `{FLOOR, ROOF}` for that type.

`IfcShadingDevice` is the one row the witness rule reaches that this PR
does not change — `category_map.rs` carries an explicit prior decision
for it ("`$`, not an invented `.NOTDEFINED.`"), and flipping a
written-down decision deserves its own verdict rather than riding along
here. Filed as **#235**.

### No new observation surface class

`PredefinedType` is an attribute value; the observation payload counts
entity **type names** plus relations and storeys. Both changes are
therefore invisible to the observation hash, which was confirmed rather
than assumed — see below. So instead of widening the surface, the
agreement check went into the arity gate as `--witness-agreement`, run
on the recorded artifact in CI:

```
PredefinedType agrees with the witness: IfcColumn.COLUMN=256, IfcDoor.DOOR=132,
  IfcSlab.FLOOR=80, IfcSpace.SPACE=18, IfcWall.NOTDEFINED=360, IfcWindow.WINDOW=6
```

`IfcDoor` and `IfcWindow` also joined `PREDEFINED_TYPE_REQUIRED`, since
every `category_map` row for them now supplies a value.

## Observations did not move

Regenerated all three witnesses on both recorded edges and diffed
against the committed files:

| Edge | rvt-rs | ifcopenshell | ifc-lite | verdict |
|---|---|---|---|---|
| `magnetar-2024-core-interior` | byte-identical | byte-identical |
byte-identical | PASS, 6 fields, 0 diffs, replay match ×3 |
| `magnetar-2024-core-interior-slim` | byte-identical | byte-identical |
byte-identical | PASS, 13 fields, 0 diffs, replay match ×3 |

**Nothing under `research/witness/` was regenerated, because nothing
moved.** Entity counts, relations and storeys are unchanged.

## Fixtures

Both committed fixture IFCs are regenerated with their test pins, since
the writer change alters them:

- `synthetic-project.ifc` — 7 `IFCEXTRUDEDAREASOLID` rows repoint from
the element axis to `#14` (the project identity placement), 4 `IFCWALL`
move to `.NOTDEFINED.`, the door and two windows gain `.DOOR.` /
`.WINDOW.`.
- `synthetic-structural.ifc` — 4 `IFCEXTRUDEDAREASOLID` rows repoint to
`#14`. Its `predefined_type` values are hardcoded in the test model, not
looked up, so they are untouched.

`synthetic-project.ifc` also picks up a change it should have carried
since #222: it was last dumped at `55491d7` (#217), before `7f00dce`
gave `IfcOpeningElement` the `Tag` of the element that fills it, so its
one opening still wrote `$` there. Fixtures only regenerate behind
`DUMP_IFC=1`, which is how it drifted a commit behind the writer with no
test noticing.

Two Rust tests moved with the mappings: `lookup_known_class` now expects
`.NOTDEFINED.`, and `door_and_window_have_no_predefined_type_by_default`
— which asserted the old decision — is rewritten as
`door_and_window_follow_the_witness_predefined_type`, with a comment
recording why the old reading (type variance belongs on `IfcDoorType`)
is defensible and still wrong here: Revit populates both. A new
`witness_following_predefined_types` covers all five changed rows.

## Verification run

| Gate | Result |
|---|---|
| `cargo fmt --all` | clean |
| `cargo clippy --all-targets -- -D warnings` | clean |
| `cargo +1.85.0 check --all-targets` | clean |
| `cargo test --profile ci` × 6 named targets, corpus set | 16 passed, 0
failed |
| Tier-two decoder gates (#209), 7 targets, corpus set | 40 passed, 0
failed |
| `cargo test --profile ci --workspace --all-targets`, corpus set | 152
result blocks, 0 failed |
| `tools/ci/ifc_schema_arity.py --witness-agreement` on a fresh export |
pass — 20105 instances, 992 solids, 2 pinned probes matched |
| Same gate on the pre-fix export | fails, 992 composition findings |
| `tools/ci/validate-real-ifc.py` (Einhoven) | pass |
| `tools/check-local.sh --ifcopenshell` | all requested gates passed |
| OctetProof verdicts, both edges, `--compare-committed` | PASS, replay
match on all six observations |

## Follow-ups

- **#235** (filed) — `IFCSHADINGDEVICE` emits `$` where Revit writes
`.NOTDEFINED.` on all 20; the #220 rule reaches it but a documented
prior decision guards it.
- Column Z is 1.58 ft off and plan position 0.125 ft off against the
export; wall bodies up to 2.53 ft. Both are geometry recovery, now
measurable for the first time because the placement no longer swamps
them.
- Revit splits 80 slabs into 78 `.FLOOR.` + 2 `.ROOF.`; rvt-rs writes
`.FLOOR.` for all 80.

Closes #232
Closes #220

https://claude.ai/code/session_01BaHKf1Rw5aJBGK5y3xmx7C

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes core IFC geometry placement and attribute emission for all
extruded products; mitigated by new fail-closed CI gates and unchanged
OctetProof observation hashes per the PR description.
> 
> **Overview**
> Fixes two IFC4 writer conformance issues measured against Revit's
export of the 2024 Core Interior project.
> 
> **Placement (#232).** Swept solids no longer reuse the element's
`IfcAxis2Placement3D` as both `IfcLocalPlacement.RelativePlacement` and
`IfcExtrudedAreaSolid.Position`. Translation lives only on the local
placement; solid `Position` is the project identity frame so
`ObjectPlacement × Position` is not applied twice. The same rule applies
to extrusions, openings, and the generic `emit_solid_shape` path
(mapped-item geometry is documented as a separate composition case).
> 
> **PredefinedType (#220).** `category_map` now emits witness-aligned
values where a recorded edge exists: walls `.NOTDEFINED.`, rooms
`.SPACE.`, doors `.DOOR.`, windows `.WINDOW.` (replacing `.STANDARD.`,
`.INTERNAL.`, and `$`). Tests and docs/compatibility tables are updated
accordingly.
> 
> **CI and gates.** `tools/ci/ifc_schema_arity.py` adds
placement-composition checks on every file (no shared placement
instance; pinned Tag probes) and optional `--witness-agreement` for the
real-project export in CI. Synthetic IFC fixtures are regenerated (solid
positions, enum values, opening `Tag` catch-up from #222).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
dff9f2eccb02b3ffe3008181ebbca89253db4970. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
…to their family type (#215) (RE-26) (#237)

With #232's double translation gone, the world-coordinate gap between
rvt-rs and Revit's own export of the same project was finally small
enough to read. #236's follow-up list said *"columns sit 0.125 ft off in
plan and 1.58 ft off in Z, walls up to 2.53 ft."* This takes those two
apart. One of them was not a geometry gap at all; the other was two real
ones, and both are now closed on the majority of walls.

Report: `reports/element-framing/RE-26-world-coordinate-residuals.md`.
Corpus: `.rvt` sha256
`c805df445d613b408e37337765572021265e3f5dfdc7d1fa53b22ba1600b8014`,
slim IFC sha256
`bfdf36ffb0bb768f3409d818403990e64d4c262c6780603be87f8077387ad86d`.

## The metric first

#236 scored `max centroid delta`, where the centroid is the mean of the
emitted mesh vertices. That is only comparable when both sides
tessellate
the same way, and they do not: rvt-rs emits a box while Revit emits an
`IfcPolygonalFaceSet` for 62 of its 256 columns and 105 of its 360
walls.
Everything below scores the **world axis-aligned bounding box**,
`max(|Δmin|, |Δmax|)` in feet, matched by `Tag`, IfcOpenShell 0.8.5
geometry iterator with `use-world-coords`. Same geometry, same reader,
tessellation-invariant summary.

Under it, the column "1.583 ft in Z" is `0.0000 ft`:

| IfcColumn 20375 | rvt-rs | Revit | Δ |
|---|---|---|---|
| world z min (ft) | 76.0000 | 76.0000 | **0.0000** |
| world z max (ft) | 90.3333 | 90.3333 | **0.0000** |
| vertex-mean z (ft) | 83.1667 | 81.5833 | 1.5833 |

## Hypotheses and what the file answered

### Columns

| # | hypothesis | test | verdict |
|---|---|---|---|
| C1 | the bbox spans a base plate while Revit extrudes between bound
levels | record box z vs Revit world z, 256 columns | **rejected** —
exact on 256/256, both ends |
| C2 | the placement should sit at the box base rather than its centroid
| as above | **rejected** — the 1.5833 ft was the vertex-mean artifact |
| C3 | the profile is the type symbol's real section, joined via the
`+0x88` list | join, then compare sections | **adopted, join exact
256/256** — and it moves no vertex |
| C4 | the plan residual is the section being wrong | record plan
extents vs Revit's body plan extents | **rejected** — the envelope is 2
× 2 ft on all 256; Revit's *body* is cut inset on 80 |

**C3 (#215).** The last slot before a column record's own ElementId in
the counted list at `+0x88` that is itself an `OST_Columns` type-symbol
record is `5755` (`Column_Sqaure:24" x 24"`) on **256 of 256** — the
`IfcColumnType.Tag` Revit's export writes for every one of them. Slots
*after* the own id are excluded by measurement, not preference: every
column record also carries `75407` there.

```text
20375  refs1 = [3, 4258, 4546, 5755, 20307, 20308, 20375, 20843, 75407]
                              ^^^^                ^^^^^         ^^^^^
                              type              own id      a symbol,
                                                            after self
```

Symbol `5755`'s box is `(-1, -1, -0) → (1, 1, 9)` — and that is the
honest result: the section it yields is the rectangle the envelope
already had, agreeing to **8.0e-15 ft** on all 256, so **no vertex
moves** and the pinned composition probe for 20375 is unchanged to
1e-10. What changes is authority: `ProfileResolved` now means the type
said so, behind a fail-closed check that the section and the envelope
agree to 1e-6 ft. A round or I-shape family fails that check and keeps
the envelope.

**C4.** Revit's own column body plan extents: 2.0 × 2.0 on 176,
1.6667 × 1.6667 on 38, 1.75 × 1.6667 on 20, 1.4167 × 1.6667 on 18,
2.0 × 1.6667 on 4. The record envelope is 2 × 2 on **all 256**. The 80
that miss have a body Revit *cuts*; no section produces an inset prism.

### Walls

| # | hypothesis | test | verdict |
|---|---|---|---|
| W1 | one element is framed more than once and the tie-break picks the
wrong frame | thickness / type-slot agreement per frame | **adopted** |
| W2 | the box is the untrimmed location line and the joins cut it | box
ends vs Revit's `Axis` polyline, 720 ends | **adopted** |
| W3 | the trimmed endpoints are carried in the record | `f64` search of
4 KiB past all 638 wall records | **rejected** — no fixed carrier |

**W1.** 171 of 360 walls carry two frames that disagree about the plan
box, because Revit rewrites an edited element into a higher-numbered
`Partitions/*` stream and leaves the earlier copy. `20796` in
`Partitions/46` has thin extent 0.5000 and names type `17341`; in
`Partitions/59` it has 0.6667 and names `17328`. Both are internally
consistent — they are two *versions*.

| test | oldest frame | newest frame |
|---|---:|---:|
| thin plan extent equals the nominal thickness of the `IfcWallType`
Revit assigns | 201 / 360 | **360 / 360** |
| `refs1[1]` equals that `IfcWallType.Tag` | 183 / 360 | **356 / 360** |
| world bounding box equals Revit's | 27 / 360 | 39 / 360 |

`Global/ElemTable` corroborates from a different stream: the `u32` at
`+0x1c` is a monotone version counter that ranks with the newest
partition holding a frame, over all 976 exported instances — 19–30 for
the 344 framed only in `/46`, 33 for the 18 whose newest is `/51`, 35
for
the 12 in `/55`, 36 for the 480 in `/59`. **No frame of any instance
disagrees about the box's `z`**, so this cannot move an element between
storeys.

**W2.** With the right frame, box and body differ only along the run:

```text
20796  box x 47.7500 … 75.0000     Revit Axis x 47.7500 … 74.6667
20797  box y 57.6667 … 81.0000     Revit Axis y 57.6667 … 80.6667
20798  box x 48.0000 … 100.2500    Revit Axis x 48.2500 … 100.2500
20799  box y 58.0000 … 81.3333     Revit Axis y 58.3333 … 81.3333
```

20796 ends on 20799's *centreline* and is cut to its near face — half of
20799's 8". 20798's high end is 20806's *far face*, not a centreline,
and
is left alone. Across all 720 wall ends every non-zero delta is exactly
0.25, 0.3333 or 0.75 ft — half of the 6″, 8″ and 18″ thicknesses on the
file — and zero elsewhere.

The solver: for each end, find every perpendicular recovered wall whose
centreline is exactly this end, whose run spans this wall's centreline
and whose elevation overlaps. None → no trim. One thickness → half of
it.
Disagreeing thicknesses → decline the element. Every input is a recorded
bounding box; nothing is fitted.

Scored per end: **689 of 720**. The 31 misses are all over-trims, in two
feature classes that also produce a real trim 125 and 22 times, so no
byte in the record separates them — Revit stores the join decision per
wall pair. Not in the box, and not in the 4 KiB after it (W3: the best
fixed offset carries an `Axis` endpoint pair 29 times against 360
walls).

Variants tried:

| variant | bbox-exact | max | mean |
|---|---:|---:|---:|
| record box, oldest frame (`main`) | 27 / 360 | 0.7500 | 0.2701 |
| record box, newest frame | 39 / 360 | 0.7500 | 0.2657 |
| + trim, skipping corner candidates | 328 / 360 | 0.3333 | 0.0296 |
| **+ trim at every junction (shipped)** | **336 / 360** | **0.3333** |
**0.0220** |

## Residuals, before and after

World AABB, `max(|Δmin|, |Δmax|)` in feet; "exact" is ≤ 1e-3 ft on both
corners.

| class | n | exact before | exact after | max before | max after | mean
before | mean after |
|---|---:|---:|---:|---:|---:|---:|---:|
| `IfcWall` | 360 | 27 | **336** | 0.7500 | **0.3333** | 0.2701 |
**0.0220** |
| `IfcColumn` | 256 | 176 | 176 | 0.5833 | 0.5833 | 0.1217 | 0.1217 |
| `IfcSlab` | 80 | 80 | 80 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| `IfcShadingDevice` | 20 | 20 | 20 | 0.0000 | 0.0000 | 0.0000 | 0.0000
|
| `IfcDoor` | 132 | 0 | 0 | 3.0855 | 2.9208 | 2.8938 | 2.9190 |
| `IfcWindow` | 6 | 0 | 0 | 4.8228 | 4.8228 | 4.8228 | 4.8228 |
| `IfcOpeningElement` | 138 | 0 | 0 | 4.9213 | 4.9213 | 3.0604 | 3.0846
|

Per wall: **309 improve, 35 unchanged, 16 regress**; the residual set
after is `0.0000` × 336, `0.2500` × 1, `0.3333` × 23. The 16 regressions
are the over-trims above, on walls that were accidentally exact
untrimmed. They are named in the report and the follow-up, not hidden by
a tolerance.

**Doors, honestly.** 96 of 132 carry disagreeing frames, so W1 moves
them: 24 improve, 72 worsen, 36 unchanged, **0 of 132 exact either
way**.
No measurement on this file adjudicates it, because a door's record box
is not what Revit exports — its body is the panel, its opening is the
wall cut, and scored against the export's own opening bodies the two
frames are just as far apart (3.0604 vs 3.0846 ft mean, 0 of 138 exact).
What *is* unchanged is what doors are gated on: **no door or window
record has frames that disagree about the preceding reference**, both
give 138 of 138 correct hosts, and the `IfcRelFillsElement` pair set is
untouched.

## Nothing that is gated moved

| | before | after |
|---|---:|---:|
| `IFCWALL` / `IFCDOOR` / `IFCWINDOW` / `IFCCOLUMN` / `IFCSLAB` /
`IFCSHADINGDEVICE` | 360 / 132 / 6 / 256 / 80 / 20 | unchanged |
| `IFCBUILDINGSTOREY` | 15 | 15 |
| `storey_bound_elements` | 801 | 801 |
| `IFCRELFILLSELEMENT` | 138 | 138 |
| entity **types** | 43 | 43 |
| `IFCPROPERTYSINGLEVALUE` | 5611 | 8435 |
| total instances | 20105 | 22929 |
| diagnostics sidecar | — | **byte-identical** |

The 2824 new property rows are exactly the new provenance: 360 walls × 5
plus 256 columns × 4. Because the OctetProof observation payload counts
every emitted entity type, that one row moves the observation hash, so
**the two committed `rvt-rs` observations were regenerated** —
`70f8df9d…` → `3c210a6f…`, one line different in each. The four
bridge-witness observations and **both `verdict.json` files are
byte-identical**; both verdicts stay `PASS` (element fixture 6 fields /
10 excluded, full project 13 fields / 3 excluded, 0 diffs, all three
witnesses replaying).

## The gate

`tools/ci/ifc_schema_arity.py` gains wall `20800` as a third pinned
`ObjectPlacement × Position × profile-point` probe. It is cut at
**both**
ends, so its first profile point is a trimmed corner — Revit's own world
corner for that wall, exactly. Run against the pre-change export the
gate
reports it:

```
before.ifc: #3076 IfcWall Tag 20800: ObjectPlacement x Position x profile-point
= (26.060400, 24.612600, 23.164800), pinned (26.162000, 24.587200, 23.164800),
delta 0.1016 > 1e-06
```

Both halves fire on that one pin: the x is the join trim, the y is the
frame's wrong thickness.

## Verification run

| Gate | Result |
|---|---|
| `cargo fmt --all` | clean |
| `cargo clippy --all-targets --all-features -- -D warnings` | clean |
| `cargo +1.85.0 check --all-targets` | clean |
| `cargo test --profile ci --workspace --all-targets`, corpus set | 153
result blocks, 0 failed |
| Tier-two corpus + decoder gates, 10 targets, corpus set | 46 passed, 0
failed |
| `tools/ci/ifc_schema_arity.py --witness-agreement` on a fresh export |
pass — 22929 instances, 43 types, 992 solids, **3** pinned probes
matched |
| Same gate on the pre-change export | fails on the `20800` pin, delta
0.1016 |
| OctetProof verdicts, both edges, `--compare-committed` | PASS, replay
match on all six observations |
| `tools/check-local.sh --ifcopenshell` | all requested gates passed |

New corpus gates: `core_interior_2024_wall_join_trimmed_bodies` (360 of
360 walls resolve, 329 take a trim, wall 20800 walked explicitly) and
`core_interior_2024_column_type_symbol_join` (256 of 256 join to 5755).
Unit gates in `src/element_record_wall_joins.rs` and
`src/partition_element_records.rs`.

## Follow-ups

- **The 31 over-trimmed wall ends** (16 walls). Revit's per-pair join
  decision is not in the wall's box and not in the 4 KiB after its
  record; finding its carrier is the next question.
- **The 80 cut columns.** A section cannot produce an inset prism; what
  cuts them has to be recovered.
- **Doors and windows** still carry the record envelope where Revit
  exports a panel — 0 of 132 and 0 of 6 exact — and the opening bodies
  with them (#227).
- **The `18" Basement` type slot** names `1851` where the export's
  `IfcWallType.Tag` is `3897` on all four walls. The thickness is right;
  the id space is not understood.

Refs #228
Closes #215

https://claude.ai/code/session_01BaHKf1Rw5aJBGK5y3xmx7C

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes real-project wall/column IFC geometry and multi-frame instance
selection; gated by corpus tests and CI pins, but 16 walls regress from
over-trimming and door boxes can shift without a world-exact gate.
> 
> **Overview**
> Closes **#215** by improving Revit 2024 partition element-record
geometry for walls and columns on the Core Interior corpus, without
changing element counts, relations, or storey binding.
> 
> **Partition framing:** When one ElementId appears in multiple
partition records, instance selection now keeps the **newest** frame
(greatest `(stream, offset)`), not the first — fixing stale wall (and
some door) plan boxes after Revit rewrites into higher-numbered
`Partitions/*` streams.
> 
> **Walls:** New `element_record_wall_joins` trims each wall’s plan run
by half the thickness of perpendicular walls whose centreline meets an
end (fail-closed on ambiguous joins). IFC export emits join-trimmed
extents, thickness, and provenance (`BodySource`, trim properties).
> 
> **Columns:** Records keep the full `+0x88` reference list;
`type_symbol_reference` joins each instance to the last same-category
type symbol before its own id, and emission uses that symbol’s section
when it matches the envelope within 1e-6 ft (`ProfileResolved` from the
type, not a square bbox).
> 
> **Verification:** Corpus/integration tests, support-matrix entries,
RE-26 report, CI pin for wall `20800` in `ifc_schema_arity.py`, and
regenerated OctetProof `rvt-rs` observations (more
`IFCPROPERTYSINGLEVALUE` from provenance; verdicts still PASS).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
2e9dc78ef775416584849bdd7bd0454fcc0a9a09. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Sep 19, 2026
… compiles again (#259)

#236 added `predefined_type` to `IfcEntity::BuildingElement`. The fuzz
crate is outside the main workspace gate, so the nightly Fuzz workflow
has failed to build `fuzz_step_writer` with E0063 since then, and no
STEP-writer fuzzing has run.

Add the field to `FuzzElement` so the fuzzer drives it through the same
truncation and STEP string-escape path as the other optional strings.

## Testing

- [x] `cargo +nightly check --manifest-path fuzz/Cargo.toml` builds
(fails with E0063 on main)
- [ ] Nightly Fuzz workflow dispatched after merge to confirm the target
runs

## Legal and contribution hygiene

- [x] Licensable under Apache-2.0; no Autodesk material; synthetic fuzz
inputs only

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Fuzz-harness-only change that mirrors an existing entity field; no
production export or runtime behavior changes.
> 
> **Overview**
> Restores the **`fuzz_step_writer`** target after
`IfcEntity::BuildingElement` gained **`predefined_type`** (#236), which
had left the fuzz crate failing to build with **E0063** and blocked
nightly STEP-writer fuzzing.
> 
> The harness now generates **`predefined_type`** on **`FuzzElement`**,
passes it into **`BuildingElement`** with the same optional-string
truncation as **`type_guid`**, and documents that slot in the fuzz
coverage list for STEP string escaping.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
59aebcc. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Sep 19, 2026
…e CI audit path (#261)

## Summary

Bring the prose docs up to what merged on `main` on 2026-09-19 (#256,
#257, #258, #259, the four Dependabot bumps) and correct the
slab-profile claim in `docs/status.md` that RE-25 had already
invalidated. Docs, `README.md` and `CONTRIBUTING.md` only; no Rust, no
`viewer/`, no `CHANGELOG.md`.

## Motivation

`docs/status.md` reported 80 of 80 exact slab profiles from RE-25 and
then, about 40 lines later, still said the slab profile "is still the
bounding-box rectangle rather than the recovered boundary polygon
(#31)". `docs/supported-profile.md` carried the same claim in its
Unsupported list. Separately, nothing in the docs described the bounded
wasm32 inflate reservation, the wasm panic hook, the hash-verified
real-project demo gallery, or the `NOT MEASURED` npm audit path, and
`docs/demos.md` still listed the web viewer as "not yet implemented".

## Changes

- `docs/status.md` — review date to 2026-09-19; the stale slab-profile
sentence now says the profile is the polygon its `OST_SketchLines`
records close on 80 of 80 exported slabs, with the 20 rotated shading
plates named as the remaining rectangle; new paragraph on the
hash-pinned demo gallery; gzip and Browser viewer capability rows
updated with the 1 MiB reservation cap and the real-project demos.
- `docs/supported-profile.md` — the same stale slab claim replaced by
the 20-shading-plate remainder, and the door/window host-wall binding no
longer listed as unsupported (#222 matches Revit's `(host wall, filling
element)` pair set on 138 of 138; it is the opening-index rows that
carry no host claim).
- `README.md` — viewer and demo-gallery paragraphs only: wasm32 memory
behaviour and the panic hook, plus Einhoven / Core Interior sizes and
measured load times.
- `docs/viewer-api.md` — new "Panic reporting and wasm32 memory" section
covering the seven byte-opening bindings that install
`std::panic::set_hook`, `INITIAL_INFLATE_CAPACITY_BYTES`, and the
before/after measurements.
- `docs/viewer-build-pipeline.md` — states that VW1-01..24 shipped and
the recipe is the built workflow; a "wasm32 linear memory is the real
ceiling" subsection under VW1-20 so a future chunked path keeps the
bound.
- `docs/user-guide.md` — the two real-project demos and their honest
decode times in the browser steps; the 801 of 872 storey-containment
figure and the named 71.
- `docs/demos.md` — the "Web viewer ... not yet implemented" bullet
replaced by what actually ships and what is still missing (a broader
redistributable real-project corpus).
- `docs/supply-chain-policy.md` — the npm advisory 503 retry path, why a
`NOT MEASURED` run is not evidence of clean dependencies, and how a
measured advisory is still told apart by the output rather than the exit
code (#258).
- `CONTRIBUTING.md` — the same audit behaviour plus the narrower
pull-request CI shape (#260, open as of 2026-09-19); a fuzz note
explaining that `fuzz/` is outside the workspace gate, which is how
`fuzz_step_writer` broke from #236 until #259.
- `docs/contribution-map.md` — new "Open Remainders" section listing the
six issues closed today and the named remainder behind each of #32,
#33/#219, #23, #86 and #156.

## Testing

N/A: docs-only PR. No Rust or TypeScript changed, so `cargo test` /
`clippy` / `fmt` are unaffected by this diff. Verification performed
instead:

- Every number written was checked against the merged code or its
commit: `INITIAL_INFLATE_CAPACITY_BYTES` and `shrink_to_fit` in
`src/compression.rs`, the seven `install_panic_hook()` call sites in
`src/wasm.rs`, the `sha256` / `size_bytes` entries in
`docs/viewer-demos.json`, the two new Playwright tests in
`viewer/tests/viewer-regression.spec.ts`, the retry block in
`.github/workflows/ci.yml`, and the `#260` diff.
- Relative Markdown links in all ten changed files resolve to existing
paths.
- `git diff --stat` confirms only `docs/`, `README.md` and
`CONTRIBUTING.md` changed.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A resolved limitation is updated: the slab boundary polygon moved
out of the Unsupported list in `docs/supported-profile.md` and out of
the stale sentence in `docs/status.md`, with the 20 rotated shading
plates named as what is genuinely left
- [x] No new limitation introduced
- [x] Commit message describes what changed and why
- [x] No emojis
- [x] No private paths, personal email addresses, or internal jargon
- [x] Not a reverse-engineering finding; no new probe or reconnaissance
addendum needed

## Legal and contribution hygiene

- [x] Licensable under Apache-2.0
- [x] No Autodesk proprietary source, decompiled internals, or NDA'd SDK
content
- [x] No new test fixtures; no real-world PII

## Breaking changes

None.

## Screenshots or output samples

N/A: docs-only PR. No UI or IFC output changed.

## Related issues

Refs #256, #257, #258, #259, #260. Documents the 2026-09-19 closures of
#30, #31, #66, #81, #83 and #87, and the named remainders on #32, #33,
#219, #23, #86 and #156. Closes nothing.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Markdown-only changes with no runtime, CI workflow, or dependency
edits in this diff.
> 
> **Overview**
> This **docs-only** PR brings README, CONTRIBUTING, and nine `docs/`
pages in line with what landed on `main` on 2026-09-19 (#256–#259,
related CI work), and fixes **stale capability wording** that still said
slab plan profiles were bounding-box rectangles after RE-25.
> 
> **Support-boundary honesty:** `docs/status.md` and
`docs/supported-profile.md` now state that **80 of 80** exported slabs
use closed sketch-line polygons; the **20 rotated shading plates** stay
rectangle/`ProfileResolved: false`. Door/window **host-wall binding on
the partition element-record carrier** is documented as closed (#222);
opening-index rows remain unsupported for host claims.
> 
> **Viewer and wasm:** README and `docs/viewer-api.md` /
`docs/viewer-build-pipeline.md` describe the **1 MiB per gzip member**
inflate reservation (#256), **wasm panic → `console.error`**,
hash-verified **Einhoven / Core Interior** demo gallery (#257) with
sizes and load times, and Playwright staging checks. `docs/demos.md`
replaces “web viewer not yet implemented” with what ships vs a broader
real-project corpus still missing.
> 
> **Contributor / CI prose:** `CONTRIBUTING.md` and
`docs/supply-chain-policy.md` explain **npm audit retries** and **`NOT
MEASURED` warnings** when the advisory API is down (#258), plus
**narrower pull-request CI** vs `main` (#260). CONTRIBUTING adds a
**fuzz workspace** note: PR gates do not compile `fuzz/`—run nightly
`cargo +nightly check --manifest-path fuzz/Cargo.toml` when changing
types fuzz targets construct (#259).
> 
> **Roadmap:** `docs/contribution-map.md` adds an **Open Remainders**
table naming what is left after six issues closed the same day.
`docs/user-guide.md` mirrors demo expectations and **801/872** storey
containment with the named 71 unbound.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ac4354d. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Oct 25, 2026
… reported as one, and every PR checks the fuzz targets build (#965) (#967)

## Summary

The nightly fuzz run's "crash" (#965) was a build failure:
`fuzz_step_writer` builds an `IfcModel` field by field and lacked
`type_property_sets`, which #934 added. The target now fills every field
it does not set from `IfcModel::default()`. Each nightly target is built
in a step of its own, and a run in which nothing crashed but a target
failed to build opens a `fuzz-build` issue rather than a `fuzz-crash`
one. A new CI job, `fuzz targets build`, checks the fuzz workspace on
every PR and gates `CI passed`, so a change that breaks a target is
caught before it merges.

## Motivation

`fuzz/` is a workspace of its own that no CI job built, so a field added
to a type a target constructs broke the nightly run after merge, twice
(#236 → #259, #934 → #965). The report then called it a crash, a false
red.

## Changes

- `fuzz/fuzz_targets/fuzz_step_writer.rs`: `..IfcModel::default()`.
- `.github/workflows/fuzz.yml`: a `Build <target>` step before the run;
the report job counts the run's `crash-` artifacts (uploaded only when a
target's run step fails) and files `fuzz-crash` or `fuzz-build`
accordingly.
- `.github/workflows/ci.yml`: `fuzz-check` (`cargo +nightly-2026-10-01
check --manifest-path fuzz/Cargo.toml --bins`, the nightly toolchain the
fuzz and docs.rs jobs pin), in `CI passed`'s needs.

## Testing

Unit tests are banned in this repository: do not add them. Show the
change working end to end on real files instead.

- [ ] `tools/check-local.sh`: CI, including the new `fuzz targets build`
job on this PR.
- [ ] Fuzz workflow dispatched on this branch for `fuzz_step_writer` (60
s): run
[40175530101](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40175530101),
in progress.
- [x] Both workflow files parse (YAML) and `actionlint` reports nothing
new; its one complaint, `uses: $/.github/actions/fetch-corpus`, predates
this change and those steps succeed on GitHub.
- [x] Witness: no export changes.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR (the
workflow headers say what they do)
- [x] No user-visible change, so no fragment
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content
- [x] No fixtures

## Breaking changes

None.

## Screenshots or output samples

```
error[E0063]: missing field `type_property_sets` in initializer of `IfcModel`
   --> fuzz_targets/fuzz_step_writer.rs:368:17
```

## Related issues

Closes #965
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant