Repository navigation
fix(elements): read a file that kept an older release's schema #421 - #1081
Conversation
…t release (DrunkOnJava#421) A project saved by Revit 2024 to 2027 can carry the schema of a release it passed through. Its element-record marker is then that release's, so file_bbox_marker, which refuses a schema marker that differs from the saving release's constant, read nothing. In a field report on DrunkOnJava#421, 25 of 49 project files saved by 2024 to 2027 carried the marker of 2022, 2023, 2024 or 2025 and read as zero elements and zero Levels; the 17 with a 2024 or 2025 marker read once every reader took that release. schema_release names the release the file's schema belongs to: the 2024 to 2027 release whose bbox_marker the schema gives, or the 2015 to 2023 release whose schema_tags it has (file_schema_tags reads the file's own). RevitFile::layout_release takes it when it is older than the saving release, and otherwise the saving release. The partition readers and the exporter's scans take layout_release instead of BasicFileInfo's version, so such a file is read with its schema's marker, tags, envelope and Level layout. 2022 and 2023 schemas go to the 32-bit reader. A schema that matches no measured release still reads nothing. Metadata, reports, the doctor and the door GlobalId suffix keep the saving release. probe_421_schema_marker prints schema_release and layout per file. On the 120 local files of 2015 to 2027 the schema's release is the saving release, and all 132 local files export byte-identically against main.
…lemTable fits no layout (DrunkOnJava#421) The diagnostics now warn when RevitFile::layout_release differs from the saving release, and take the release-support status of the release the file is read as. A Global/ElemTable on the implicit fallback layout leaves every element record undeclared, which the field report saw on 5 of its 8 files with a 2022 or 2023 schema; that is now a warning too, through elem_table::layout. probe_421_schema_marker prints the table's stated count, the layout taken and, for 28 and 40 bytes, the rising ids and the first drop: counts and indices only, for a reporter to post.
7b47429 to
17c0ffe
Compare
|
Thanks, puzzbobb. Reviewed and integrated; I rebased the branch on main (after #1083) and added one commit on top, described under "Maintainer integration" in the description. In short:
Measure run 40942773596 checks the rebased head against main on every model and sample. |
…in's own code (#1084) ## Summary Measure saves its shared rust cache (key `measure`, restored by every later Measure run) only when it measured main's own code: the head job when `ref` is empty, the base job when `base` is empty or `main`, the timing job when both hold. ## Motivation Measuring an outside contributor's pull request is done by dispatching Measure from main with `-f ref=refs/pull/N/head`. `save-if: github.ref == 'refs/heads/main'` was true for those runs, so on a cache miss the contributor's build scripts would have run with the ability to write a cache later main runs restore. Checked on 2026-10-29: Measure has `contents: read`, no secrets, `persist-credentials: false`; no cache was saved by the runs on #1081 and #1074, and the two existing measure caches were deleted. This closes the remaining channel. ## Changes - `.github/workflows/measure.yml`: both `Swatinem/rust-cache` steps' `save-if`. ## Testing Unit tests are banned in this repository: do not add them. - [x] The workflow parses (YAML load); CI's workflow lint runs on this PR. A Measure dispatch from main with no `ref` still restores and saves; one with `ref` set restores only. - [ ] Verified on real Revit files: N/A, CI-only. ## Audit-honesty checklist - [x] No user-visible change, so no changelog fragment. - [x] No emojis, private paths or internal jargon. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk material. ## Breaking changes None. ## Related issues None.
|
Measure run 40942773596 (17c0ffe against main c2bb334, every model and scorer, including the 58 Autodesk sample projects 2015 to 2027): 89 of 89 IFC exports byte-identical, and no model's diagnostics or rvt-info output changed. That is the expected result: on every measured file the schema release equals the saved release and the ElemTable fits its release's layout, so the new warnings and the layout-based support label only apply to files like the ones reported on #421. Arming this to land; thank you, @puzzbobb. |
## Summary Release metadata for v0.11.0 (RELEASE.md steps 4 to 7). Merging this is not the release: the signed `v0.11.0` tag on its squash commit is. ## Motivation `main` holds user-facing fixes that installed users do not have yet, above all #1075 (a model over the reader's limits exported empty with exit status 0; the reporter can verify only from a release) and #421 (files that kept an older schema read as zero elements). It also holds the breaking removal of unused stable API (#1128), which makes this a minor release. ## Changes - Version 0.11.0 in `Cargo.toml`, `rvt-py/Cargo.toml` (and its `=0.11.0` pin), `rvt-wasm/Cargo.toml`, `tools/stream_evidence/Cargo.toml`, `viewer/package.json`, `CITATION.cff` (dated 2026-10-30), both lockfiles' workspace entries, and the `FILE_NAME` / `IFCAPPLICATION` lines of the two synthetic IFC fixtures, which the contract checks compare byte for byte since #1133. RELEASE.md's version list now names those fixtures. - `CHANGELOG.md`: `changelog.py assemble` moved the 33 fragments into `[0.11.0] — 2026-10-30`, with an introduction, credits (puzzbobb: #1074, #1076, #1077, #1081; n3ur0m4n: #1073) and "Upgrading from 0.10" (removed API, exit status 3 for a model over the limits, saved meshes on by default, properties no longer written, `Flagged` schema fields, the probes crate). - `README.md`: "Release 0.11.0 and main", and the reconnaissance probes point at `probes/examples/` (#1132). - `rvt-py/README.md` (packed into the wheel): what `write_ifc()` does when part of a file was over the limits. ## Testing CI is the gate. After this PR's CI, both Core Interior `rvt-rs.json` witness observations and their verdicts are refreshed from its `octetproof-core-interior` artifact (only `witness_version` and the verdict hashes may differ); the PR stays unarmed until then. ## Audit-honesty checklist - [x] The changelog section and README release section state only what the entries measured - [x] No emojis, private paths or internal jargon ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary content ## Breaking changes The release carries #1128's removal of unused public API; "Upgrading from 0.10" lists what a user changes.
…eporter's files (#1147) ## Summary The 0.11.0 release introduction, the README's release section, the status page and the roadmap stated the #421 and #1075 fixes without the caveat their own changelog entries carry: neither is measured yet on the files that showed the problem, which are private. Each now says what was measured. ## Motivation A side agent flagged it after the release. The entries themselves are accurate. #1081's entry says "Not yet measured on an affected file", and #1075's says "Not measured on the reporter's files, which are private". The summaries written for the release dropped those words. ## Changes - `CHANGELOG.md`: the [0.11.0] introduction now says the following, with the paragraph rewrapped. - #1075 is measured by lowering the limits below the reference files' streams (Core Interior's 17 MB partition against an 8 MiB limit, `tests/resource_limits_cli.rs`), and no model over the default limits has been read with `--large-model`. - #421 is measured only on the reference and sample files, none of which keeps an older schema. - `README.md`: the same caveat on both bullets of "Release 0.11.0 and main". The README packed into the 0.11.0 crate on crates.io cannot be edited; this fixes the repository copy, and the next release ships it. - `docs/status.md`, `ROADMAP.md`: the same in their 0.11.0 lines. The GitHub release page for v0.11.0 is updated from this section once it lands. I am also asking the reporter, hemanth1986, on #421 and #1075 to try 0.11.0 on the affected files and report counts only. ## Testing N/A: docs only. The evidence named is in `tests/resource_limits_cli.rs` and in Measure run 40928760469 (#1081's 58 sample projects). ## Audit-honesty checklist - [x] Docs state only what was measured - [x] No changelog fragment: this corrects a released section - [x] No emojis, private paths or internal jargon ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary content ## Breaking changes None.
Summary
A file that kept an older release's schema is now read as that release (#421).
schema_releasenames the release the file's schema belongs to, andRevitFile::layout_releasegives it to the readers when it is older than the release that saved the file. A schema that matches no measured release still reads nothing.Motivation
A field report on #421 tested 49 project files saved by Revit 2024 to 2027. 25 of them carried an older release's element-record marker, and all 25 read as zero elements and zero Levels:
3c01ffffffff8205or2901ffffffff4805.file_bbox_markerrefuses a schema marker that differs from the saving release's constant, and the Level, type-record and name readers use the saving release's constants too.The report treated the second pair of markers as unknown, but they are Revit 2023's and 2022's:
OutlineandElementParentsare0x013cand0x0582in 2023's schema, and0x0129and0x0548in 2022's. The files' histories start in 2014 to 2020, which fits. Those releases write the 32-bit records thatpartition_element_records_2023reads. So accepting their markers infile_bbox_markeris not enough: the whole file has to be read as its schema's release.Changes
src/partition_element_records.rs:schema_release. A 2024 to 2027 schema is matched by itsbbox_marker; a 2015 to 2023 schema is matched by itsschema_tags.Nonewhen nothing matches.src/partition_element_records_2023.rs:file_schema_tags, theSchemaTags32of the file's own schema.src/reader.rs:RevitFile::layout_release(memoised). It gives the schema's release when that is older thanBasicFileInfo's version, and the saving release otherwise.The readers that took
BasicFileInfo's version now takelayout_release:src/partition_names.rs,src/partition_phases.rs,src/partition_scanner.rs,src/partition_arc_walls.rs,src/partition_design_options.rs,src/partition_connector_pairs.rs;src/native_document.rs,src/native_element_parameters.rs,src/native_family_forms.rs;compute_second_prologue_ids;src/ifc/mod.rs: the Level storeys, the ArcWall path, the instance transforms and the diagnostics' scans.Metadata, reports, the doctor, the export's "Revit N export" description and the door GlobalId suffix (which follows the exporting Revit) keep the saving release.
examples/probe_421_schema_marker.rs: printsschema_releaseandlayoutfor each file, andscannedis the marker the readers now get.docs/compatibility.md(known limitations) andchangelog.d/fixed/schema-marker-release.md.Testing
Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.
tools/check-local.shpasses (fmt, clippy, rustdoc, build, real-file / CLI / contract checks)tools/check-local.sh(required gates): "check-local: all requested gates passed";cargo test --test integration297 passed;cargo clippy --all-targets --all-features -- -D warningsclean.cargo +1.87 check --profile ci --all-targets(the MSRV job) passes.cargo run --profile ci --example probe_421_schema_marker -- <files>on the local files of 2015 to 2027 (Autodesk's sample projects and templates, the BIM4LCA models and the other files Measure reads, plus local ones): on all 120,schema_releaseis the saving release, for every release from 2015 to 2027. Solayoutis the saving release on each, and nothing they read can change.rvt-ifcon 132 local files of 2008 to 2027 with this branch and withmainat e5846fe, leaving out the timestamp lines. All 132 exports are byte-identical, including Core Interior (2024) and every pinned sample at hand.tools/bench.shand attached the before / afterlayout_releasereads the memoised schema once per file.Maintainer integration (rebased on main 2026-10-29)
release_supportfollows the release the file is read as, so a 2025 save with a 2022 schema is reported as 2022's experimental support, not 2025's.elem_table::layout, and a warning whenGlobal/ElemTablefalls back to the implicit layout. Both record readers drop records whose ElementId is not declared there, so a file on the fallback still reads none; the field report saw that on 5 of its 8 files with a 2022 or 2023 schema, so this PR alone likely leaves those 5 empty.probe_421_schema_markerprintselem_table(stated count, layout taken, and for 28 and 40 bytes the rising ids, the first drop and whether the count fits): counts and indices only, for the reporter to post.29 01 ff ff ff ff 48 05, 20233c 01 ff ff ff ff 82 05, which are the field report's two unknown markers); all 58 sample exports and Core Interior byte-identical to main. Not measured on any affected file: none is in any corpus.Audit-honesty checklist
docs/compatibility.mdsays the change is unmeasured here, and that the counts are the field report's.changelog.d/<section>/(seechangelog.d/README.md), not inCHANGELOG.mdchangelog.d/fixed/schema-marker-release.md;tools/release/changelog.py checkpasses.examples/and a dated addendum todocs/rvt-moat-break-reconnaissance.mdare includedprobe_421_schema_markergains the two fields the reporter can run.Legal and contribution hygiene
CONTRIBUTING.md)CLEANROOM.md)testuser,111111,FY-20XX, etc.) and contain no real-world PIIBreaking changes
None.
RevitFile::layout_release,schema_releaseandfile_schema_tagsare added; no signature changes. On a file whose schema is its own release's, every reader gets the release it got before.Screenshots or output samples
A file of the kind reported would show, for example,
"release":2026,"schema":"46 01 ff ff ff ff ab 05",…,"scanned":"46 01 ff ff ff ff ab 05","schema_release":2024,"layout":2024, wheremaingives"scanned":null.Related issues
Refs #421 (item 1 and the field report on
file_bbox_marker's fail-closed rule).