Repository navigation
Re #421 schema marker - #1033
Conversation
|
Thank you, this closes #421's first item cleanly: the marker comes from each file's schema, the constant is the cross-check, and a disagreement fails closed. CI failed only because I've dispatched Measure on the new head against One note, not a blocker: |
DrunkOnJava
left a comment
There was a problem hiding this comment.
Measure 40322858460 on f82916a0 against main at 8bc87a5: all 89 exports (the reference models, the BIM4LCA office, the 23 R2025 models and Autodesk's 58 samples from 2015 to 2027) byte-identical, all 70 rvt-info outputs (the families included) and the 58 samples' diagnostics identical, and Core Interior's witness observations unchanged. So on every file we can measure, the schema's marker is the constant, as your probe found on your 84. Thank you; it lands once CI passes.
… file's own schema, cross-checked against the measured constant (DrunkOnJava#421) Every scan that needs the bbox marker (element names, stair names, type records, Level records) now takes it from file_bbox_marker, which returns the marker the file's schema gives (RE-80) and checks it against the release's measured constant: a file whose schema gives another marker is not scanned, one whose schema does not parse keeps the constant. supports_revit_version no longer depends on a constant being recorded. On all 84 2024 to 2027 files measured (5, 68, 4 and 7) the schema's marker equals the constant, and its ElementParents tag less 12 is the schema's ElementHeader tag. On 2016 to 2018 that gap is 9, so record_prologue_constant holds only from 2019; its doc says so. tests/schema_bbox_marker.rs pins both on the phi-ag families and the project corpus; examples/probe_421_schema_marker.rs prints the per-file measurement. The hollow-section reader (DrunkOnJava#980) asks supports_revit_version too.
3dcde17 to
964fc57
Compare
|
Thanks for this. The branch's two commits weren't signed, and |
## Summary Prepares the 0.9.0 release (RELEASE.md steps 4 to 8): the version in every file that carries it, the changelog's `[0.9.0]` section assembled from the 30 fragments with its introduction and "Upgrading from 0.8", `CITATION.cff`'s version and date, the release-please manifest, and the README's release section. Merging this is not the release: the signed `v0.9.0` tag on its squash commit is. ## Changes - Version 0.9.0: `Cargo.toml`, `rvt-py/Cargo.toml` and its `=` pin, `rvt-wasm/Cargo.toml`, `tools/stream_evidence/Cargo.toml`'s pin, `CITATION.cff`, `.release-please-manifest.json`, `viewer/package.json`, and the rvt crates' entries in `Cargo.lock` and `fuzz/Cargo.lock`. - `CHANGELOG.md`: `python3 tools/release/changelog.py assemble`, then the `[0.9.0] — 2026-10-26` section, crediting puzzbobb (#1033). - `README.md`: `## Release 0.9.0 and main`. - Core Interior's witness observations and verdicts from this PR's CI run (the IFC header carries the version), in a follow-up commit. ## Testing - `python3 tools/release/changelog.py check` and `tools/ci/api-doc-ids.py` pass locally; CI runs the rest. - Nothing else changes: every export on `main` was measured in its own PR. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR (install.md, status.md and python.md move after the channels are verified, as RELEASE.md's Post-release says) - [x] Changelog assembled; no fragment left - [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] Apache-2.0 - [x] No Autodesk proprietary content - [x] No fixtures ## Breaking changes None.
|
This shipped in v0.9.0, credited in its changelog. Thanks again. |
Acceptance item 1 of #421: "
bbox_markerderives the marker fromRevitFile::schema_classesand is cross-checked against the 2024 and 2025 constants". On all 84 2024 to 2027 files I have, the marker from each file's own schema equals the release's constant.What changes. Every scan that needs the bbox marker now gets it from
file_bbox_marker(rf, release):schema_bbox_marker, RE-80:[tag of Outline][0xFF x4][tag of ElementParents]).bbox_marker) is the cross-check. If the schema and the constant disagree, the file isn't scanned (fail closed).supports_revit_versionno longer depends on a constant being recorded. It is only the proven-shape list (2024 to 2027).file_bbox_markeralready existed, but it returned the constant, and only some scans called it. Before this patch, these callers read the per-release table directly:partition_names::compute_element_namespartition_schema_mvp::attach_stair_namespartition_type_records::scan_type_recordspartition_level_records::level_records(64-bit path)partition_type_parameters/partition_type_materials, which only use it as a "supported?" test and now callsupports_revit_versionThe
BBOX_MARKER*constants andbbox_markerstay as the cross-check table. The 2024-only legacy helpers that take&BBOX_MARKERare left alone.Measurement. The probe below, on 93 files (the phi-ag/Autodesk samples, Core Interior, the RE1 set, Einhoven and 68 2025 projects):
ElementHeaderfile_bbox_marker46 01 ff ff ff ff ab 0559 01 ff ff ff ff d3 0561 01 ff ff ff ff f1 0564 01 ff ff ff ff 10 06On every one of the 84 files,
record_prologue_constant(schema marker)(ElementParents x12) is the schema'sElementHeadertag, theu16that each record chain header carries (RE-35).One finding for older releases. That a 12 rule doesn't hold before 2019:
This is harmless today, because the 32-bit path (
partition_element_records_2023) takes the header tag from the schema. Butrecord_prologue_constantshouldn't be used for a 2016 to 2018 file. The patch says so in its doc comment, and the test below pins the gap on each 2016 to 2023 family.Test.
tests/schema_bbox_marker.rs(registered intests/integration/main.rsandtools/ci/test-targets.txt) asserts three things on each file:bbox_marker(release);file_bbox_markerreturns it;ElementHeader.It runs on the 2024 to 2026 phi-ag families (
RVT_SAMPLES_DIR, so CI runs it) and on every project inRVT_PROJECT_CORPUS_DIR. A third test checks the ElementParents − ElementHeader gap on the 2016 to 2023 families: 9 on 2016 to 2018, 12 from 2019. All three skip absent files.Checks, on
3d2df24, with the changelog fragmentchangelog.d/changed/re421-schema-marker.md:--check: clean;--all-features -D warnings(lib, integration, probe): clean;cargo checkwith-D warnings -D unnameable_types: clean;cargo test -p rvt --lib --test integrationon the local corpora: 134 + 290 passed, the one failure being the stale test below;tools/check-local.sh: all gates passed.Also in this PR: a stale test. On the full suite one test failed, on unpatched
3d2df24too:elem_table_corpus::declared_element_ids_returns_sorted_deduped_set. Since #553 and #559 the declared ids include the table's first record, at0x06, which on Einhoven is id 0, but the test still expected the first id to be 1. CI hadn't caught it becausetools/ci/test-targets.txtskipped the test by name (added in #428, before the fix). The second commit makes the test expect ids 0 and 1 first and removes the skip, so CI runs it again. All sixelem_table_corpustests pass.Still per-release tables:
elevation_marker;record_marker(revit_version)table.level_recordsno longer uses it on the 64-bit path, but it's still pub.schema_elevation_markerexists, so the same change could be made for those. Also,schema_classesisn't memoised, so each scan re-reads the schema. That costs about 0.1 s per file in a debug build (Core Interior 0.10 s, Snowdon 0.14 s), which is small, but caching it onRevitFilewould be a tidy follow-up.Probe:
examples/probe_421_schema_marker.rs(one JSON line per file)