Repository navigation
ci: semver checks fail a pull request that breaks the stable Rust API without marking its title with ! (#873) - #910
Conversation
… without marking its title with ! (#873)
… on it under bash -e
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74ced28029
ℹ️ 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".
|
End-to-end evidence from the throwaway draft #911. It is this branch plus one commit that narrows
An earlier run showed that the step needs #911 is closed unmerged and its branch deleted. |
… a public API listing diff, and follows the release type after 1.0
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 933ab10da8
ℹ️ 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".
|
Second demo, #918:
This PR's own run passes both checks: https://github.com/DrunkOnJava/rvt-rs/actions/runs/39965470176/job/120454072843. #918 is closed unmerged. |
…son builds without -D warnings
…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)
Summary
A
semver checksjob (tools/ci/semver-gate.sh) compares each pull request's stable Rust API with its base in two ways: cargo-semver-checks 0.51.0, and a cargo-public-api 0.52.0 listing of every public item with its full signature, base against head. It fails on a breaking change unless the PR title carries the Conventional Commits!or the body aBREAKING CHANGE:footer.CI passednow needs it. This is the crate half of S2 in #873.Motivation
#873, criterion S2: "each stable surface has a check that fails on an unannounced breaking change". The crate had none.
Design
rvt::research, refactor(elements)!: one SimpleDecoder replaces the 67 decoder types 15 copies of simple_decoder! generated #894 replaced 67 decoder types). Against 0.6.1, every PR would fail on those whatever it changed. Against its base, a PR is judged on its own change.--default-features. That leaves outunstable-research, so the research tree is not part of the check, anddhat-heap, a profiling switch for the examples.#[doc(hidden)] pub mod cliis ignored by the tool.patchbefore 1.0 andminorfrom 1.0, so that after 1.0 a minor-only lint (an added#[must_use]) does not need!.nightly-2026-05-20).github.eventwould not change after a retitle. The job asksgh api repos/.../pulls/N. Fork PRs work with the read-only token (pull-requests: read).CI passedaccepts skipped).Changes
tools/ci/semver-gate.sh: both checks and the announcement rule..github/workflows/ci.yml: thesemverjob, which installs both tools and the pinned nightly, andsemverinci-ok'sneeds.CONTRIBUTING.md: the!rule under "Commit messages".docs/release-1.0-criteria.md: S2's evidence says what is checked now, and what is not: six of the twelve JSON-emitting CLIs have no schema, and the Python API, outputs and wasm API have no check. S2 stays failed.Testing
tools/check-local.sh: N/A, CI-only.semver checksrun is the passing case, since the PR changes no API. Two throwaway drafts stacked on this branch: refactor(streams)!: narrow year_for_partition to the crate (semver gate demo, not for merge) #911 removes a public function (it fails, then passes after a!retitle and a re-run), and refactor(redact): redact_path_str takes impl AsRef<str> (public API gate demo, not for merge) #918 changes a parameter's type, which cargo-semver-checks misses and the listing diff catches. Evidence is in the comments below.Open PRs that break the API already carry
!(#898, #903).Audit-honesty checklist
Legal and contribution hygiene