Repository navigation
test: validate the synthetic IFC pair as written instead of comparing it with the committed copies - #1145
Conversation
… it with the committed copies #1133 made the synthetic project and structural tests fail whenever the writer's output differed from tests/fixtures/synthetic-*.ifc, so every change to IFC output, correct or not, turned CI red until someone committed the new files: a change detector. Nothing else read those files: since 2026-10-05 IfcOpenShell validates fresh exports, not the fixtures. The tests now write their output to target/tmp/synthetic-fixtures/ and keep their own assertions (entities, names, GUIDs, elevations, materials, property sets). CI's IfcOpenShell job runs them and validates that output with ifcopenshell.validate and ifc_schema_arity.py, whose placement probes pin the pair's walls, slab and column, so a writer change fails only when its output is invalid. The test job uploads the output on every run, and the release pull request refreshes the viewer's download copies from it (RELEASE.md step 7). RELEASE.md no longer lists the fixtures among the files carrying the version: the comparison already ignored it.
|
Self-review. The byte comparison is gone, along with its helper ( |
Summary
The synthetic IFC pair (
tests/ifc_synthetic_project.rs,tests/ifc_synthetic_structural.rs) no longer compares the writer's output with the committedtests/fixtures/synthetic-*.ifc. CI writes both files on every run and validates them with IfcOpenShell andtools/ci/ifc_schema_arity.py. The tests keep their own assertions.Motivation
Griffin's decision (2026-10-30, "Validate fresh output"), after a side agent pointed out that #1133's byte comparison is a change-detector test: any change to IFC output, correct or not, failed CI until the new files were committed. Since 2026-10-05 nothing validated those committed files (the IfcOpenShell job moved to fresh tier-1 and real-project exports), so the comparison was the only thing reading them. The synthetic models reach writer paths the tier-1 exports do not (IfcMember routing, representation maps, the stair), so validating their fresh output is real coverage.
Changes
tests/common/mod.rs:assert_matches_fixtureandrelease_neutralare replaced bywrite_synthetic_output, which writes$CARGO_TARGET_TMPDIR/synthetic-fixtures/<name>.tests/ifc_synthetic_*.rs: call it, and their module docs say so..github/workflows/ci.yml:ifcopenshell.validateandifc_schema_arity.pyon both files. The arity script's placement probes forW-N-001,SLAB-001andC-W12x26-1apply to these files.synthetic-fixtureson every run, not only on failure.RELEASE.md:tools/ci/ifc_schema_arity.pyanddocs/demos.md: comments and Demo 5 describe the new arrangement. Demo 5's list of what the test checks now matches its assertions (it said two property sets; the test asserts six).Testing
Unit tests are banned and none are added. This PR's CI is the check: the new step must run both tests, find both files non-empty, and pass IfcOpenShell's schema validation and the arity and placement checks on them.
Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.