Skip to content

ci(contracts): every writer gives the same bytes twice, and rvt-ifc honours SOURCE_DATE_EPOCH (#873) - #926

Merged
DrunkOnJava merged 6 commits into
mainfrom
ci/reproducible-outputs
Oct 24, 2026
Merged

DrunkOnJava merged 6 commits into
mainfrom
ci/reproducible-outputs

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

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

  • Docs reflect the state after this PR
  • No limitation resolved beyond the check itself
  • No new limitation
  • Commit message says what and why
  • No emojis
  • No private paths
  • N/A: not a format finding

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content
  • 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)

…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.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 23, 2026 17:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/bin/rvt_ifc.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread tests/reproducible_outputs.rs Resolved
Comment thread tests/reproducible_outputs.rs Resolved
…sm check straddles a clock second and requires a configured corpus's Einhoven (#873)
# Conflicts:
#	docs/release-1.0-criteria.md
@DrunkOnJava
DrunkOnJava merged commit 51acf4f into main Oct 24, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/reproducible-outputs branch October 24, 2026 17:09
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
…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.
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