Skip to content

test: run the synthetic IFC pair in CI against their committed fixtures, and delete three unrun tests - #1133

Merged
DrunkOnJava merged 3 commits into
mainfrom
test/synthetic-ifc-contract
Oct 30, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
test/synthetic-ifc-contract

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Of the five tests/ targets classed unit (compiled, never run), the two synthetic IFC tests become CI-run contract checks against their committed fixtures. The other three are deleted.

Motivation

Griffin's decision (2026-10-30, "Run the IFC pair, delete three"). tests/fixtures/synthetic-project.ifc and synthetic-structural.ifc are what the IfcOpenShell job validates, what ifc_schema_arity.py's placement probes read, and what the viewer offers as demos. Nothing kept them in step with the writer: they were last written by 0.6.1.

Changes

  • tests/common/mod.rs: assert_matches_fixture compares the writer's output for a synthetic model, written at a fixed timestamp, with the committed fixture. It ignores only the FILE_NAME header line and the IfcApplication version, which change each release. On a difference it writes the current output to target/tmp/synthetic-fixtures/ and fails.
  • ifc_synthetic_project and ifc_synthetic_structural call it, and their DUMP_IFC/DUMP_IFC_STRUCTURAL rewrite now writes the fixed-timestamp form.
  • test-targets.txt: both become contract, and the unit class is gone.
  • ci.yml: on failure, the Linux test job uploads target/tmp/synthetic-fixtures/ as the synthetic-fixtures artifact.
  • Deleted:
    • control_cancellation: rvt_gltf_progress_cli covers cancellation and progress on a real file.
    • graceful_degradation and proptest_parsers: the eleven fuzz targets, with fuzz_regressions (hardening, run), cover malformed input.
  • proptest leaves the dev-dependencies, and Cargo.lock drops 213 lines (cargo metadata --locked --offline resolves).

Testing

The first CI run is expected to fail on both contract checks, because the committed fixtures are 0.6.1's output. Its synthetic-fixtures artifact will hold the current files, and the next commit on this PR will commit them, showing what changed since 0.6.1. The IfcOpenShell job and ifc_schema_arity.py's placement probes then check the refreshed fixtures.

Breaking changes

None.

Related issues

None.

…es, and delete three unrun tests

Griffin's decision (2026-10-30): of the five tests/ targets classed unit,
which CI compiled but never ran, the two synthetic IFC tests become contract
checks and the other three go.

- ifc_synthetic_project and ifc_synthetic_structural now also write their
  model at a fixed timestamp and fail when it differs from the committed
  tests/fixtures/synthetic-*.ifc, apart from the FILE_NAME header line and
  the IfcApplication version, which change with each release
  (tests/common, assert_matches_fixture). Those fixtures are what the
  IfcOpenShell job validates and the viewer offers as demos, and were last
  written by 0.6.1. On a difference the test leaves the current output in
  target/tmp/synthetic-fixtures, which the Linux test job uploads as the
  synthetic-fixtures artifact.
- control_cancellation, graceful_degradation and proptest_parsers are
  deleted: rvt_gltf_progress_cli covers cancellation and progress on a real
  file, and the eleven fuzz targets with fuzz_regressions (hardening, run)
  cover malformed input. proptest leaves the dev-dependencies, and
  Cargo.lock drops it and its 212 lines of dependencies.
…tput (0.6.1 to 0.10.0)

Taken from this PR's first CI run (synthetic-fixtures artifact, run 41028235014), where both contract checks failed on every platform and nothing else did. What moved since the fixtures were written: the owner-history timestamp is now the fixed one; Pset_BuildingCommon.NumberOfStoreys is gone from the project fixture, as only one of its three storeys contains elements (#1119); and entity numbering and content follow the writer's changes since 0.6.1 and 0.2.0. docs/viewer-demos.json's size hints follow the files.

