Skip to content

test: validate the synthetic IFC pair as written instead of comparing it with the committed copies - #1145

Merged
DrunkOnJava merged 1 commit into
mainfrom
test/synthetic-ifc-fresh-validation
Oct 30, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
test/synthetic-ifc-fresh-validation

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

The synthetic IFC pair (tests/ifc_synthetic_project.rs, tests/ifc_synthetic_structural.rs) no longer compares the writer's output with the committed tests/fixtures/synthetic-*.ifc. CI writes both files on every run and validates them with IfcOpenShell and tools/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_fixture and release_neutral are replaced by write_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:
    • The IfcOpenShell job gains "Write and validate the synthetic IFC pair": it runs the two tests, then ifcopenshell.validate and ifc_schema_arity.py on both files. The arity script's placement probes for W-N-001, SLAB-001 and C-W12x26-1 apply to these files.
    • The test job uploads synthetic-fixtures on every run, not only on failure.
  • RELEASE.md:
    • Step 7 refreshes the viewer's download copies from that artifact.
    • The fixtures leave the version list, where 0.11.0's release PR had put them. The comparison already ignored the version, so they never needed a bump.
  • tools/ci/ifc_schema_arity.py and docs/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

  • Docs describe the check as it now runs
  • No user-visible change, so no changelog fragment
  • No emojis, private paths or internal jargon

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content

Breaking changes

None.

… 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.
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Self-review. The byte comparison is gone, along with its helper (assert_matches_fixture, release_neutral). The tests keep every assertion they had, and write_synthetic_output writes what they check. In CI run 41069887320 the IfcOpenShell job's new step built the integration tests (1 min 17 s) and ran the 3 synthetic tests (all passed). It then validated both fresh files: ifcopenshell.validate found 0 errors on each, and ifc_schema_arity.py passed on 162 and 158 instances, with all three pinned placement probes matched (W-N-001 and SLAB-001 on the project, C-W12x26-1 on the structural frame). RELEASE.md no longer lists the fixtures among the files carrying the version, which the old comparison ignored anyway. Step 7 refreshes the viewer's download copies from the artifact the test job now uploads on every run. Demo 5 in docs/demos.md matches the assertions. Nothing else to fix.

@DrunkOnJava
DrunkOnJava merged commit 738ac35 into main Oct 30, 2026
29 checks passed
@DrunkOnJava
DrunkOnJava deleted the test/synthetic-ifc-fresh-validation branch October 30, 2026 18:16
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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