Skip to content

fix(ifc): family extrusions draw arcs again, keeping the mesh for an arc over 0.12 ft (#1346) (#1355) (RE-327) - #1352

Merged
DrunkOnJava merged 14 commits into
mainfrom
feat/1346-extrusion-arcs
Nov 4, 2026
Merged

DrunkOnJava merged 14 commits into
mainfrom
feat/1346-extrusion-arcs

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

rvt-ifc --family-extrusions draws family extrusions with arcs in a profile again: an arc of 0.12 ft in radius or less is written as the arc (the form Revit 24.0.5's IFC4 export gives it), and an instance with an arc over 0.12 ft in radius keeps its saved mesh, in every release. Every replaced body meets "ref on ours".

Motivation

Refs #1346 and #1355 (RE-327). #1346's done-when: arcs drawn again, every replaced body meeting "ref on ours", no scorer line worse than the --saved-meshes baseline, what is left out counted. #1355 is the scorers' tessellation, whose bar is Griffin's to change.

The rule, and why

  • Revit 24.0.5's IFC4 export (the BIM4LCA office; Core Interior is 24.0.20) writes a circle as arcs: 0 IfcCircleProfileDef and 4,717 indexed curves in the office, the waste terminals being two 180 degree IfcArcIndex arcs of 80 mm. Revit 26.2's IFC2X3 export (RE1) writes every circle as an IfcCircleProfileDef (97 elements).
  • IfcOpenShell 0.9.0.post1's default tessellation of the two forms of a circle has the same chords up to 0.164 ft and at 0.3281 ft, and one chord more or fewer at 0.2292, 0.4921, 0.9843 and 1.9685 ft (27 against 28 for the dispenser's 0.2292 ft, 0.001439 ft off). Over about 0.137 ft the chord's own deviation passes the 0.001 ft bar, so a difference in the count, or in where the circle starts, misses it, and a partial arc is as exposed as a whole circle. No single form meets both exporters, and nothing in the .rvt says which will read it; the release does not say either (a 2024 file exported by Revit 2026), so the earlier heads' 2025 gate is dropped.
  • rvt-rs keeps the saved mesh for an arc over 0.12 ft in radius, which meets the bar against both exporters and is what main writes with --saved-meshes. The rule is on the radius of any arc, not on a loop that is one full-turn arc, which a circle sketched as two or three arcs would escape.
  • It follows from the scorers' default tessellation of the two exporters' forms. True arcs for those arcs come back if Body scorers: measure shapes, not IfcOpenShell's default tessellation (circle forms differ by one chord) #1355 (a fine-tessellation mode for the body scorers, measured beside today's bar) changes the bar; under a fine tessellation the dispenser's two forms are one exact circle and the 0.001439 ft miss is a tessellation artefact.
  • An arc whose midpoint lies within 1.6e-5 ft of its chord is written as a line, since the writer's micrometre rounding can put the midpoint on the chord. No body in the corpus has one (unmeasured).

Figures of the shipped rule (RE-327 section 11.8)

Run 41838483706 (the rule before the any-arc change, a whole circle only; no replaced body has an arc over 0.12 ft, so it leaves the same bodies), baseline 41838489013:

  • 66 bodies replaced: Core Interior 37, each office file 9, RE1 Architecture 7, Electrical 2, Mechanical 1, Plumbing 1. 269 kept for an arc over 0.12 ft: the office files 120 each, the terrain files 11 each, RE1 Architecture 1, Electrical 6. Together the 335 the first arc run replaced.
  • Every combined row of mesh_bodies_vs_ifc equals the baseline's in all six columns, class by class and model by model; the median of each class's saved-mesh row equals the baseline's, and every family-extrusion row has a median of 1.0000.
  • 2 replaced bodies have an arc, both circles of 0.12 ft or less in RE1's IFC2X3 export: each holds "ref on ours" (1 of 1, 0 misses) and coincides with Revit's at 1e-5 ft.
  • Byte identity (41838493193): 111 of 111 the same. The r2025 models hold none of these bodies (18 of 24 have no candidate, 6 have 4 or 6, none reproduced).
  • Not measured: no partial arc and no arc of the IFC4 dialect is among the 66, and the 78 office terminals, the IFC4 arcs measured, are kept as the mesh now, so they are not evidence for the arcs written. The arcs the rule draws are thinly measured.