@DrunkOnJava DrunkOnJava left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer self-review. GitHub does not let a PR's author approve it, so this review stands in for an approval: I read the full diff and checked each claim.

  • assert_matches_fixture: it compares the fixed-timestamp output with the committed file. It drops only the FILE_NAME line and replaces only the IfcApplication version string, and it strips \r from the committed text for safety. Every other line has to match exactly.
  • The two tests: each still makes all its original assertions on the current-time output. DUMP_IFC and DUMP_IFC_STRUCTURAL now write the fixed-timestamp form, so a local regeneration matches what CI checks.
  • The refresh: taken from the first run's synthetic-fixtures artifact (run 41028235014). Every platform failed on exactly the two fixture checks and nothing else, which shows the output does not depend on the platform. The diff against 0.6.1 shows:
    • the fixed owner-history timestamp;
    • NumberOfStoreys gone (#1119: one of three storeys holds elements);
    • renumbering from the writer's changes since then.
  • Verified: on the refreshed fixtures, CI passed. Both contract checks pass on every platform, the IfcOpenShell job passes, and ifc_schema_arity.py's placement report matches main's line for line.
  • Removed: the three tests' coverage is accounted for in the description. proptest is gone from Cargo.toml and Cargo.lock, which resolves with --locked.

Ready to land.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 09:14
@DrunkOnJava
DrunkOnJava merged commit 7d124e7 into main Oct 30, 2026
30 checks passed
@DrunkOnJava
DrunkOnJava deleted the test/synthetic-ifc-contract branch October 30, 2026 09:27
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…elper, and one ArcWall scan per file (#1136)

## Summary

The audit's helper refactor (Griffin, 2026-10-30, "One copy of each
helper"): copied helpers become one shared copy each, little-endian
reads go through `le_bytes` where the conversion is exactly equivalent,
and the partition ArcWall scan runs once per file instead of up to four
times. Nothing an export writes should change; Measure checks that.

## Changes

- **`le_bytes`:** about 117 of 227 inline `from_le_bytes` reads now use
`le_bytes`, which gains `i32_at` and `u16_units`. The rest are left
because their failure semantics differ: `Result` errors with specific
messages, `InstanceField::Bytes` fallbacks in `walker.rs`, cursor
`take(n)?` reads, fixed-size arrays that cannot fail, and `src/bin`. A
raw-indexed read behind an explicit bounds check becomes `?` only where
that check makes the new `None` arm unreachable. Messages from `anyhow`
errors are kept word for word.
- **`find_subslice`:** one copy, memchr, with the empty-needle guard
kept. It replaces two wrappers and one scalar loop.
- **GUID:** one `guid_string`, now used by three readers. One IFC
GlobalId alphabet. `derive_default_ifc_guid` calls `compress_ifc_guid`.
- **`src/native_json.rs` (research):** `element_id`, `element_id_i64`,
`finite_triple` and `agree`, shared by twelve `native_*` and partition
modules. Variants with different semantics stay.
- **`src/vector_math.rs` (private):** `sub`, `dot`, `cross`, `distance`
and `polygon_area_xy`. Expressions are token-identical to the copies
they replace. `from_decoded::polygon_area_sqft` keeps its public path.
The three point-in-polygon copies and the signed areas differ and stay.
- **Storeys:** one `elevation_storey_name`.
- **ArcWall scan:** memoised on `RevitFile` per release and
`WalkerLimits` (`memoised_arc_wall_scan`). The production walk, the
partition assembler and both IFC-export sites share it. The public
`scan_partition_arc_walls_with_limits` keeps its signature.
- `changelog.d/changed/arc-wall-scan-memo.md`.

No public signature changes. `fuzz/` and `rvt-probes` call public items
only.

## Testing

- No local build, by policy. A side agent wrote the commits, and I read
every diff.
- The branch's new `use crate::le_bytes;` imports made four
`crate::le_bytes::` paths already on `main` redundant, which
`unused_qualifications` (an error under `-D warnings`) would have
rejected. They are fixed in `ac976268`.
- CI is the compiler, with clippy and rustdoc under `-D warnings`, MSRV
and i686.
- Measure
[41037020175](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41037020175),
unfiltered against `main` with nordic and r2025:
- The other 30 models are byte-identical on both sides: every
`ifc.sha256`, every `diagnostics.json` and all scorer outputs (1,262
files on the head side).
- The BIM4LCA office's host was unreachable during the base run, so the
office was **NOT MEASURED** on the `main` side.
- Its head-side export, diagnostics and every scorer output are instead
identical to those of #1074's head (run 41025987689, commit 60be7324).
Every PR merged since then (#1133, #1134, #1135, #1137) leaves the
export path untouched.
- `CI passed`, including clippy and rustdoc under `-D warnings`, MSRV
and i686.

## Found, not changed

`partition_scanner.rs:239/449` can index `buf[offset + 3]` past the end
when a tag matches in a buffer's last three bytes. That is a panic on
hostile input, so it will be fixed in its own PR rather than in a
behaviour-preserving refactor.

## Breaking changes

None.

## Related issues

None.
@DrunkOnJava DrunkOnJava mentioned this pull request Oct 30, 2026
4 tasks done
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
## Summary

Release metadata for v0.11.0 (RELEASE.md steps 4 to 7). Merging this is
not the release: the signed `v0.11.0` tag on its squash commit is.

## Motivation

`main` holds user-facing fixes that installed users do not have yet,
above all #1075 (a model over the reader's limits exported empty with
exit status 0; the reporter can verify only from a release) and #421
(files that kept an older schema read as zero elements). It also holds
the breaking removal of unused stable API (#1128), which makes this a
minor release.

## Changes

- Version 0.11.0 in `Cargo.toml`, `rvt-py/Cargo.toml` (and its `=0.11.0`
pin), `rvt-wasm/Cargo.toml`, `tools/stream_evidence/Cargo.toml`,
`viewer/package.json`, `CITATION.cff` (dated 2026-10-30), both
lockfiles' workspace entries, and the `FILE_NAME` / `IFCAPPLICATION`
lines of the two synthetic IFC fixtures, which the contract checks
compare byte for byte since #1133. RELEASE.md's version list now names
those fixtures.
- `CHANGELOG.md`: `changelog.py assemble` moved the 33 fragments into
`[0.11.0] — 2026-10-30`, with an introduction, credits (puzzbobb: #1074,
#1076, #1077, #1081; n3ur0m4n: #1073) and "Upgrading from 0.10" (removed
API, exit status 3 for a model over the limits, saved meshes on by
default, properties no longer written, `Flagged` schema fields, the
probes crate).
- `README.md`: "Release 0.11.0 and main", and the reconnaissance probes
point at `probes/examples/` (#1132).
- `rvt-py/README.md` (packed into the wheel): what `write_ifc()` does
when part of a file was over the limits.

## Testing

CI is the gate. After this PR's CI, both Core Interior `rvt-rs.json`
witness observations and their verdicts are refreshed from its
`octetproof-core-interior` artifact (only `witness_version` and the
verdict hashes may differ); the PR stays unarmed until then.

## Audit-honesty checklist

- [x] The changelog section and README release section state only what
the entries measured
- [x] No emojis, private paths or internal jargon

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content

## Breaking changes

The release carries #1128's removal of unused public API; "Upgrading
from 0.10" lists what a user changes.
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
… it with the committed copies (#1145)

## 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

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

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content

## Breaking changes

None.
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