Repository navigation
ci(semver): the Python stubs, the wasm bindings and the JSON schemas are checked against the base like the crate (#873) - #915
Merged
Conversation
…hanges, and the 22 bindings documented (#873)
8 of 10 tasks
…N schemas with the base, and CI checks the docs list every binding
… or reason code is not a breaking change
…e's, and python-api-compat's verdict is exit 100
DrunkOnJava
marked this pull request as ready for review
October 23, 2026 17:27
DrunkOnJava
enabled auto-merge (squash)
October 23, 2026 17:27
DrunkOnJava
added a commit
that referenced
this pull request
Oct 24, 2026
…onours SOURCE_DATE_EPOCH (#873) (#926) ## Summary `RELEASE.md` promises the output formats are written deterministically, and nothing checked it. A new CLI test runs every shipped writer twice on the same file and requires the same bytes. The one thing that differed, the export time an IFC records, is now set by `SOURCE_DATE_EPOCH`. ## Motivation S2 of the 1.0 criteria (#873) needs a check on each stable surface. The crate, the Python stubs, the wasm bindings and the CLIs' JSON got theirs in #910, #913 and #915; the output formats had validity checks (IfcOpenShell, the glTF container, the schedule columns) but none for the determinism `RELEASE.md` names. The IfcOpenShell witness writes `"deterministic": true` as a constant, not a measurement. ## Changes - `src/bin/rvt_ifc.rs`: reads `SOURCE_DATE_EPOCH` (Unix seconds, the reproducible-builds convention) and passes it to `write_step_with_options`; unset or empty keeps the wall-clock time, anything else that is not a number is refused before the file is opened. The help mentions it, and the module doc and `about` no longer say the export is document-level only. - `tests/reproducible_outputs.rs` (class `cli`): `rvt-ifc`, `rvt-gltf`, `rvt-sheet`, `rvt-schedule` and `rvt-schedule --schedule rooms`, twice each, same bytes, on the tier-1 project and on `Revit_IFC5_Einhoven.rvt` when `RVT_PROJECT_CORPUS_DIR` has it (tier 2). A second test checks the epoch reaches the `FILE_NAME` header and `IfcOwnerHistory`, and that a malformed value fails naming the variable. - `docs/user-guide.md` (Export IFC), `RELEASE.md` (Output formats row), `docs/release-1.0-criteria.md` (S2 passed, with what each check is), `CHANGELOG.md`. ## Testing CI runs the new target; no build on this machine. The measured result is the test itself: the same bytes from two runs of each writer, on a synthetic and a real file. - [ ] `tools/check-local.sh` passes: left to CI - [x] Verified end to end: the test runs the built CLIs on the committed tier-1 file and on Einhoven (magnetar-io/revit-test-datasets, MIT) in tier 2 - [x] IFC exporter: the IFC body is unchanged; only the header and owner-history time can differ, and only when `SOURCE_DATE_EPOCH` is set. Witness observations hash entity counts, relations and storeys, so they do not move - N/A: performance ## Audit-honesty checklist - [x] Docs reflect the state after this PR - [x] No limitation resolved beyond the check itself - [x] No new limitation - [x] Commit message says what and why - [x] No emojis - [x] No private paths - N/A: not a format finding ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary content - [x] No new fixtures ## Breaking changes None. Without `SOURCE_DATE_EPOCH`, `rvt-ifc` writes what it wrote before. ## Screenshots or output samples With `SOURCE_DATE_EPOCH=1700000000` the header reads `FILE_NAME('…','2023-11-14T22:13:20',…)` and the owner history ends `,1700000000);`. ## Related issues Refs #873 (S2)
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.
Summary
The last part of S2 in #873. #910's
semver checksjob, #912's schema corrections and #913's stubtest are merged; this PR adds the other stable surfaces to that job, so the Python type stubs (tools/ci/python-api-compat.py, now exiting 100 on a break like the other two), the wasm bindings and the CLIs' JSON schemas are compared with the PR's base under the same!rule as the crate.Changes so far
tools/ci/wasm-api.py:compat <base lib.rs> <head lib.rs>reports a binding removed or renamed (byjs_name), a parameter removed, moved or retyped, a new parameter that is not anOption, or a changed return type.docschecks that the README's count anddocs/viewer-api.md's table name exactly the bindingsrvt-wasmexports.tools/ci/schema-compat.py <base> <head>reads the 16 output schemas as output contracts. A removed schema or field, a field no longer required, a gained type, a changed$ref, or a changed number ofanyOfbranches is breaking; an added field or a narrowed type is not. A field's list of values (a status, a reason code) is open, as the Rust enums are#[non_exhaustive]: adding a value, or no longer writing one, is not breaking, so a new status needs no major release after 1.0. RELEASE.md says so under "What 1.0 keeps stable".docs/viewer-api.mddocumented 7 of the 22 bindings, in a section that described them as still to be written, withJsErrorwhere the code throws a string. It now has a table of all 22: arguments, returns, what each does, and how errors reach JavaScript.README.mdsaid 14 bindings. It now says 22 and links the table.RELEASE.md: the wasm row of "What 1.0 keeps stable" names the 22 bindings.rvt-wasm/src/lib.rs: two planning labels (VW1-01, Lane Seven) out of its docs.Testing
wasm-api.py compatflags a renamedcameraEyeandelementInfoPanel's index retyped tou32, and accepts an addedOptionparameter.schema-compat.pyflags a field dropped fromrequired, a type widened to includenulland a removed field, and accepts an added field. Both pass on unchanged input, andwasm-api.py docspasses on this tree.Audit-honesty checklist
Legal and contribution hygiene