Runs of this head (7ebb1bab)

Flag 41843267888, baseline 41843276506 (same code, --saved-meshes alone), byte identity 41843284655. The head also has main at 809f22c8 (#1356, partition-frame order on Revit 2024 and later), which may move a replaced body; the baseline is at the same code. To check: the same 66 replaced and 111 of 111 identical, every replaced body meeting "ref on ours", no column or median worse than the baseline.

Changes

  • src/ifc/family_extrusions.rs: the arc skip is gone; has_arc_beyond_the_rule; a flat arc is a line; FamilyExtrusionReport and the rvt-ifc note keep arcs (now the candidates kept for an arc over 0.12 ft) and add with_arcs.
  • tools/re/family_extrusion_bodies_vs_ifc.py: a census of the scored arc bodies by Revit's form and the largest arc radius, with a 1e-5 ft coincidence column; mesh_bodies_vs_ifc.py gains a DESCRIBE hook (output unchanged). tools/re/arc_tessellation_study.py: the section 11 tables, no rvt-rs binary needed.
  • reports/element-framing/RE-327-family-extrusions.md section 11, and the pages that said arcs keep their mesh or that profiles are straight segments (README, compatibility, status, supported profile, evidence, support matrix, changelog fragment, the rvt-ifc help).

Testing

Unit tests are banned and none are added.

  • tools/check-local.sh was not run: lane rules allow no local builds, so CI is the gate. cargo fmt --all -- --check, python3 tools/release/changelog.py check, python3 tools/ci/api-doc-ids.py and python3 -m py_compile on the Python pass locally.
  • End to end on real files: python3 tools/re/arc_tessellation_study.py RE1-Architecture.ifc on the RE-32 oracle (sha256 a9b5d366...6200 and 4a78bdd6...8ce4), the office's IFC4 export read locally for the census of its profiles, and the Measure runs above.
  • Witness verdicts: not touched (the default export does not reach this code).

Audit-honesty

  • Docs reflect the change; the figures of the any-arc head's runs are added when they finish.
  • Changelog fragment edited in place (the flag is unreleased).
  • Limitations: arcs over 0.12 ft keep the saved mesh until Body scorers: measure shapes, not IfcOpenShell's default tessellation (circle forms differ by one chord) #1355 changes the bar; the arcs drawn are thinly measured (2 circles, IFC2X3); the flat-arc line is unmeasured; IfcOpenShell versions other than 0.9.0.post1 are not measured.
  • No emojis, no private paths. Clean room: Revit's exports are the oracle, as for every scorer.

Breaking changes

None. FamilyExtrusionReport.arcs and ExportNote::FamilyExtrusions { arcs } keep their names (the module is not in any release); with_arcs is added to both, which their non_exhaustive allows.

Related issues

Refs #1346, #1355, #156.

…er 0.12 ft, after measuring why the dispenser missed (#1346) (RE-327)

The first run that drew arcs as arcs put Revit's vertices 0.001439 ft from
RE1 Architecture element 360331's surface, over the 0.001 ft "ref on ours"
bar. The cause is a count of chords, not where they start: Revit's export
draws each circle of that toilet-paper dispenser as an IfcCircleProfileDef,
which IfcOpenShell 0.9.0.post1 cuts into 27 chords at 0.2292 ft, and the two
half arcs rvt-rs wrote come out as 28. Reproduced with hand-written STEP in
rvt-rs's shape meshed through the scorers' own arithmetic: the first run to
the digit (0.001439 ft, volume ratio 1.00055), the same for a half arc
started at 90 degrees, and an IfcCircleProfileDef at Revit's reference
direction at 3e-6 ft but 0.00155 ft turned 180 degrees.

An arc of radius up to 0.12 ft stays the arc (IfcOpenShell cuts it within
0.00088 ft of itself whatever Revit wrote); a larger one is written as the
fewest equal arcs whose chords lie within 0.00025 ft of it, which holds
Revit's vertices (on the true arc) at 3e-5 ft at every radius measured. An
arc needing over 2,048 pieces, or 16,384 in an instance, keeps the mesh.
FamilyExtrusionReport and the rvt-ifc note drop `arcs` for `with_arcs` and
`arcs_split`. The default export does not reach any of it.

The RE-327 wrapper scorer prints a census of the scored arc bodies by the
form Revit's export gives them and by how the arcs were written, through a
DESCRIBE hook in mesh_bodies_vs_ifc, and tools/re/arc_tessellation_study.py
reproduces the three tables of the report's section 11.
…they were measured, and the census names its boundary (#1346) (RE-327)
…sh for a whole circle over 0.12 ft in a Revit 2025 or later file (#1346) (RE-327)

The short arcs of the first head held "ref on ours" for every scored arc
body (run 41832799725) but threw away exact matches: the office's 78 waste
terminals were exact with arcs (volume ratio 1.0000, 1.9e-6 ft both ways) and
scored 1.0072 and 0.00144 ft as short arcs, 0 of 78 in the vol .01% and 0.001
ft columns.

Revit's two exporters write a circle two ways. The office (Revit 24.0.5,
IFC4) holds no IfcCircleProfileDef and 4,717 indexed curves, a circle as
IfcArcIndex half arcs from (-r, 0); RE1 (Revit 26.2, IFC2X3) writes every
circle as an IfcCircleProfileDef. At 80 mm (the terminals) IfcOpenShell cuts a
circle profile into 29 chords and two half arcs into 30; at 69.85 mm (the
dispenser) 27 and 28. No one drawing meets both.

Arcs are written as the first run wrote them. In a Revit 2025 or later file an
instance with a loop that is one whole circle over 0.12 ft in radius keeps its
mesh (`circles_kept`); the gate is a guess at where the dialects divide and
the census over puzzbobb's Revit 2025 IFC4 exports tests it. The pure helper
and its tests go with the short arcs. The wrapper scorer's census groups the
arc bodies by Revit's form and by the largest arc radius and counts the bodies
whose tessellations coincide to 1e-5 ft.
…xtrusion is an IfcCircleProfileDef starting where the record's arc starts (#1346) (RE-327)

An experiment beside the head that keeps the mesh for such circles: Revit
26.2's exports of RE1 write every circle as an IfcCircleProfileDef, and with
the same entity and the same start IfcOpenShell cuts both files into the same
chords (3e-6 ft on the dispenser when the start is Revit's; a start 90 degrees
off misses by 0.001162 ft and 180 degrees by 0.00155 ft). RE1 Electrical's
small circles coincide with half arcs at about 1e-5 ft in the first run, which
they do only if Revit's circle starts where the record's arc does, to a
multiple of 13.8 degrees.

An outline that is one whole circle with nothing in it is placed by moving the
solid's origin to the circle's centre and turning its reference direction to
the arc's start point; a whole circle over 0.12 ft in radius that is a hole or
has one keeps the mesh. Files of Revit 2024 are drawn as before. The census
labels the bodies drawn so and counts the ones whose tessellations coincide to
1e-5 ft, by Revit's form.
@DrunkOnJava DrunkOnJava changed the title fix(ifc): family extrusions draw arc profiles again, as short arcs over 0.12 ft (#1346) (RE-327) fix(ifc): family extrusions draw arc profiles again, whole circles by Revit's dialect (#1346) (RE-327) Nov 4, 2026
…e circle over 0.12 ft in every release, and draw every other arc as the arc (#1346) (#1355) (RE-327)

Revit 24.0.5's IFC4 export writes these circles as arcs (the office's
waste terminals are two half arcs) and Revit 26.2's IFC2X3 export writes them
as IfcCircleProfileDef (RE1). At radii over about 0.14 ft IfcOpenShell's
default tessellation of the two forms differs by one chord (27 against 28 at
0.2292 ft), so under the scorers' tessellation no one form meets both, and
nothing in the .rvt says which exporter will read a file: a 2024 file can be
exported by Revit 2026. The release gate of the two earlier heads is dropped
with the circle-form code. The saved mesh meets the bar against both and is
what main writes with --saved-meshes.

True arcs for these circles return if the scorers' tessellation changes the
bar (#1355). A circle of 0.12 ft or less, and every arc that is not a whole
circle, is written as the arc, which passed on both exporters. The report
and the pages say so, with the census figures of the earlier heads' runs; the
r2025 IFC4 exports hold none of these bodies.
@DrunkOnJava DrunkOnJava changed the title fix(ifc): family extrusions draw arc profiles again, whole circles by Revit's dialect (#1346) (RE-327) fix(ifc): family extrusions draw arc profiles again, keeping the mesh for whole circles over 0.12 ft (#1346) (#1355) (RE-327) Nov 4, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 13:39
… radius, write a flat arc as a line, and state the shipped figures (#1346) (#1355) (RE-327)

The whole-circle test matched only a loop that is exactly one full-turn arc, so
a circle a family sketches as two or three arcs escaped it and was written at
any radius, and a partial arc over about 0.137 ft is exposed to the same miss
of one chord or a different start. The rule is now on the radius of any arc:
an instance with an arc over 0.12 ft in radius, or whose radius does not read,
keeps its mesh in every release, and `arcs` counts those. The run before the
change replaced 66 of the 335 bodies the first arc run replaced and kept 269 for
an arc, none of the 66 having an arc over 0.12 ft, so the corpus does not move.

An arc whose midpoint lies within 1.6e-5 ft of its chord is written as a line,
since the writer's micrometre rounding can put the midpoint on the chord and
leave IfcOpenShell three collinear points.

The report and the pages carry the shipped rule's figures in place of the
superseded 64 and 335, say what the chord counts of section 11.2 measured (the
same chords up to 0.164 ft and at 0.3281 ft, one chord more or fewer at 0.2292,
0.4921, 0.9843 and 1.9685 ft), use 111 of 111 for byte identity, and say that
no partial arc and no arc of the IFC4 dialect is among the 66 replaced bodies
and that the 78 terminals are no longer evidence for the arcs written. README
and docs/compatibility.md no longer say profiles of straight segments.
@DrunkOnJava DrunkOnJava changed the title fix(ifc): family extrusions draw arc profiles again, keeping the mesh for whole circles over 0.12 ft (#1346) (#1355) (RE-327) fix(ifc): family extrusions draw arcs again, keeping the mesh for an arc over 0.12 ft (#1346) (#1355) (RE-327) Nov 4, 2026
@DrunkOnJava
DrunkOnJava merged commit 4be3a8a into main Nov 4, 2026
29 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1346-extrusion-arcs branch November 4, 2026 14:10
DrunkOnJava added a commit that referenced this pull request Nov 4, 2026
…tever its radius (#1366) (RE-331) (#1372)

## Summary

`rvt-ifc --family-extrusions` draws every circle and arc of a family's
extrusions as an arc again, whatever its radius, in Revit's own form
(`ProfileDef::IndexedPolyCurve`, `IfcArcIndex` arcs in three points; a
span over a half turn is two arcs, so a circle is two half arcs). The
rule of #1346 and #1352 that kept an instance's saved mesh for an arc
over 0.12 ft in radius is removed. The default export is unchanged (the
flag is opt-in): byte-identical to `main`'s on 34 of 34 models.

## Motivation

#1366. The rule existed because IfcOpenShell's default tessellation cuts
Revit's two forms of a circle (arcs in Revit 24.0.5's IFC4 export, an
`IfcCircleProfileDef` in Revit 26.2's IFC2X3 export) into chords that
need not coincide (RE-327 section 11.2), and the scorers counted that as
a miss. The maintainer decided on #1355 that the fine tessellation
judges a body both files write as true curves (RE-331 section 5), and
#1365 applies it.

## Changes

- `src/ifc/family_extrusions.rs`: `ARC_MAX_RADIUS`,
`has_arc_beyond_the_rule` and the check that used them are removed, with
`FamilyExtrusionReport::arcs`; the module docs say what is written now.
The checks of an instance against its own mesh are as they were.
`with_arcs` now counts the replaced instances with an arc written in a
profile (an `IfcArcIndex` segment), not those with an arc in the sketch:
an arc too flat to survive the writer's rounding comes out as a line.
- `src/ifc/export_pipeline.rs`: the `arcs` field of
`ExportNote::FamilyExtrusions`, its text and its mapping go; the
`with_arcs` text says "written".
- `src/bin/rvt_ifc.rs`: the `--family-extrusions` help.
- `README.md`, `docs/compatibility.md`, `docs/supported-profile.md`,
`docs/evidence.md`, `docs/status.md`, `docs/support-matrix.json`,
`docs/release-1.0-criteria.md` (W6): the 0.12 ft caveat is gone and the
counts are those measured at `34750454` (below).
- `changelog.d/added/327-family-extrusions-flag.md` (the unreleased
flag's fragment) describes the final behaviour and the figures; there is
no separate fragment, since the rule was never released.
`changelog.d/research/1355-scorer-fine-mode.md`: wording that would go
stale on merge.
- `reports/element-framing/RE-331-scorer-tessellation.md` sections 9 and
9.1; RE-327's Result and section 7 and RE-331 mark the 0.12 ft rule
superseded; the scorer comment that cited a constant that never existed.

Nothing in `tests/` pins a family-extrusion figure:
`tests/fixtures/project-counts` pin the default export, which this does
not reach, and the only `tests/` mention of the flag is the value-source
table's `NotYet` row.

## Testing

Unit tests are banned in this repository: none added. `cargo fmt --all
-- --check` passes locally; the build, clippy and rustdoc are CI's.

- [x] Measure at `34750454` (RE-331 section 9.1; all green):
- 41884073888, the default export, `-f base=main`: `ifc.sha256`
identical on **34 of 34** models.
- 41884078892, `--saved-meshes --family-extrusions`, `-f base=main`: 335
bodies replaced (main's rule: 66); the body scorer scores 251 and **all
251 hold** "ref on ours", both directions within 0.001 ft and the volume
within 0.01%; 187 are decided by the fine tessellation, 64 by the
default one; 0 bodies with an arc miss. The 84 others are office
`IfcSpace` instances (42 per office file), scored by
`space_profiles_vs_ifc` (vertices within 0.01 ft 117 to 159 as built,
115 to 157 at permit).
- 41884639625, the unfiltered run, `-f base=main -f
ifc_flags=--family-extrusions -f holdout=true -f nordic=true -f
r2025=true`, every scorer, 53 models: **6 exports move** (both office
files, both terrain files, RE1 Architecture and Electrical), by 269
bodies in all (120, 120, 11, 11, 1, 6), the bodies main's rule kept; in
each, `diagnostics.json` differs only in `body_sources` and `schema.txt`
only in the count of swept solids (up by the extrusions added); 1,493 of
1,519 scorer, schema and hash files of the 35 models that are not held
out are identical, the 26 that differ being those of the 6. **Held-out,
counts only: 18 of 18** `ifc.sha256` and **18 of 18** `counts.txt` are
main's. Nothing that passed on main fails: the saved-mesh rows that
change are the classes that lost bodies to the extrusions, and no
remaining column fell by more than the bodies lost.
- The IFC is smaller: the office files 77.9 MB against 82.2 MB, the
terrain files 0.17 MB against 0.92 MB.
- [ ] 41888377096: a filtered run at `0b9a6b5f`, which counts
`with_arcs` as written arcs (the commit after `34750454` changes only
that and the docs): the `rvt-ifc` notes should show the same `with_arcs`
as at `34750454` (120 in each office file, 11 in each terrain file, 2 in
Architecture, 6 in Electrical), since the corpus has no flat arc.
Dispatched.
- N/A: no unit test; the exporter's default path is not touched.

## Audit-honesty checklist

- [x] The docs state the counts measured at `34750454`, with the run
ids; the first arc run's counts (`aaa38de8`, before the flat-arc rule)
are cited as such.
- [x] A fragment under `changelog.d/` (the unreleased flag's, extended).
- [x] No emojis; no private paths; held-out data as counts only.
- [x] Not a reverse-engineering finding about the format.
- [x] Not measured, and said so in RE-331 section 9.1: the `with_arcs`
count with the written-arcs rule until 41888377096 finishes; the
held-out models' family bodies (the unfiltered run does not run
`family_extrusion_bodies_vs_ifc`, so only their exports are compared); a
flat arc.

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk proprietary source; no fixtures added.

## Breaking changes

`FamilyExtrusionReport::arcs` and the `arcs` field of
`ExportNote::FamilyExtrusions` are removed: they counted the instances
the removed rule kept. `rvt::ifc::family_extrusions` has not been in a
release (it landed after v0.14.0), and nothing else reads them.

BREAKING CHANGE:
`rvt::ifc::family_extrusions::FamilyExtrusionReport::arcs` and
`ExportNote::FamilyExtrusions { arcs }` are removed together with the
0.12 ft rule they counted.

## Related issues

Closes #1366. Follows #1352, #1355, #1362 and #1365.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant