Skip to content

feat(native): the native record path reads Revit 2025 and 2026 (B46, #328) - #676

Merged
DrunkOnJava merged 3 commits into
mainfrom
feat/b46-native-phases
Oct 4, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
feat/b46-native-phases

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

native_document::extract admitted only 2023, 2024 and 2027 (framing unvalidated elsewhere). With the gate opened on re/b46-native-2025, every framing, record-count and body-size check holds on all nine 2025 files (RE1 x4, Autodesk's five samples) and all five 2026 samples (Measure runs 37226017160, 37227895778), and each element body carries m_createdPhaseId and m_demolishedPhaseId. The gate now admits 2023 to 2027.

Red on draft #675 (run 37228615540); the output is in the test commit.

B38 follows from it: RE1 Plumbing's tank 442378, which Revit's export leaves out, was created in New Construction (3), is demolished in no phase and is in the main model, so phase is not why it is left out.


Note

Medium Risk
Changes which Revit file versions are accepted on the native framing/extraction path; incorrect assumptions could affect record parsing for 2025/2026 files, though the change is paired with corpus validation.

Overview
Extends the native record extraction path to Revit 2025 and 2026 by widening the version guard in native_document::extract_records from an explicit 2023 | 2024 | 2027 list to 2023..=2027, with a matching doc note in native_index for the five-field ElemTable contract.

Adds a corpus-backed integration test (tests/native_phases.rs) that runs native_document::extract on RE1 2025 models when RVT_PROJECT_CORPUS_DIR is set, and asserts exported FamilyInstance elements expose m_createdPhaseId / m_demolishedPhaseId in projected metadata (created phase must exist in the file’s ProjectPhase set; demolished must be -1). Registers native_phases in tools/ci/test-targets.txt so CI runs it with other real-file targets.

Reviewed by Cursor Bugbot for commit 91fefee. Configure here.

… demolished phases (B46)

An element's phases are its native fields m_createdPhaseId and
m_demolishedPhaseId (RE-160). tests/native_phases.rs requires
native_document::extract to complete on the four RE1 models (Revit 2025)
and every family instance Revit's export holds to have been created in one
of the file's ProjectPhase elements and demolished in none (-1).

Red on main (draft #675, run 37228615540, "Corpus health (tier 2)"):

  panicked at tests/native_phases.rs:67:33:
  RE1 Architecture: extract: native record framing is unvalidated for Revit 2025
…328)

native_document::extract admitted only 2023, 2024 and 2027 because its
framing was unvalidated elsewhere. With the gate opened on a research branch
(re/b46-native-2025), every framing, record-count and body-size check holds
on all nine 2025 files (RE1 x4 and Autodesk's five samples) and all five
2026 samples (Measure runs 37226017160 and 37227895778), and each element
body (channel 102) carries m_createdPhaseId and m_demolishedPhaseId. The
gate now admits 2023 to 2027.

Nothing in RE1 or Core Interior is demolished; RE1 Plumbing's tank 442378,
which Revit's export leaves out (B38), was created in New Construction (3)
and is in the main model, so phase is not why it is left out.
@DrunkOnJava
DrunkOnJava merged commit 0dd13e0 into main Oct 4, 2026
24 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/b46-native-phases branch October 4, 2026 19:51
DrunkOnJava added a commit that referenced this pull request Oct 4, 2026
…ive path took 2025 and 2026 (B77) (#677)

#676 opened the native record path to Revit 2025 and 2026.
saved_meshes::attach reads saved scenes through it, so --saved-meshes
(opt-in, experimental) would now replace 2025/2026 family-instance boxes
with scenes no run has compared with Revit's export (RE-78 measured Core
Interior and Snowdon, both 2024). attach now declines releases other
than 2023, 2024 and 2027, which is exactly the set it read before #676;
the export keeps its bodies and says why. Measuring the saved scenes on
RE1 (2025) and the 2025/2026 samples is B77.

No new test: this restores the behaviour before #676 on an opt-in path,
and a test of the release list would only detect the change.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low-risk guard on an opt-in experimental path; it only rejects
previously unsupported 2025/2026 behavior rather than changing default
export.
> 
> **Overview**
> **Restricts `--saved-meshes` to Revit versions whose saved graphics
were validated against export** (2023, 2024, 2027).
> 
> `saved_meshes::attach` now reads `basic_file_info().version` and
**fails early** with `saved graphics are not measured on Revit
{version}` for any other release. That blocks 2025 and 2026, which the
native reader can open since #676 but whose saved scenes are not yet
benchmarked (B77); those files keep record bounding-box bodies instead
of swapping in unmeasured meshes.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
85db455. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Oct 4, 2026
…679)

BACKLOG.md: statuses for B45, B46, B54, B55, B56, B60, B64, B68, B70 and
B71; new rows B72 to B77; the afternoon's progress log (red and green
runs, Measure evidence, the B38 and B47 findings, rule notes).

CHANGELOG.md [Unreleased] stopped at #592 (B76). It now has an entry for
each user-visible change since, through #677, grouped as the file groups
them (Added, Changed, Fixed, Research).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Markdown-only updates to BACKLOG and CHANGELOG; no application, test,
or CI logic changes in this diff.
> 
> **Overview**
> **Documentation-only (B76):** brings maintainer backlog and public
release notes in line with session 3 work already merged in other PRs—no
runtime or exporter code changes.
> 
> **`BACKLOG.md`** updates the ranked table (e.g. B45–B46, B55–B56, B60,
B64, B68–B71 marked **done**; B47 **blocked** on MEP-sample evidence;
B54 **in progress** on #673). It adds backlog rows **B72–B77** (type
GlobalIds, `typed-no-geometry` gap, 2024 ordinals, changelog debt,
`--saved-meshes` gating). A new **Session 3, afternoon** progress log
records PRs, CI runs, Measure evidence, and rule notes; **Findings** are
revised (B38 phase refutation, B55 opening, B74/B77).
> 
> **`CHANGELOG.md` `[Unreleased]`** is extended from #592 through
**#676**: **Added** (wall-profile opening, native 2025/2026 + phases,
railing types, duct/pipe end ports, type GlobalIds, curtain
doors/materials, space containment, MEP systems, parameters/CLIs, etc.),
**Changed** (single export walk B71, MEP export perf B70, witness slim
step B27), **Fixed** (`--saved-meshes` scope B77, `rvt-write` B69,
diagnostics B49), and **Research** entries for RE-155–RE-168 and corpus
pins.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
5f1e5fe. 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