Skip to content

fix(ci): the mcp answers rooms check counts what each room that differs differs in (#1443) - #1453

Merged
DrunkOnJava merged 4 commits into
mainfrom
lane/1443-mcp-rooms-rac-advanced
Nov 5, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
lane/1443-mcp-rooms-rac-advanced

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

The rooms check of tools/re/mcp_answers_vs_ifc.py read FAIL with 1 difference of 116 on each of the six rac_advanced saves of 2015 to 2020. The cause is the scorer: its ring_area returned 0.0 for any outline that is not an IfcPolyline, and the writer writes a curved Area as an IfcIndexedPolyCurve with arcs. It now reads arcs as arcs. The rooms check also prints, as counts, what each room that differs differs in.

Motivation

#1443. The check compares list_rooms with the run's own rvt-rs.ifc, not with the IFC2X3 export, so that pairing does not produce the difference. The racadv-* models are kept as counts only, so the scrub dropped the difference text and the run named no cause.

Measure 42056263115 (scorers from 8a2da9ef, code dd3dc116, -f racadv=true -f models="racadv-*" -f scorers=mcp_answers_vs_ifc), identical on all six saves: 116 spaces, of space kind room 91 and area 25; 1 with an arc in its outline; 1 differing, of space kind area, with an arc, in "an outline of the IFC that reads an area of zero". Nothing else differs on any save. The same run's oracle lines pair all 116 spaces by GlobalId with an area within 0.1% of Revit's export, so the server's area for that Area was right and the scorer's reading of the IFC was wrong.

Changes

  • tools/re/mcp_answers_vs_ifc.py: ring_area reads an IfcPolyline or an IfcIndexedPolyCurve (lines, three-point arcs, or no segments), counts each arc as itself (the signed circular segment r^2 (sweep - sin sweep) / 2), and returns None for a curve it cannot read or an arc through collinear points. profile_area then reports no plan outline instead of an area of zero. check_rooms records a cause for each difference and prints count lines of fixed words, only where above zero.
  • docs/maintaining.md: one paragraph on those lines.
  • The scrub already keeps every mcp answers: line; no change there. No exporter, MCP tool or contract change, so docs/mcp-tools.* is untouched.

Testing

Unit tests are banned in this repository: none added.

  • tools/check-local.sh: N/A, a Python scorer (python3 -m py_compile passes)
  • Cause read from Measure 42056263115 on 8a2da9ef (above).
  • The fix, Measure 42058378119 (scorers from 5188641a, code dd3dc116, -f racadv=true -f nordic=true -f r2025=true -f scorers=mcp_answers_vs_ifc, 40 models): rooms: 116 compared, 0 differ and consistency PASS: every check equal on racadv-2015 to racadv-2020, each with 1 room whose outline has an arc (the Area above). The other 34 models also read PASS, with 1,469 spaces compared in all and no room whose outline has an arc, so the change to the arc reading does not touch their results.
  • The new ring_area checked on synthetic outlines against an independent measurement (every arc cut into 20,000 chords and read by shapely), within 1e-3 relative: an arc bulging out and in, a clockwise ring, two half arcs, a three-quarter arc closed by a chord, an unwritten closing edge, no segments, a repeated first point, a polyline, an arc in a hole; a collinear arc and a composite curve return None. Run in scratch, not committed.
  • Not measured: the held-out and BIMcollab models (not in that run, so how many arc-outlined rooms they hold is unread); the Areas of the 2021 to 2027 saves of rac_advanced, which no racadv model covers; the merge of main at be595556 (Rust code of fix(saved-graphics): the pass frees an owner's graph with its batch, so the walls that embed a curtain wall stop raising the export's peak (#1429) #1441, which this scorer-only change does not touch) was not re-run.

Audit-honesty checklist

  • No claim beyond a run: figures above name their run and head
  • No user-visible change: a scorer and a maintainer note, so no changelog fragment
  • No emojis, no private paths, no data from the unlicensed export (counts only)

Breaking changes

None.

Related issues

Closes #1443

Both done-when items are met: the one space is named by its count and cause from Measure 42056263115 (space kind area, an arc in its outline, the IFC outline read as an area of zero, on each of the six saves), and the MCP answer and the IFC agree on all six saves in Measure 42058378119. The IFC2X3 export has no part in it: the check compares with the run's own export, so there is no fact about that pairing to count apart.

…rs differs in (#1443)

A model kept as counts only (racadv-*) reports a FAIL of the rooms check with no way to tell the cause: the difference text is dropped by the scrub. The check now prints, as fixed words and numbers, how many rooms differ, their space kinds, whether their outline has an arc, and how many differ in each thing a room is checked on. The check itself is unchanged.
… so a curved Area is no longer read as an area of zero (#1443)

The scorer's ring_area returned 0.0 for any outline that is not an IfcPolyline. The writer writes an Area drawn from Revit's plan topology with an arc (RE-333) as an IfcArbitraryClosedProfileDef over an IfcIndexedPolyCurve, so that Area read as an outline of area zero against the server's exact area. Measure 42056263115 (head 8a2da9e, code dd3dc11) shows it on all six racadv saves: 116 spaces, 25 of space kind area, 1 with an arc, 1 that differs, in the outline reading as zero. ring_area now reads polylines and indexed poly curves of lines and three-point arcs, an arc counted as itself, and returns None for a curve it cannot read, which the check reports as no plan outline instead of as zero.
@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 5, 2026 16:00
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 5, 2026 16:11
@DrunkOnJava
DrunkOnJava merged commit 2e84084 into main Nov 5, 2026
33 checks passed
@DrunkOnJava
DrunkOnJava deleted the lane/1443-mcp-rooms-rac-advanced branch November 5, 2026 16:45
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.

mcp answers: the rooms check differs on 1 of 116 spaces on rac_advanced's 2015 to 2020 saves

1 participant