Skip to content

feat(partitions): confirm the element-record marker from the file's own schema (#421) - #506

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/schema-record-marker
Sep 28, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/schema-record-marker

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

This is #421's first acceptance item. The element-record marker is [tag of Outline][0xFF×4][tag of ElementParents] in the file's own schema (RE-80), and on every 2024 and 2025 file we hold the record header's constant is the ElementHeader tag (measurement on #421). The new partition_element_records::file_bbox_marker(rf, release) does two things:

  • It returns the release's measured constant only when the file's schema gives the same marker.
  • It fails closed when they differ.

When the schema doesn't parse, it keeps the constant. The three scan entry points that hold the file, and compute_design_options, now use it. schema_bbox_marker exposes the schema's own marker.

Which releases are read is unchanged: admitting 2026 or pre-2023 still needs a project with Revit's export.

Measured

  • IFC output is byte-identical to main (apart from the header timestamp) on Core Interior, RE1 Architecture, RE1 Electrical, Snowdon Towers Architectural and Projeto1.
  • Local gate: fmt, clippy, doc, MSRV 1.85, fuzz check, integration tests, and the corpus run.

Note

Medium Risk
Changes how partition scans choose the record-finding marker (fail-closed on schema mismatch); behavior is unchanged on measured 2024/2025 files but wrong-marker files stop scanning entirely.

Overview
Partition element scanning no longer trusts only per-release measured bbox markers. file_bbox_marker returns the release constant when the file's Formats/Latest schema agrees (Outline + 0xFF×4 + ElementParents, RE-80); if the schema parses and disagrees, scanning is skipped instead of using the wrong marker. Unparseable schema still uses the measured constant.

schema_bbox_marker exposes the schema-only marker. compute_design_options, compute_second_prologue_ids, scan_unattributed_frames, and scan_category_records_multi now call file_bbox_marker instead of bbox_marker alone. Supported releases and measured 2024/2025 exports stay byte-identical.

Reviewed by Cursor Bugbot for commit cc07ef3. Configure here.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 28, 2026 18:12
@cursor

cursor Bot commented Sep 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_65cdc7ed-0527-48ed-87cf-e80697ff48ef)

@DrunkOnJava
DrunkOnJava merged commit 7c01125 into main Sep 28, 2026
20 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/schema-record-marker branch September 28, 2026 18:16
DrunkOnJava added a commit that referenced this pull request Sep 28, 2026
…tifacts (#507)

## Summary

v0.4.0 is published. This updates the docs that described 0.3.0 as
current:
- **`docs/install.md`:** the channel table and how each channel was
checked.
- **README:** "Release 0.4.0 and main", with only #506 on `main` since.
The 2023 row now says "since 0.4.0" instead of "on `main`, not in
0.3.0".
- **`docs/status.md`, `docs/supported-profile.md` and
`docs/python.md`.**

## How each channel was verified (2026-09-28)

- **crates.io:** `cargo install rvt --version 0.4.0 --locked` into a
clean root. `rvt-ifc` on modelo_bim (Revit 2023) writes its 8 beams,
with `rvt-rs 0.4.0` in the header.
- **PyPI:** `pip install rvt==0.4.0` in a clean venv. `write_ifc()` on
RE1 Architecture writes 7 walls and 11 spaces.
- **GitHub archive (macOS arm64):**
  - The `SHA256SUMS` line checks and `gh attestation verify` passes.
- Core Interior: 992 elements, all with bodies, and 116 spaces with
Revit's number and name.
- Exemplo_data (2023): 56 elements, and 9 of 9 rooms with Revit's number
and name.
- **ghcr.io:** `ghcr.io/drunkonjava/rvt-rs:0.4.0` is linux/amd64 and
linux/arm64, and `rvt-info` reads RE1 Architecture.
- **Viewer:** the deployed bundle carries 0.4.0.
- **docs.rs:** 0.4.0 is in the docs.rs build queue. The doc is worded so
it doesn't claim a finished build.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation-only version and release-status updates; no runtime or
API code changes.
> 
> **Overview**
> **Docs now treat v0.4.0 (2026-09-28) as the current release** across
README, install guide, Python docs, status, and supported
profile—replacing v0.3.0 links, dates, and channel tables.
> 
> The **README** reframes "Release 0.4.0 and main": shipped highlights
(Revit 2023 typed elements, rooms, openings, steel, IFC types, locale
names) and points upgraders to the changelog; **`main` since 0.4.0** is
only schema-confirmed element-record marker (#421). The Revit 2023
capability row says **"since 0.4.0"** instead of "on `main`, not in
0.3.0".
> 
> **`docs/install.md`** bumps every distribution channel to **0.4.0**
and replaces the post-publish verification narrative (cargo/PyPI/macOS
archive/ghcr/viewer smoke tests; docs.rs wording no longer claims a
finished build). The Python platform table groups **0.3.0 and 0.4.0**
wheel coverage.
> 
> **`docs/status.md`** roadmap: v0.4.0 is latest with artifact
verification; v0.3.0 is previous; unreleased work is ahead of 0.4.0.
**`docs/supported-profile.md`** and **`docs/python.md`** get matching
version and 2023-support wording.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
a3ffb92. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Sep 28, 2026
…he schema's marker (#421) (RE-124) (#508)

## Summary

This is the first measurement of a Revit 2026 project against Revit's
own export. The file is the public flowbim.ee single-dwelling house
(STE1200's pointer in Discussion #112; local only, no licence stated),
with Revit's own IFC4X3 export (Revit 26.4).

- **Marker:** `61 01 ff ff ff ff f1 05`, from the file's own schema
(#506). The tail is the `0x05f1` RE-32 predicted; the ElementHeader tag
is `0x5e5`.
- **Instance rule:** the 2024/2025 decode with the RE-21 rule gives 88
placed instances. All 88 are in Revit's export, and every category lands
on Revit's class. The 27 missed are chain-attributed frames.
- **Trial admission** (not in this PR): the record chain recovers all 59
walls and 8 slabs, 85 elements with no false positive. Admission is held
back by three measured problems:
  - doors and windows come out as bare openings with no host;
  - the storeys are not the model's;
  - rooms are unnamed.

This PR adds only the probe, the scorer
(`tools/re/instances_vs_ifc_tags.py`), the report
`reports/element-framing/RE-124-revit-2026-element-records.md`, a
reference-models update and a CHANGELOG research note. The release gate
is unchanged.

## Checks

Clippy on the probe (`-D warnings`) and MSRV 1.85 pass. No library code
changes.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation and measurement tooling only; no production decode or
export paths change.
> 
> **Overview**
> Documents the first measured Revit **2026** element-record behaviour
on the public flowbim.ee house (RE-124, #421). **No exporter or library
changes** — the release gate for 2026 stays as-is.
> 
> Adds **`examples/probe_re124_revit_2026_records.rs`**, which scans
partitions with the schema-derived bbox marker and the existing RE-21
placed-instance rule, and **`tools/re/instances_vs_ifc_tags.py`**, which
scores those ElementIds against numeric Tags in Revit's IFC export. The
new report
**`reports/element-framing/RE-124-revit-2026-element-records.md`**
records that the predicted marker matches the file schema, the 2024/2025
frame decodes, and **88 placed instances all appear in Revit's export**
(with 27 export elements missed on the first-prologue-only path). It
also lists why 2026 is not admitted yet: doors/windows as bare openings,
wrong storeys, and unnamed rooms.
> 
> **CHANGELOG** gains a Research note; **`docs/reference-models.md`**
marks the 2026 candidate as measured locally.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f471bed. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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