From 6f90badda898946c57247328d94aa5e8ecda0232 Mon Sep 17 00:00:00 2001 From: Petru Conduraru Date: Mon, 13 Jul 2026 06:45:54 +0300 Subject: [PATCH] Fix ci-bonsai-daily: renumber stale STEP ids in BDD feature fixtures Several BDD scenarios hardcode absolute representation-item object names whose trailing number is the IFC STEP line id (f"Item/{item.is_a()}/{item.id()}"). Those ids drift when file-creation order changes; a recent shift moved all of them by a uniform -4, so the scenarios failed with "Item/.../NN does not exist". The failing step (the_object_name_exists in test_feature.py) dumps the full bpy.data.objects listing on failure, so the correct current ids are recoverable directly from the CI log (run 29208793599, tested commit 36e21e882f, an ancestor of HEAD with only a .gitignore commit between). Renumber to match: IfcExtrudedAreaSolid/77->73, IfcPolygonalFaceSet/76->72, IfcVertexPoint/69->65, IfcEdge/72->68, IfcFace/74->70. Verified against the CI failure dump (a local build produces different ids, so this is validated by CI's own object listing rather than a local run). boolean.feature also hardcodes IfcHalfSpaceSolid/90 and panel text [91] downstream of the failing assertion, which CI never reached and so never dumped; left as-is to avoid guessing - they will print a fresh dump next run for a follow-up if still stale. This change was made with the assistance of an AI tool. Co-Authored-By: Claude Fable 5 --- src/bonsai/test/bim/feature/boolean.feature | 4 ++-- src/bonsai/test/bim/feature/root.feature | 10 +++++----- src/bonsai/test/bim/feature/structural.feature | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/bonsai/test/bim/feature/boolean.feature b/src/bonsai/test/bim/feature/boolean.feature index 9b06580172..cbf4981dc8 100644 --- a/src/bonsai/test/bim/feature/boolean.feature +++ b/src/bonsai/test/bim/feature/boolean.feature @@ -12,7 +12,7 @@ Scenario: Ensure added booleans are marked as manual And I click "OK" And the object "IfcFurniture/Unnamed" exists And I toggle edit mode - And the object "Item/IfcExtrudedAreaSolid/77" exists + And the object "Item/IfcExtrudedAreaSolid/73" exists And I open the "Add Item" menu When I click "Half Space Solid" And the object "Item/IfcHalfSpaceSolid/90" exists @@ -33,7 +33,7 @@ Scenario: Ensure removed booleans are unmarked as manual And I click "OK" And the object "IfcFurniture/Unnamed" exists And I toggle edit mode - And the object "Item/IfcExtrudedAreaSolid/77" exists + And the object "Item/IfcExtrudedAreaSolid/73" exists And I open the "Add Item" menu And I click "Half Space Solid" And I deselect all objects diff --git a/src/bonsai/test/bim/feature/root.feature b/src/bonsai/test/bim/feature/root.feature index 1267e022a9..26de5bd2ae 100644 --- a/src/bonsai/test/bim/feature/root.feature +++ b/src/bonsai/test/bim/feature/root.feature @@ -24,7 +24,7 @@ Scenario: Add element - an element with no geometry When I click "OK" And I select the object "IfcFurniture/Unnamed" And I toggle edit mode - Then the object "Item/IfcExtrudedAreaSolid/77" exists + Then the object "Item/IfcExtrudedAreaSolid/73" exists Scenario: Add element - an element with extrusion geometry Given an empty IFC project @@ -36,7 +36,7 @@ Scenario: Add element - an element with extrusion geometry When I click "OK" And I select the object "IfcFurniture/Unnamed" And I toggle edit mode - Then the object "Item/IfcExtrudedAreaSolid/77" exists + Then the object "Item/IfcExtrudedAreaSolid/73" exists Scenario: Add element - an element with custom tessellation geometry Given an empty IFC project @@ -48,7 +48,7 @@ Scenario: Add element - an element with custom tessellation geometry When I click "OK" And I select the object "IfcFurniture/Unnamed" And I toggle edit mode - Then the object "Item/IfcPolygonalFaceSet/76" exists + Then the object "Item/IfcPolygonalFaceSet/72" exists Scenario: Add element - an element with tessellation geometry from an object Given an empty IFC project @@ -62,8 +62,8 @@ Scenario: Add element - an element with tessellation geometry from an object When I click "OK" And I select the object "IfcFurniture/Unnamed" And I toggle edit mode - Then the object "Item/IfcPolygonalFaceSet/76" exists - And the object "Item/IfcPolygonalFaceSet/76" dimensions are "2,2,2" + Then the object "Item/IfcPolygonalFaceSet/72" exists + And the object "Item/IfcPolygonalFaceSet/72" dimensions are "2,2,2" Scenario: Reassign class Given an empty IFC project diff --git a/src/bonsai/test/bim/feature/structural.feature b/src/bonsai/test/bim/feature/structural.feature index 0ae8cdc686..2154e3b5a8 100644 --- a/src/bonsai/test/bim/feature/structural.feature +++ b/src/bonsai/test/bim/feature/structural.feature @@ -12,7 +12,7 @@ Scenario: Add element - a structural point connection And I make the collection "IfcStructuralItem" visible And I select the object "IfcStructuralPointConnection/Foo" And I toggle edit mode - Then the object "Item/IfcVertexPoint/69" exists + Then the object "Item/IfcVertexPoint/65" exists Scenario: Add element - a structural curve member Given an empty IFC project @@ -25,7 +25,7 @@ Scenario: Add element - a structural curve member And I make the collection "IfcStructuralItem" visible And I select the object "IfcStructuralCurveMember/Foo" And I toggle edit mode - Then the object "Item/IfcEdge/72" exists + Then the object "Item/IfcEdge/68" exists Scenario: Add element - a structural surface member Given an empty IFC project @@ -38,7 +38,7 @@ Scenario: Add element - a structural surface member And I make the collection "IfcStructuralItem" visible And I select the object "IfcStructuralSurfaceMember/Foo" And I toggle edit mode - Then the object "Item/IfcFace/74" exists + Then the object "Item/IfcFace/70" exists Scenario: Load structural analysis models Given an empty IFC project