Repository navigation
red: B83 proxy ports test - #704
Closed
DrunkOnJava wants to merge 1 commit into
Closed
DrunkOnJava wants to merge 1 commit into
DrunkOnJava wants to merge 1 commit into
Conversation
Owner
Author
|
Red recorded (Corpus health run 37299353664); the test and implementation are in #705. |
DrunkOnJava
added a commit
that referenced
this pull request
Oct 5, 2026
… in it (B83) (#705) B83, the remainder of B54 (#528). In Revit's export of RE1 Electrical, 30 of the 53 ports sit on elements that both Revit and rvt-rs write as proxies: panels, receptacles, switches, junction boxes and sensors. RE1 Mechanical has 6 such ports, all on one element (427568). rvt-rs gave ports only to distribution elements, because it ties each port with `IfcRelConnectsPortToElement`, which IFC4 restricts to distribution elements. Revit's own IFC4 export (revit-ifc `ConnectorExporter`) uses `IfcRelNests` instead and nests every port in its element. - `attach_family_instance_ports` now gives a proxy one port per symbol connector, the same way it treats a distribution element (RE-169). - The writer nests a proxy's ports in it, with one `IfcRelNests` per proxy (`'NestedPorts'`, `'Flow'`, as revit-ifc names it). Every other port keeps its `IfcRelConnectsPortToElement`. - `tools/re/ports_vs_ifc.py` counts nested ports as tied to their element. **Red/green.** `tests/proxy_ports.rs` failed on draft #704 (Corpus health run 37299353664) with 30 of 30 missing on Electrical and 6 of 6 on Mechanical. The failing output is in the test commit. **Measure** (run 37299621824, this branch's scorers on both sides): | model | ports before | ports now | Revit | untied | schema findings | |---|---:|---:|---:|---:|---:| | RE1 Electrical | 23 | 53 | 53 | 0 | 0 | | RE1 Mechanical | 144 | 150 | 150 | 0 | 0 | Only those two models' IFC and port scores change. Their diagnostics change only in `total_entities` (229 to 259 and 528 to 534). The other 145 outputs are identical. To follow (B84, which needs the maintainer's approval): nest every port the way Revit's IFC4 export does. That would change how the existing `family_instance_ports` and `duct_and_pipe_ports` tests read ties. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes IFC topology for proxy-hosted MEP connectors (new ports and nesting relationships); behavior is scoped to proxies but affects port counts and schema relationships on real corpus models. > > **Overview** > **B83** extends connector port export to family instances written as **`IfcBuildingElementProxy`**, matching Revit’s IFC4 pattern where **`IfcRelConnectsPortToElement`** is not valid for proxies. > > **Export model:** `attach_family_instance_ports` now attaches symbol connector ports to proxies the same way it does for distribution elements, so electrical/mechanical fixtures (panels, receptacles, etc.) get the ports Revit’s reference IFC expects. > > **STEP writer:** Ports on proxy hosts are grouped and linked with **`IfcRelNests`** (`NestedPorts` / `Flow`) instead of **`IfcRelConnectsPortToElement`**; distribution elements keep the existing port-to-element relationships. Join **`IfcRelConnectsPorts`** behavior is unchanged. > > **Validation:** New corpus test `proxy_ports` compares nested proxy ports against Revit’s `RE1-*.ifc`; CI includes `real proxy_ports`. Research scorer `ports_vs_ifc.py` treats **`IfcRelNests`** as the port-to-element tie for proxies. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f8d28c3. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Red check for B83's test (proxy ports nested in their element). Closed once the failing output is recorded.
Note
Low Risk
Test-only change with no production code paths; CI may fail until B83 export work lands.
Overview
Adds a real-file integration test (
proxy_ports) that locks in B83: for family instances exported asIfcBuildingElementProxy, every connector port Revit’s reference IFC exposes must appear in rvt-rs’s IFC4 export nested in that proxy viaIfcRelNests(not only present on the model).The test exports
RE1-Electrical,RE1-Plumbing, andRE1-MechanicalfromRVT_PROJECT_CORPUS_DIR, parses STEP forIFCDISTRIBUTIONPORTkeys and nest relationships, and compares against Revit’sRE1-*.ifcfor ports whose host element is a proxy. It is intended as a failing (red) gate until exporter behavior matches.proxy_portsis registered intools/ci/test-targets.txtso CI and the local gate run it like other corpus-backedrealtargets.Reviewed by Cursor Bugbot for commit 33bdc52. Configure here.