Repository navigation
ci(contracts): every writer gives the same bytes twice, and rvt-ifc honours SOURCE_DATE_EPOCH (#873) - #926
Conversation
…onours SOURCE_DATE_EPOCH (#873) The time in an IFC's header and owner history was the export's wall-clock time, so two exports of the same file differed. rvt-ifc now records SOURCE_DATE_EPOCH when it is set and refuses a value that is not Unix seconds. tests/reproducible_outputs.rs runs rvt-ifc, rvt-gltf, rvt-sheet and both rvt-schedule schedules twice on the tier-1 project and on Einhoven where the project corpus is present, and requires the same bytes. This is the last check S2 of the 1.0 criteria needed; its row is updated to passed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52d411590f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35fd653c65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…sm check straddles a clock second and requires a configured corpus's Einhoven (#873)
# Conflicts: # docs/release-1.0-criteria.md
…e assembles (#938) (#940) ## Summary Changelog entries become fragments, one file per pull request at `changelog.d/<section>/<name>.md`, and a release assembles them into `CHANGELOG.md` (`tools/release/changelog.py assemble`). CI checks every fragment (`tools/release/changelog.py check`). Closes #938. ## Motivation Every pull request added its entry at the top of the same `[Unreleased]` section, so each landing left every other open pull request in conflict with main on `CHANGELOG.md`. The queue then skipped them as `DIRTY` until someone merged main into each one by hand. On 2026-10-24 that happened after every landing: - #926 landing put #927 and #930 back in conflict; - #936 landing did the same to #886, #887, #927, #930 and #935, all with green CI. The `merge=union` driver that resolves such conflicts is in a maintainer's own git configuration, not this repository, and GitHub's merge never applied it. Nor does union merging keep the blank line between two entries. A fragment is a file of its own, so two pull requests never touch the same lines, and GitHub's update-branch, which the queue uses, merges them cleanly. ## Changes - `tools/release/changelog.py` (stdlib only): - `check` fails on a fragment outside a known section (`added`, `changed`, `fixed`, `removed`, `security`, `research`), an empty one, or one whose first line does not start an item (`- **`); - `assemble` puts each fragment at the top of its section under `[Unreleased]`, making the heading in Keep a Changelog order where it is missing, one blank line apart, in name order, and deletes the fragments. - `changelog.d/README.md`: the format. `changelog.d/changed/changelog-fragments.md`: this PR's own entry. - `.github/workflows/ci.yml`: the `check` step, beside the conflict-marker guard. - `RELEASE.md` step 5 runs `assemble` first. - `CONTRIBUTING.md`, `docs/maintaining.md` and the PR template point at `changelog.d/`. - `CHANGELOG.md`'s preamble says unreleased changes are also in `changelog.d/`. This PR leaves the existing `[Unreleased]` entries where they are. The open pull requests' entries move into fragments in those pull requests, each with one last merge of main. ## Testing I ran the tool on a scratch copy of main's `CHANGELOG.md`: - `check` with three fragments: `changelog.d: 3 fragment(s), each in a section and starting an item`; - `assemble` put two `added` fragments at the top of `### Added`, in name order with a blank line between, and made `### Security` between `### Removed` and `### Research`; it deleted the three fragments and left `README.md`; - `check` on a fragment that does not start an item, and on one in an unknown directory: both reported, exit 1; - on this branch, `check` passes on its one fragment, and `tools/ci/api-doc-ids.py` and the YAML parse pass. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] Commit messages describe WHAT changed and WHY - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 (see `CONTRIBUTING.md`) - [x] This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see `CLEANROOM.md`) ## Breaking changes None for users. Contributors write their entry under `changelog.d/` from now on.
Summary
RELEASE.mdpromises 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 bySOURCE_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.mdnames. The IfcOpenShell witness writes"deterministic": trueas a constant, not a measurement.Changes
src/bin/rvt_ifc.rs: readsSOURCE_DATE_EPOCH(Unix seconds, the reproducible-builds convention) and passes it towrite_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 andaboutno longer say the export is document-level only.tests/reproducible_outputs.rs(classcli):rvt-ifc,rvt-gltf,rvt-sheet,rvt-scheduleandrvt-schedule --schedule rooms, twice each, same bytes, on the tier-1 project and onRevit_IFC5_Einhoven.rvtwhenRVT_PROJECT_CORPUS_DIRhas it (tier 2). A second test checks the epoch reaches theFILE_NAMEheader andIfcOwnerHistory, 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.shpasses: left to CISOURCE_DATE_EPOCHis set. Witness observations hash entity counts, relations and storeys, so they do not moveAudit-honesty checklist
Legal and contribution hygiene
Breaking changes
None. Without
SOURCE_DATE_EPOCH,rvt-ifcwrites what it wrote before.Screenshots or output samples
With
SOURCE_DATE_EPOCH=1700000000the header readsFILE_NAME('…','2023-11-14T22:13:20',…)and the owner history ends,1700000000);.Related issues
Refs #873 (S2)