Skip to content

ci(container): CI reads every corpus file's container with olefile and holds rvt-dump's stream names, stored sizes and stored bytes to it (#1938) - #1957

Merged
DrunkOnJava merged 1 commit into
mainfrom
ci/1938-olefile-streams
Nov 14, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
ci/1938-olefile-streams

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

CI now reads every Revit file of both corpora, and the committed family fixture, with a second reader of the OLE container (olefile, written separately in Python) and fails if its stream names, stored sizes or stored bytes are not the ones rvt-rs's own reader (the cfb crate) gives. Closes #1938.

Motivation

#1933 lowered cfb-container-open from verified to partial because the only reader of the container that CI used was rvt-rs's own. This is the check #1938 asks for: a second reader over every corpus file, printing what it compared so that a run that compared nothing is not a pass.

Changes

  • tools/ci/olefile_streams.py (new): for each .rvt, .rfa, .rte or .rft under the paths given, lists the streams with olefile and reads them, runs rvt-dump --raw on the same file, and compares (1) the stream names, (2) each stream's stored size (rvt-dump's raw=<bytes>), and (3) the stored bytes, as the multiset of (size, sha256) of olefile's streams against rvt-dump's raw dumps, so that rvt-dump's own file names take no part. Storages are listed by olefile and not by rvt-rs, so they are counted and not compared. Fails on a path with no Revit file, a file olefile cannot open, an rvt-dump that fails, any difference, and a run that compared no stream.
  • tools/ci/requirements-olefile.in and .txt (new): olefile 0.47 (BSD, pure Python, 2023-12-01) pinned with hashes by uv pip compile --universal --generate-hashes, installed with --require-hashes. Dependabot's /tools/ci directory covers it.
  • .github/workflows/ci.yml: the step is in the Writer patch corpus job, after its other steps. CI: compare rvt-rs's stream list with olefile's over every corpus file (#1933 follow-up) #1938 names Corpus health, which holds only the project corpus; this job fetches both the phi-ag family corpus and the magnetar project corpus. It builds rvt-dump with the job's existing cache and runs the script on _corpus/examples/Autodesk, _project_corpus/Revit and tests/fixtures/families/empty.rfa.
  • docs/support-matrix.json: the evidence and note of cfb-container-open name the check. The status stays partial: docs/verification-protocol.md asks two independent witnesses across a recorded edge for verified, and has not said that a stream-list agreement is one, which this PR does not decide.
  • changelog.d/changed/1938-olefile-streams.md.

Testing

No Rust changes and no export changes, so no Measure.

The script was run on this Mac with the 0.22.0 release's rvt-dump (the macOS binary, sha256 checked against the release's SHA256SUMS) on the corpora in the working checkout and the committed fixture:

ok   _corpus/examples/Autodesk/rac_basic_sample_family-2016.rfa: 13 streams, 241,171 stored bytes, 3 storages not compared
...
ok   _project_corpus/Revit/2024_Core_Interior.rvt: 20 streams, 33,589,540 stored bytes, 3 storages not compared
...
ok   tests/fixtures/families/empty.rfa: 13 streams, 356,157 stored bytes, 3 storages not compared
olefile_streams: compared 18 files, 255 streams, 65,084,716 stored bytes (names, sizes and bytes); 54 storages listed by olefile and not compared; 0 failed

(11 family files 2016 to 2026, 6 project files, the fixture.) CI's checkout has the pinned commits of both corpora; the run of this job on this PR is the measurement over them, and its counts replace the ones above in a comment.

The check failing when it should was shown with a wrapper around the real rvt-dump:

  • one stream's printed stored size changed: FAIL ... stream 'BasicFileInfo': olefile says 1025 bytes, rvt-dump 999;

  • one byte of a raw dump changed: FAIL ... the stored bytes differ: 1 of olefile's streams are not among rvt-dump's raw dumps and 1 of rvt-dump's are not among olefile's;

  • a directory with no Revit file: FAIL ...: no Revit file, exit 1;

  • a text file named .rvt (a Git LFS pointer, as an unfetched corpus would hold): FAIL ... olefile could not read it: NotOleFileError.

  • tools/check-local.sh: N/A, no Rust, formatting or docs-build change; tools/ci/check-workflows.py and tools/release/changelog.py check pass.

  • Verified end to end on real Revit files: above (Autodesk's family samples, magnetar's project corpus, the committed fixture).

  • IFC exporter: N/A.

  • Performance: N/A. The whole run on the 18 local files took 1.5 s.

Audit-honesty checklist

  • The matrix says what the check is and what it is not: a check on the container, not yet a witness of the kind verified needs.
  • A fragment under changelog.d/changed/.
  • No private paths, emails or internal jargon in committed files.
  • Not compared, and said so in the script and the matrix: storages (rvt-rs lists streams only), encrypted files (none is measured) and .rte and .rft (in no corpus).

Legal and contribution hygiene

  • Apache-2.0; no Autodesk proprietary source, decompiled internals or NDA content. olefile is a separate BSD-licensed reader of the public OLE format, used only to check; no code of it is copied here.
  • No new fixtures.

Breaking changes

None.

…d holds rvt-dump's stream names, stored sizes and stored bytes to it (#1938)

The container is the layer every other reader stands on, and the only reader of it that CI
used was rvt-rs's own (the cfb crate). tools/ci/olefile_streams.py lists each Revit file of
the family corpus, the project corpus and tests/fixtures/families/empty.rfa with olefile, a
second reader written separately in Python, runs rvt-dump --raw on the same file, and fails
on any difference in the stream names, each stream's stored size or the stored bytes. It
prints how many files and streams it compared; a directory with no Revit file, a file
olefile cannot open and a run that compared no stream fail.

The Writer patch corpus job runs it: it is the job that holds both corpora, where #1938 named
Corpus health, which holds only the project corpus. olefile 0.47 is pinned with hashes in
tools/ci/requirements-olefile.txt. cfb-container-open stays partial; its evidence names the
check.
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

The new step ran in full / Writer patch corpus on this head (run 43531408821), with the rvt-dump this branch builds, over the pinned corpora:

olefile_streams: compared 19 files, 263 streams, 39,989,230 stored bytes (names, sizes and bytes); 57 storages listed by olefile and not compared; 0 failed

The 19 files are the 12 Autodesk family samples 2016 to 2027, 2024_Core_Interior.rvt, Revit_IFC5_Einhoven.rvt, the four Families/*.rfa of the project corpus and tests/fixtures/families/empty.rfa. The step took 71 seconds of the job, including the pip install and the rvt-dump build. The RE1 projects of the earlier local run (6 more files) are fetched by another job and are not in this job's checkout, so CI compares 19 where my Mac compared 18.

@DrunkOnJava
DrunkOnJava merged commit 5f1b1ba into main Nov 14, 2026
39 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/1938-olefile-streams branch November 14, 2026 00:17
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.

CI: compare rvt-rs's stream list with olefile's over every corpus file (#1933 follow-up)

1 participant