Skip to content

feat(ifc): a room whose own phase is not the export phase is left out and counted, and rvt-ifc --phase names the export phase (#1194) (RE-326) - #1328

Merged
DrunkOnJava merged 13 commits into
mainfrom
re-326-room-phases
Nov 4, 2026
Merged

DrunkOnJava merged 13 commits into
mainfrom
re-326-room-phases

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

A room whose own phase (RoomElem.m_phaseId, RE-326) is not the export phase is left out, as Revit's exporter leaves it out (revit-ifc IsRoomInInvalidPhase), and counted in the diagnostics' skipped as room_not_in_export_phase with the phase it sits in. The export phase is the project's last, or the one the new rvt-ifc --phase <name|id> names; the RE-184 status rule for the other elements reads the same export phase. Griffin chose this rule ("Last phase + --phase", 2026-11-04). It changes the export of models with a room outside the last phase only: expected, Autodesk's rac_basic_sample_project (14 rooms, Revit 2016 on), none of the 12 models that have a Revit export.

Motivation

The "Rooms and phases" item of #1194. Revit's exporter skips a room whose phase is not the export phase, and rvt-rs applied no phase rule to rooms because no model showed where a room's phase is stored.

Changes

  • src/research/native_phases.rs: compute_phase_filter reads m_phaseId of every RoomElem record and each phase's name in its existing pass; PhaseFilter carries the export phase, and excludes, room_outside_export_phase and the RE-184 exclusions take it from there (with_export_phase, find_phase).
  • src/reader.rs: RevitFile::set_export_phase(&str) (new public method); src/error.rs: Error::InvalidInput, appended to the #[non_exhaustive] enum.
  • src/bin/rvt_ifc.rs: --phase <NAME|ID>; an unknown value is an error that lists the file's phases. The summary names the rooms left out.
  • src/ifc/mod.rs: SkippedExportItem.phase (new, optional) and the room_not_in_export_phase items; --anonymize replaces the phase name. viewer/src/main.ts does the same in its anonymised download.
  • docs/schemas/export-diagnostics.schema.json, docs/export-diagnostics.md, docs/user-guide.md: the new reason, field and flag.
  • tests/cli_real_files.rs: an end-to-end check of --phase on RE1 Architecture (default, by name, by ElementId, the first phase, an unknown phase).
  • Probes probe_re326_room_phases.rs, probe_re326_phase_census.rs; scorers room_phases_vs_ifc.py, phase_census_vs_ifc.py, spaces_by_globalid_vs_ifc.py.
  • reports/element-framing/RE-326-room-phases.md, docs/format-reconnaissance.md (addendum), changelog.d/changed/1194-room-phases.md, and the sentence about rooms in README, ROADMAP, docs/status.md, rooms.md, evidence.md, reference-models.md, supported-profile.md.

Testing

Unit tests are banned in this repository: none added. Measured end to end with Measure.

  • tools/check-local.sh passes: not run locally (no local builds here); the draft's fast CI jobs are the check
  • Verified end to end on real Revit files, with the probes that reproduce it:
    • Measure run 41776212669, ref 0d12ba0e271b04ebd26831a2679c47766bd268aa (-f probe=probe_re326_room_phases -f probe_scorer=room_phases_vs_ifc -f scorers=none -f nordic=true -f r2025=true -f samples=true -f bimcollab=true): a room's phase is RoomElem.m_phaseId on Revit 2015 to 2027 (its created phase is unset); the 621 rooms of the 12 models with a Revit export are all in the last phase and all in Revit's export; Autodesk's rac_basic_sample_project has 14 rooms in the second of three phases on all 13 releases.
    • Measure run 41779363950, ref ecfc16b3677dce5ec6d014c9718c7c1826272dff, scored with tools/re/phase_census_vs_ifc.py against a public Revit 2018 IFC4 export of that sample (exporter 17.4.0.0, SourceForge ifcexporter wiki attachment, sha256 1114ce918f64885bd87ec3bc670c4c543a90898d1bf7e701fb8fbf95e5b5ea35, used locally, not committed): it holds all 14 rooms and all 438 of the project's elements by Tag; nothing in the project is created or demolished in the last phase, so the elements do not say which phase that export used.
    • Measure runs 41784415396 (default) and 41784419457 (-f ifc_flags="--phase 86961"), ref 4532731d535663010438c2b5c00ace97dafc38a3, -f samples=true -f sample_years="2018 2018" -f keep_ifc=true, scored with tools/re/spaces_by_globalid_vs_ifc.py against the Revit 2018 export above: rac_basic's default export writes 0 IfcSpace and the diagnostics hold one room_not_in_export_phase item (14 rooms, phase "Working Drawings"); --phase 86961 writes 14, all 14 in the export's 17 by GlobalId, and no other entity count changes (450 against 464 entities in all).
    • The unfiltered Measure, run 41784044966 (main against ref ecebf060a9c8684edc9c931ae80974036786d760, -f base=main -f nordic=true -f r2025=true -f samples=true -f holdout=true): of 111 exports, 12 moved, the rac_basic_sample_project saves of Revit 2016 to 2027 (the schema scorer's sets 476 to 462 on 239 to 225 objects, 14 rooms in each); the other 99 are byte for byte as before by ifc.sha256, the held-out models (counts only) included, which is their regression check under W5. The Revit 2015 save does not move (Phase rules on Revit 2015 #1332). A last exports-only check on the final head 8c120f22873d758c680c72c0690f3c778be1dffb (-f base=main -f scorers=none -f nordic=true -f r2025=true -f samples=true -f holdout=true) is run 41785850795; its ifc.sha256 must match the head side of run 41784044966 on all 111 exports (the code is that of 4532731d, plus documentation).
  • The witness verdicts replay: no Core Interior observation moves (its 116 rooms are in the last phase), to be confirmed by the unfiltered run
  • Not a performance change; the pass that reads the phases reads two more classes (ProjectPhase, RoomElem), a few hundred small records

Audit-honesty checklist

  • README / docs reflect the current state after this PR: the rule is stated, and stated as unmeasured against a Revit export made with the default setup
  • A user-visible change has its entry as a fragment under changelog.d/changed/
  • A limitation was narrowed, not resolved: "Rooms and phases" is updated everywhere it was stated
  • The new limitation is in the PR body and the code: no project in the corpus has a room outside its last phase and a Revit export made with the default setup, so the default (the last phase) is revit-ifc's documented behaviour, checked on no export; the export setup's phase and a view's are not read, --phase is how they are given; Python and the viewer take the default (a phase option for them is a follow-up); Revit 2015 and earlier write every room, because both phase rules start at Revit 2016 (follow-up Phase rules on Revit 2015 #1332)
  • Commit messages describe what changed and why
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files
  • Reverse-engineering finding: probes under probes/examples/ and a dated addendum to docs/format-reconnaissance.md

Why Areas and MEP spaces are not filtered: revit-ifc checks a Room only; an Area (its m_phaseId is unset) and an MEP space are exported whatever their phase, and Revit's export of the BIM4LCA office holds all 30 of its Areas.

The visible change on a measured file: Autodesk's rac_basic_sample_project loses its 14 rooms by default and gets them back with --phase "Working Drawings". A public Revit 2018 export of it holds the 14, so the default is the one place the rule may disagree with an export made by someone with another setup.

Commit 9f59ca6 (the first probe commit) cites #1324 by mistake, which is the MCP server issue; the work is for #1194. The history is not rewritten, so the squash message must carry #1194 only.

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0
  • This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content. Clean-room contributor declaration: the only Autodesk-authored material read is the open-source revit-ifc exporter (CLEANROOM.md source 5), at ElementFilteringUtil.IsRoomInInvalidPhase, Exporter.ExportSpatialElements, ExportOptionsCache.Create and IFCExportConfiguration, in the SourceForge ifcexporter v17.4.0 (r126), IFC_v19.2.0 and master; it is cited by file and class and no code is copied or translated. The field m_phaseId was found by reading the bytes of Autodesk's public sample projects and the schema in the files themselves. The third-party IFC export is read locally and not committed or redistributed.
  • No test fixtures added

Breaking changes

None. RevitFile gains set_export_phase, Error a variant (the enum is #[non_exhaustive]), the diagnostics' skipped items an optional phase, and PhaseFilter (behind unstable-research) fields; the exported IFC changes only for a model with a room outside its last phase.

Screenshots or output samples

rvt-ifc RE1-Architecture.rvt --phase Nonexistent: error: the file has no phase named or numbered "Nonexistent"; its phases are "Existing" (ElementId 12589), "New Construction" (ElementId 86961) and exit status 1.

Related issues

Refs #1194.

… and counted, and rvt-ifc --phase names the export phase (#1194) (RE-326)
@DrunkOnJava DrunkOnJava changed the title research(rooms): a room's phase is RoomElem.m_phaseId, and a room in an earlier phase than the last is written and counted (#1194) (RE-326) feat(ifc): a room whose own phase is not the export phase is left out and counted, and rvt-ifc --phase names the export phase (#1194) (RE-326) Nov 4, 2026
…--phase help says a name wins over an ElementId, and the module doc states the rac_basic result as expected (#1194) (RE-326)
…them with --phase, measured against the Revit 2018 export (#1194) (RE-326)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 06:36
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 4, 2026 06:36
@DrunkOnJava
DrunkOnJava merged commit fadd80b into main Nov 4, 2026
29 checks passed
@DrunkOnJava
DrunkOnJava deleted the re-326-room-phases branch November 4, 2026 06:45
DrunkOnJava added a commit that referenced this pull request Nov 4, 2026
…rvt-wasm and rvt-rs-mcp write from (#1331) (#1341)

## Summary

One library function, `rvt::ifc::run_export`, builds the model `rvt-ifc`
writes, and `rvt-ifc`, `rvt-gltf`, `rvt-py`, `rvt-wasm` and `rvt-rs-mcp`
all call it; the copies of the steps are deleted. `rvt-rs-mcp` gains a
`phase` argument through it.

## Motivation

Closes #1331. The steps (exporter, project phase, saved-graphics bodies,
Revit property sets, set placement, base-quantity switch, unread-stream
record) were written out five times, and #1328's `--phase` existed only
in `rvt-ifc`. Refs #1339: the export phase in Python and the viewer
rides on `ExportOptions::phase`.

```rust
rvt::ifc::run_export(&mut rf, &ExportOptions) -> Result<ExportRun>
rvt::ifc::run_export_with_limits(&mut rf, &ExportOptions, WalkerLimits)
rvt::ifc::run_export_with_limits_and_control(&mut rf, &ExportOptions, WalkerLimits, &WalkerControl)
```

Named as the exporters are (`export_with_diagnostics`, `..._and_limits`,
`..._mode_limits_and_control`).

- `ExportOptions` (non-exhaustive; `Default` is `rvt-ifc` with no
switch; `with_*` setters): `kind` (`Document`, `DiagnosticProxies`,
`Placeholder`), `mode`, `saved_meshes` (`Default`, `All`, `Off`),
`revit_property_sets`, `revit_set_placement`, `no_base_quantities`,
`phase`.
- `ExportRun { model, diagnostics, unread, notes }`. The diagnostics
already count the saved meshes, the placement, the base quantities and
the unread streams.
- `ExportNote` is an enum of what the steps report, with their numbers
as fields (`SavedMeshes { scope, candidates, replaced, partial,
triangles }`, `RevitPropertySets { .. }`, `RevitSetPlacement { .. }`,
`BaseQuantities { left_out }`) and a `...Skipped { error }` variant for
each step that could not run. Its `Display` is the sentence `rvt-ifc`
prints, so there is one source for the text; `skipped()` returns the
error of a skipped step.
- Order, as in `rvt_ifc.rs`: phase, exporter, saved graphics, Revit
property sets, set placement, base quantities, unread-stream record. The
mode's validation stays with the caller.
- `RevitFile::export_phase(&self) -> Option<i64>` reports the ElementId
`set_export_phase` resolved from a name or a number (`None` while the
last phase is in effect). `set_export_phase` keeps its signature from
#1328.

## Changes

- `src/ifc/export_pipeline.rs` (new), re-exported from `rvt::ifc`.
- `src/bin/rvt_ifc.rs`, `src/bin/rvt_gltf.rs`: build `ExportOptions`
from their flags. `rvt-gltf` now also builds the export diagnostics it
does not use (a little more time after the walk, no change to the glb);
a skipped saved-graphics step still prints its note.
- `rvt-py/src/lib.rs`: `export_run` (saved meshes on, phase = last,
signatures unchanged; the saved-graphics skip is still a
`RuntimeWarning` with the same text).
- `rvt-wasm/src/lib.rs`: `export_with_control` (same defaults and
signature; the saved-graphics skip still adds the same diagnostics
warning, recounted as before).
- `rvt-mcp`: `pipeline.rs` is deleted; `store::run_decode` is the one
call. Every tool that takes a `model` path also takes `phase` (name or
ElementId).
- A model opened at a phase is keyed by the phase's ElementId, so
`"Existing"` and `"12589"` are one model with one `model_id`; the last
phase named explicitly is a model of its own, distinct from the bare
path.
- The store remembers what a phase spelling resolved to per file
(bounded), so a phase the file lacks reads the file once, not on every
ask; an unknown phase is refused with the file's phases listed and never
takes a held slot.
- A changed file evicts every phase of its identity. Every decode passes
the phase in `ExportOptions::phase`. A `model_id` plus a phase that is
not its own is a tool error.
  - `docs/mcp-tools.json` and `.md` carry the new argument.
- `docs/mcp.md`, `changelog.d/added/1331-export-pipeline.md`.

## Testing

Not run locally (no builds on this Mac); every box is a CI or Measure
result still to come.

- [ ] Fast CI.
- [ ] Measure, unfiltered: `-f base=main -f holdout=true -f nordic=true
-f r2025=true`, every scorer; every `ifc.sha256` unchanged. No export is
claimed unchanged before this run.
- [ ] The MCP end-to-end test: its exports compared with `rvt-ifc`'s and
`rvt-gltf`'s in both lifecycles on the fixture and Einhoven, and, new, a
phase test on RE1 Architecture (Existing: no rooms and 11 counted as
left out; the last phase: 11; `"Existing"` and `"12589"` one model;
exports equal to `rvt-ifc --phase`, also with `--no-base-quantities`)
and a fixture test for a clashing id or an unknown phase.
- [ ] Python tests and the viewer's browser tests unchanged.
- [ ] Semver gate: additions only.

## Audit-honesty checklist

- Two behaviors move, neither expected to change an export:
- `rvt-ifc` prints its step notes after the decode instead of between
steps (stderr only, same text).
- A cancelled `WalkerControl` now ends an export with `Error::Cancelled`
also when it stops the saved-graphics step. On main the viewer's
`attach_saved_meshes` turned a `Cancelled` there into a diagnostics
warning and returned the export; the crate's convention is `Cancelled`
and nothing partial, and `rvt-rs-mcp` needs it. The viewer is not
affected: its control carries no cancel token (progress only), and a
user's cancel is `worker.terminate()` in `viewer/src/main.ts`, which
ends the wasm instance and posts nothing, so no error is raised and no
toast is shown.
- Python and the viewer record the unread streams after every run, not
only after the saved-meshes step. The exporter already records them and
the call is idempotent, so the diagnostics differ only when a later step
read more streams.
- No new limitation. No new fixtures.

## Breaking changes

None. New public items only: `run_export`, `run_export_with_limits`,
`run_export_with_limits_and_control`, `ExportOptions`, `ExportKind`,
`SavedMeshChoice`, `ExportRun`, `ExportNote`; and
`RevitFile::export_phase`.

## Related issues

Closes #1331. Refs #1339.
DrunkOnJava added a commit that referenced this pull request Nov 4, 2026
…-phase has it (#1339) (#1344)

## Summary

The export phase, which only `rvt-ifc --phase` could name, in the Python
API and the browser viewer, on top of #1331's `run_export`. Calls
without a phase export the last phase as before.

## Motivation

Closes #1339. Since #1328 an export leaves out a room whose own phase is
not the export phase, and the elements that do not exist in it. On a
renovation model whose rooms sit in an earlier phase, a Python or viewer
user could not get them back.

## Changes

- `rvt-py/src/lib.rs`: `phase: str | int | None = None` on `write_ifc`,
`schedule_csv`, `export_diagnostics`, `export_diagnostics_json`,
`rvt_to_ifc` and `rvt_to_ifc_diagnostics`. A name is matched exactly
first, then an ElementId; a phase the file lacks is a `ValueError`
listing the file's phases; a bool or float is a `TypeError`. One
`RevitFile` can export different phases in turn: a call without `phase`
after one with it sets the project's last phase again.
- `src/bin/rvt_schedule.rs`: `--phase <name|id>`, `set_export_phase`
before the export, with rvt-ifc's error listing the phases. Python's
`schedule_csv` builds the model `rvt-schedule` builds (the document
exporter alone, as on main, at the phase set on the handle first), so
the CLI and Python schedules stay one-to-one;
`tests/rvt_schedule_cli.rs` pins the RE1 room schedule per phase.
- `python/rvt/__init__.pyi`, `docs/python.md`: the stubs and docs follow
(additions only, new parameters last with defaults).
- `src/reader.rs`: `RevitFile::project_phases()` (public, additive)
lists a project's phases in order; `clear_export_phase()` (public,
additive) goes back to the default phase; `set_export_phase` may be
called at any time, and choosing a phase other than the one in effect
drops the memoised production walk (`RevitFile::walk`), which holds what
the phase leaves out. The notes the partition recovery makes for the
diagnostics (family spaces left out for want of a body, Areas left
unwritten, doors and windows written though their type was not read) are
cleared where the walk is rebuilt, so they follow the walk.
- `rvt-wasm/src/lib.rs`: `limits.phase` (a name, or an ElementId as a
number) on `openRvtBytesWithDiagnosticsModeAndOpenLimits`; the result
gains `phases` (`[{ id, name? }]`, in order, the last the default; empty
where no phase applies). Defaults and signatures unchanged.
- `viewer/`: a "Phase" select in the File status panel lists the file's
phases with the last as the default and reopens the file with the one
chosen, as the saved-meshes toggle does; the worker forwards
`limits.phase` and `phases`. `docs/viewer-api.md` follows.
- Tests: `tests/python/test_export_phase.py` and
`viewer/tests/export-phase.spec.ts`, on RE1 Architecture. The CI wheel
job fetches RE1 (Linux only) from the media host, then the raw host,
each held to the pinned sha256, outside the Actions cache.
- `changelog.d/added/1339-export-phase-python-viewer.md`.

## Testing

Not run locally (no builds on this Mac). RE1 Architecture's phases are
Existing (12589) and New Construction (86961, the last), and its 11
rooms sit in the second, as in
`ifc_phase_option_chooses_the_export_phase_of_a_real_file`.

- [ ] Fast CI (formatting, clippy, the MSRV check; the let-chain scan
found none).
- [ ] Python (`tests/python/test_export_phase.py`, wheel job): the last
phase by name, by `str(id)` and by `int` is the default export;
Existing, by name and by id, writes no rooms and counts 11 as left out,
by their phase (`New Construction`); `rvt_to_ifc` and
`rvt_to_ifc_diagnostics` agree; an unknown phase is a `ValueError`
naming both phases; and one handle exporting the phases in turn matches,
for each export, a handle opened for that phase, in the IFC, the room
count and the diagnostics.
- [ ] Viewer (`viewer/tests/export-phase.spec.ts`, Deploy viewer): the
select lists `Existing` and `New Construction (last, default)`; the
default export has 11 spaces; Existing has none and disables the room
schedule; the default again gives the first export back.
- [ ] Stubs: `mypy.stubtest` and `python-api-compat.py` show additions
only. Semver gate: additions only.
- [ ] Measure not needed: no export changes (the default path is
`run_export` with no phase, as #1341 measured).

## Audit-honesty checklist

- A handle reused across phases. What `RevitFile` memoises, and what
depends on the phase: the production walk does (its partition recovery
drops what the phase leaves out and the rooms), so a phase change drops
it, and the notes the recovery makes follow it; the phase filter is
replaced; everything else is read from the file without the phase and is
kept (inflated streams, parsed partitions and data objects, header hits,
the native preamble, definitions and record index, schema classes, the
release, second-prologue ids, element names, design options, the ArcWall
scan, materials, unread streams). Walks, notes and diagnostics of a
reused handle are held to a fresh handle's in Python
(`tests/python/test_export_phase.py`) and in Rust
(`tests/native_phases.rs`).
- The notes need a model that has them. Einhoven and RE1 Architecture
may have none, so
`a_handle_exported_again_reports_what_a_fresh_one_reports` could pass
vacuously on them.
`a_handle_exported_twice_keeps_the_count_of_family_spaces_it_leaves_out`
runs on the BIM4LCA terrain office (concrete), whose 89 bicycle bays are
counted as `element_record_family_space_without_body` (RE-312, #1262):
it asserts a nonzero count, the same count on a fresh handle and on the
first and second export of a reused one, and no bicycle bay in the
model. It fails on the code before the notes followed the walk. That
office was only in `research/bim4lca-measure.tsv` (Measure's list), not
in `research/bim4lca-models.tsv`, which Corpus health fetches, so this
PR pins it there too (7.6 MB, the same sha256 and size, read by byte
range from `ARCH.zip`); the cache key of the BIM4LCA models changes with
the list, so the first run on this PR fetches them again.
- The viewer reopens the file to change the phase (a second decode), as
it does for the saved-meshes toggle; there is no way to switch phase on
the open model.
- No new limitation. The Python bindings and the viewer no longer "take
the default" only (the RE-326 report said so on its date and stays as
written).

## Breaking changes

None. New parameters last with defaults, a new `phases` field in the
open call's result, and `RevitFile::project_phases`.

## Related issues

Closes #1339. Depends on #1331 (merged as #1341).
DrunkOnJava added a commit that referenced this pull request Nov 5, 2026
…dumps and Jev scores the diff (#1334) (#1419)

## Summary

The advisory semantic merge check of #1334. Measure diffs the two sides'
MCP dumps for each openly licensed model, and a `workflow_run` workflow
gives the diff to Jev `jev-1.13.0` beside the pull request's own `##
Summary` and `## Testing` and asks whether the export moves in a way
they do not state specifically (Griffin, 2026-11-05: a described,
intended change passes, an unexplained move fails; the main session,
2026-11-05: a move that only a general description such as "improves how
walls are exported" covers fails too). The verdict is the check run
`semantic diff (advisory)` on the commit Measure measured: not in the
ruleset, no pull request comment, and a `fail` is a red check. Only a
Measure run of every open model with a base on main writes it, it is
written on the commit Measure measured and no other, and it cannot be a
pass unless all 34 open models are compared in full and a
same-repository pull request has that commit as its head.

## Motivation

Measure is the byte-level oracle. A pull request that moves meaning
should say so, specifically, before it is armed, not only show that
bytes moved. The agent that makes a change also writes its Summary, so a
sweeping Summary must not cover a change. Refs #1334.

## Changes

- `tools/re/semantic_diff.py`: a pure function of two dumps. Elements
added, removed and changed with the value before and after; byte offsets
inside `provenance` dropped; order ignored; values compared to the
dump's six decimals; an empty object or list the same as no field;
identical changes collapsed by the whole (path, before, after) triple.
Its `measure` mode is what the compare job runs: it fails the job on a
dump in a model that is restricted or on neither list, and records in
the manifest the open models no diff covers (`OPEN_MODEL_NAMES`, 34),
each skipped model with its own reason, the groups dropped for size, and
whether the run was asked for every open model (`--requested-all`). The
measured commit and the base are the ones the compare job passes from
the plan job's resolved refs (`--head-sha`, `--base-sha`); the
`commit.txt` of a result folder is written by a shard job that runs the
measured code and is read only when none is passed.
- `tools/re/test_semantic_diff.py` and `tools/ci/test_jev_check.py`:
failure-first tests of pure helpers, run in the PII guard job. The diff:
0.35 vs 0.3500001, a reorder with moved offsets, a bulk collapse that
hides a different value, an uncovered model. The verdict logic: a model
with no dump, a diff that failed, a dropped group, an unscored chunk or
partial coverage never reads as a pass; an answer whose probabilities do
not add up is refused; a chunk of non-ASCII text is never sent over the
16,000-character cap; a head commit that is not a 40-character SHA, a
manifest with a non-string model, HTML and invisible characters in the
pull request's text, and control characters in printed text. Each was
checked to fail under the mutation it guards against.
- `.github/workflows/measure.yml`: the compare job checks out the
script, runs `measure` when there is a base, tells it whether the run
was dispatched with no `models` filter and the office and Revit 2025
models on, and uploads `semantic-diff`. The documented command is `-f
base=main -f nordic=true -f r2025=true` with no `models` filter.
- `tools/ci/jev_check.py`: merges findings across models, chunks them
(at most 8 findings, 16,000 characters as sent), reads the
same-repository pull request whose head is the measured commit through
the API, takes its `## Summary` and `## Testing` (HTML element tags and
invisible characters removed, each cut at 2,500 characters as sent, all
of it shown in the check's summary; text in angle brackets that is not
an HTML element, such as `<set>.<property>`, stays), and asks Jev blind
(labels A and B randomised per chunk; no model name, pull request
number, title or branch in the state). Per finding Jev chooses: stated
specifically / follows from a specific change they state / covered only
by a general description / unstated / only rounding, a reordering or a
spelling; "general" plus "unstated" is the finding's score, and the
probabilities must add up to 1. A finding at 0.85 or more is a fail in a
chunk rated 1.5 or more and a warn in one rated 1.0 or more. NOT
MEASURED, never a pass, for no key, no same-repository pull request
whose head is the measured commit (a fork's included, and an empty diff
does not excuse it: the lookup is first), a check asked for on a commit
other than the measured one (both commits in the title), a base that is
missing or could not be checked, a pull request with no `## Summary`
where the diff has findings, HTTP 402, a refused key, another model's
reply, a time-out, an error (named by its type), no model compared, any
open model not compared in full, a dropped group or a missing count,
sampled property sets that one of a model's dumps alone holds too often
(none held by both while either holds any, or more than a tenth of
them), or an unscored chunk. A run whose base is not main or an ancestor
of main writes no check, and names the base. The Jev call does not
follow a redirect. An empty diff passes without a call and needs no
Summary, but only on a complete run.
- `.github/workflows/semantic-check.yml`: `workflow_run` on Measure
(environment `jev`, main only), `workflow_dispatch` with a run id, and a
keyless run on a pull request that changes the check. It scores only a
Measure run whose event is `workflow_dispatch` and whose head repository
is this repository, from `measure.yml` at that path; any other run posts
nothing, with a notice. It writes the check on the commit the artifact
names as measured, not on a pull request's live head. actionlint reports
nothing on it and zizmor 1.32.0 reports nothing on it, `measure.yml` and
`ci.yml` (the one `dangerous-triggers` finding, on `workflow_run`, is
ignored inline with its reason).
- `docs/maintaining.md` (where to find the verdict: it is on the
measured commit, not necessarily the head, which the pull request page
does not show, so look it up with `gh api
repos/<repo>/commits/<sha>/check-runs?check_name=...`; a later commit
does not clear a fail, only a new score of the same pull request does; a
filtered Measure run writes no verdict, so a pull request that changes
output needs its final unfiltered run; the Summary must state each
change specifically: which classes, which property or geometry, how many
where measured; a fail is fixed by changing the code or by stating the
change in the Summary; a warn is answered in the body; the complete
command; what a pass means: the dumps agree, not that the exports are
identical, since the dump samples five elements per entity; what is
sent, including element names and values that can hold an ElementId), a
changelog fragment.

## Testing

No local build (the lane runs no cargo); the tests above are the
pure-helper exception and run in CI's PII guard job. End to end on real
dumps:

- [x] N/A for `tools/check-local.sh`: no Rust changed.
- [x] Verified end to end on real Measure runs: see "Output samples".
The keyed path (main's `workflow_run` job with the secret) is not yet
exercised.

## Audit-honesty checklist

- The keyed path cannot run before the workflow is on main:
`environment: jev` takes only main, and a `workflow_run` workflow runs
from the default branch. After the merge: `gh workflow run
semantic-check.yml --ref main -f run_id=<a complete Measure run with a
base>`.
- The keyless path is exercised by this pull request's own run of the
workflow, and it can only say NOT MEASURED: it writes on the pull
request's head, which is never the commit Measure measured. At c36b71f
(before the delta review) it did so with the wrong reason: Measure run
41987903774 (dispatched from this branch for #1425's head c8e55f5
against main 182ed21, `-f nordic=true -f r2025=true -f
scorers=mcp_answers_vs_ifc`, no `models` filter) compared all 34 open
models (0 skipped, 0 uncovered, `requested_all` true; findings only in
the two office files, 7 each), and this workflow's run 41987854258
(attempt 2) wrote check run 127117767677 on c36b71f through
`GITHUB_TOKEN` saying only "no Jev key", a check on a commit Measure had
not measured. At b4d1932 such a check says "this check is for <the
head>, but Measure measured <the other commit>" in its title (local
scenario below; the CI proof is Measure run 41993282068 on #1425's head
722244e against main a4044dc, and this workflow's pull-request run
after it: not yet measured on this head). Measure's own pull-request run
41987854320 covered 6 of 34 models and its compare step says "the
semantic check writes no check run (this run was not asked for every
open model)", the filtered path in a real run. An earlier pass of the
keyless path (run 41966963563, attempt 2, on fd90cdc: no semantic
difference in 6 models) predates the coverage rule and the commit check.
- A pass means the dumps agree, not that the exports are identical: the
dump samples five elements per entity, and a mesh vertex or a profile
point is not in it.
- The thresholds and the wording of the per-finding question were set on
the in-sample cases below, so those cases are in-sample for them. The
held-out round is the second table. Jev's answers move by about 0.02
between two calls with the same request (#1412's own Summary passes at
0.84 and fails at 0.86 on byte-identical requests, against a gate of
0.85), so a verdict within 0.05 of the gate is not stable.
- B3 (a fork's run) and the redirect behaviour are tested by reading the
code and the unit helpers, not by a fork's run: no fork pull request was
opened.

## Breaking changes

None.

## Output samples

Everything below was scored with `tools/ci/jev_check.py` and
`tools/re/semantic_diff.py` as committed at 49d5378, and the
delta-review block below as committed at b4d1932 (which changes who may
write a check, the gaps, and the stripping of HTML and invisible
characters in the pull request's text; no prompt, threshold or
chunking), and the key from the Keychain on this Mac, from the
`semantic-diff` and `measure-*` artifacts of the Measure runs named.
Nothing was scored with a threshold or a prompt other than the committed
ones.

**Ground truth is `ifc.sha256` per model**, not a pull request's title.
Of 13 pull requests in the in-sample set (Core Interior, Einhoven, RE1
and the Revit 2025 models in every run; 34 models with the BIM4LCA
office where `nordic` was on, 30 for #1402 and #1403 and 6 for #1398),
the IFC differs on the two office files for #1388, #1400, #1401 and
#1405 and on no model measured for the other nine. The semantic diff has
findings on exactly those two models in each of those four runs, and
none on any model whose IFC is identical, except the dump-only changes
of #1373, #1379 and #1412. The documented command (no `models` filter)
is what finds them: the earlier documented command, which filtered to
Core Interior, Einhoven and RE1, reads "pass" on all four.

**In-sample: the 7 pull requests whose diff is not empty** (runs
41972569847 #1388, 41972650013 #1400, 41972664107 #1401, 41972583508
#1405, 41972597118 #1373, 41972610208 #1379, 41972636527 #1412; each 34
models). "Own" is the pull request's real Summary and Testing.
"Sweeping" is a one-line Summary that names an area and no kind of
change ("Improves how walls and floors are exported." for #1388,
"Improves how openings are written in the export." #1400, "Improves how
walls are drawn in the export." #1401, "Improves how floors and walls
are exported." #1405, "Improves how rooms, profiles and pipes are
exported." #1373, "Improves how roofs are exported." #1379, "Improves
the MCP server's answers." #1412), alone and beside the pull request's
real Testing. "Wrong" is another pull request's full body: #1329 (a
memory change that states the output does not change) and one other. The
number in parentheses is the highest probability that Jev gave a finding
as not stated specifically.

| Pull request | Findings | Own | Sweeping alone | Sweeping + its
Testing | Wrong: #1329 | Wrong: other |
| --- | --- | --- | --- | --- | --- | --- |
| #1388 | 7 | pass (0.31) | fail (0.99) | pass (0.74) | fail (0.99) |
#1412: fail (0.95) |
| #1400 | 14 | **fail (0.94)** | fail (0.99) | fail (0.98) | fail (0.98)
| #1373: fail (1.00) |
| #1401 | 12 | pass (0.63) | fail (1.00) | pass (0.77) | fail (0.96) |
#1379: fail (1.00) |
| #1405 | 2 | pass (0.51) | warn (0.99) | warn (0.90) | warn (0.96) |
#1379: **pass (0.78)** |
| #1373 | 88 | pass (0.63) | fail (1.00) | fail (0.99) | warn (0.97) |
#1400: fail (1.00) |
| #1379 | 94 | pass (0.24) | fail (0.99) | warn (0.90) | fail (0.96) |
#1401: fail (1.00) |
| #1412 | 23 | pass (0.84) | fail (1.00) | fail (0.89) | fail (0.99) |
#1388: fail (1.00) |

- **No sweeping Summary alone passes (0 of 7): 6 fail, 1 warns.** Beside
the pull request's own Testing two pass (#1388 and #1401), because their
Testing states the figures: that is the rule working, since a measured
figure in Testing counts as stated.
- **False positives: 1 of 22 expected passes, a fail.** The 22 are the 7
own Summaries, 6 jitter controls, 6 reordered controls and 3 empty-diff
pull requests on complete runs (#1329, #1377, #1382: no finding on any
model, IFC identical, each a pass without a call to Jev). #1402 and
#1403 ran without the office, so under the new rule they write no check
and are not counted. #1400 is a diff of 14 counters of the diagnostics,
and the figure its Summary and Testing leave unstated is
`parameter_value_count` +188 (office as built) and +174 (permit); its
Motivation, which Jev is not given, gives 182. #1412's own Summary sits
at the gate: the same request scored 0.84 (pass) at 4e81a95, 0.86
(fail) in one rescoring on this head's code and 0.84 (pass) in the table
above, so it is a verdict the gate cannot hold; it could as well be
counted a second false positive.
- **False negatives: 1 of 21 expected non-passes** (7 sweeping alone, 7
with #1329's body, 7 with another's): #1405's whole diff is
`total_entities` +8 on each office file, which a roofs Summary does not
state (0.78, below the gate).
- **Controls, complete** (all 34 models on both sides, one model
changed; built from the dumps of run 41972569847): six jitter controls
pass, a move of 1e-6 in every measurement of the sampled elements, the
rooms' areas and the levels' elevations in Core Interior, RE1
architecture and mechanical, Einhoven, the office as built and a Revit
2025 model, scored beside #1329's body: highest probability 0.73 to
0.79, highest chunk rating 0.6 to 0.7, below the 1.0 rating gate; 412
findings in 65 chunks on the office. Six reordered controls (every row,
set and room in another order, every byte offset shifted) are empty
diffs.
- **Coverage, on #1401's stored diff** (run 41972664107, own Summary),
changing only the manifest: complete, **pass**; one model with no dump
on the head side, **NOT MEASURED** naming it; one model whose diff
failed, **NOT MEASURED** with that reason; a dropped group, **NOT
MEASURED**; the same missing model with a run not asked for every open
model, **no check run**; a manifest with a non-string model, an error
and no check run.
- **Unchanged by the review fixes:** 34 of 35 verdicts of the in-sample
matrix are as scored at 4e81a95 (the one that moved is #1373 with
#1329's body, fail to warn; both are non-passes), and #1401 and #1405
(the two the review asked for, runs 41972664107 and 41972583508) are
unchanged in all five bodies. 18 of the 35 requests are byte-identical
to the earlier scoring; the other 17 carry a Summary or Testing that is
now cut by its length as sent (a newline or a quote in the text counts
two, so a section over the cap is cut about 20 characters earlier),
which is the review's cap fix and not a change of method.

**Delta review (b4d1932).** Run on stored complete runs, with the key
from the Keychain and real GitHub lookups, nothing posted:

- Run 41972569847 (#1388's merge commit, base 240c7d7): the pull
request is found through the API from the measured commit, the base is
on main, Jev is asked with #1388's real Summary and Testing: **pass (7
findings in 34 models)**, as before. Run 41972583508 (#1405's merge
commit): **pass (2 findings)**, as before. Run 41972664107 (#1401's head
2a35ede, which has since moved): NOT MEASURED, "no pull request of this
repository has this commit as its head", the head-moved case in a real
run; scored offline with #1401's real body the verdict is **pass**, and
all five of its bodies give the verdicts of the table above (pass, fail,
pass, fail, fail). #1388's five bodies and #1405's five are the same
verdicts as the table, except #1405 with #1329's body, warn to fail (a
non-pass either way, at a rating of 1.5).
- Run 41987903774 (PR #1425's head c8e55f5 when measured): its head has
since moved to 722244e, so the real-lookup scenario reads NOT MEASURED,
"no pull request ... has this commit as its head". Asked to write on
another commit (c36b71f), the same run reads NOT MEASURED with "this
check is for c36b71f, but Measure measured c8e55f5". An empty diff
on a merged pull request's commit (run 41980023307, #1358) is a pass;
the same empty diff with a commit no pull request has is NOT MEASURED; a
base that is the pull request's own head writes no check and names the
base.
- **Property sets held by one dump only** (`details_one_side`) are a gap
per model only when none is held by both while either holds any, or when
more than a tenth of all of them are held by one dump only (exactly a
tenth is not a gap; main session, 2026-11-05). The dump samples the five
lowest ElementIds of each entity, so a change that adds or removes
elements of an entity moves the sample and a few are held by one dump
only: that is not a defect, and the literal rule (any non-zero count)
would have turned #1412's pass into NOT MEASURED. The defect it guards
against is a head that lost its details. The check's summary says how
many are held by one dump only, gap or not. On run 41972636527 (#1412, 1
of 115 sampled elements held by one dump only in each office file, no
gap), scored offline with #1412's body three times: pass (0.84), fail
(0.85), pass (0.83), all with no gap and the same chunk (a finding at
the 0.85 gate, in a chunk rated 3.6), so its own Summary is a pass
again, at the gate, and not a stable one. No other stored complete run
has a non-zero count.

**Held-out, thresholds and wording unchanged since they were set
above.** Ten merged pull requests that were not used to set them, run
with the same 34 models (`nordic` and `r2025` on):

- #1337, #1352, #1356, #1372, #1341 and #1344 (Measure runs 41973688732,
41973701739, 41973714367, 41973727101, 41973740400, 41973754042): the
IFC is identical on all 34 models and the dumps agree, so each has an
empty diff and passes without a call to Jev, with its own Summary, a
sweeping one, #1329's or another's alike. **They test the empty-diff
path and nothing else**: none of their changes lands on an open model.
- #1350, #1358, #1364 and #1370 (provenance and diagnostics additions;
the IFC is identical on all 34 models in each, so these are dump-only
changes), Measure runs 41980008692, 41980023307, 41980037727 and
41980053223, scored with the same four bodies per pull request (own
Summary and Testing, a sweeping one-liner written before the runs
finished, that line beside the real Testing, #1329's body, and another
pull request's body). Scored first with `jev_check.py` as it was at
4e81a95 and again with the code of this head; nothing was changed after
seeing a result, and the 20 verdicts are the same in both.

| Pull request (run) | Findings | Own | Sweeping alone | Sweeping + its
Testing | Wrong: #1329 | Wrong: other |
| --- | --- | --- | --- | --- | --- | --- |
| #1350 (41980008692) | 1034 in 142 chunks | **warn** (0.86, one chunk,
rated 1.13) | fail (1.00) | fail (0.88) | fail (0.99) | #1358: **pass
(0.84)** |
| #1358 (41980023307) | 0 | pass, empty diff | pass, empty diff | pass,
empty diff | pass, empty diff | pass, empty diff |
| #1364 (41980037727) | 159 in 37 chunks | pass (0.14) | fail (1.00) |
pass (0.60) | fail (0.97) | #1370: fail (0.92) |
| #1370 (41980053223) | 98 in 16 chunks | **warn** (0.90, one chunk,
rated 1.33) | fail (1.00) | fail (0.95) | fail (0.97) | #1350: **pass
(0.21)** |

The sweeping lines were "Improves what the export records about
elements." (#1350), "Improves the diagnostics of the export." (#1358),
"Improves what the export records about bodies." (#1364) and "Improves
what the export records about profiles and stairs." (#1370).

- **The held-out result is weaker than the in-sample one.** Real
Summaries: 1 of 3 non-empty pull requests passes, 2 warn and none fail.
Sweeping alone: 0 of 3 pass (all fail). #1329's body: 0 of 3 pass.
Another pull request's body: 2 of 3 pass. With the empty diff counted,
false positives are 2 warns (no fail) of 4 expected passes, and false
negatives 2 of 9 expected non-passes.
- **Why the two warns.** #1350 added fields to the dump's `summary.file`
block (`layout_release`, `omitted_entries`, `partition_count`), which
its Summary and Testing do not name: one chunk of 0.86 at a rating of
1.13, where a warn needs 0.85 and 1.0. #1370's warn is one chunk of
`value_sources` parts of Core Interior's shading devices at 0.90, rated
1.33; a fail needs 1.5. Both are near their gates.
- **The two cross-body passes are neighbours, not strangers.** #1350
(the provenance of every decoded element), #1358 (why an element was
left out) and #1370 (value sources for profiles, stair runs and
landings) all add provenance and diagnostics, so another's Summary
covers part of the diff. They are counted as false negatives as defined.
- **Run-to-run movement.** Jev's answers move by about 0.02 between two
calls with the same request, and by more in the maximum of very many
findings: with #1358's body on #1350 (1,034 findings) the highest scored
0.83, 0.97 and 0.84 in three scorings, only the middle one on a
different grouping of the chunks (since reverted: a chunk is packed at
full context). A verdict near a gate (0.85) is not stable.
- **What it says about the thresholds.** On provenance and diagnostics
additions Jev's probabilities for a change the pull request states sit
near 0.9 where in-sample they sat at 0.2 to 0.8, so the 0.85 gate is
close to the edge for real Summaries. A recalibration follow-up is
warranted.

#1314, #1316 and #1328 cannot be calibrated: their parents predate the
server crate (71c0677), so Measure builds no `rvt-rs-mcp` there.

## Related issues

Refs #1334
DrunkOnJava added a commit that referenced this pull request Nov 5, 2026
…f the latest phase that holds any (#1359) (RE-326) (#1435)

## Summary

Where no phase is named and a project's last phase holds no room, the
export writes the rooms of the latest phase that holds any. Only placed
rooms count, both for "the last phase holds a room" and for "the latest
phase that holds any". Every other element still follows the last phase,
a phase named (`rvt-ifc --phase`, Python `phase=`, the MCP `phase`), the
last included, is exact, and a project with a placed room in its last
phase is unchanged.

## Motivation

#1359: an outside importer reports Autodesk's `rac_basic_sample_project`
going from 14 rooms (`decoded_elements()`, `IfcSpace`) in 0.13.0 to 0 in
0.14.0. The cause is the room-phase rule of RE-326 (#1328): all 14 rooms
are in Working Drawings, the second of three phases, and the last,
Learning Content, holds none. Measure run 41985023986 (ref `b510ff3c`):
the 2016 to 2027 saves hold `IFCSPACE` 0 and `room_not_in_export_phase`
14, all in Working Drawings; the 2015 save holds 14 and counts none
(both phase rules start at Revit 2016, #1332).

This is a choice by Griffin (2026-11-05, "Fall back to rooms' phase"),
not a measurement of Revit's default: rooms all in one phase cannot
overlap, and the only Revit export of this model holds the 14. No Revit
export made at the last phase of such a project exists.

## Changes

- `src/research/native_phases.rs`: `PhaseFilter::room_fallback` and
`room_fallback_rooms`, found from the placed rooms only
(`placed_room_ids`, `is_placed`, the test
`scan_phase_excluded_instances` counts the left-out rooms by; the scan
runs only when a `RoomElem` record names a phase before the last, and
where placement cannot be told there is no fallback), `export_named`
(named versus defaulted), `room_fallback_in_effect`,
`room_export_phase`, `with_default_export_phase`,
`differs_in_effect_from` (the walk-drop predicate);
`room_outside_export_phase` judges rooms against `room_export_phase`.
Elements still use `excluded`, which the fallback does not touch.
- `src/reader.rs`: `RevitFile::room_phase_fallback`; `set_export_phase`
and `clear_export_phase` drop the memoised walk by
`differs_in_effect_from` (naming the last after a fell-back default, and
back).
- `src/ifc/mod.rs`, `src/ifc/export_pipeline.rs`:
`ExportDiagnostics::room_phase_fallback` (`RoomPhaseFallback { phase,
rooms }`, from the same filter as the handle's answer, absent when not
applicable, replaced under `--anonymize`),
`ExportNote::RoomPhaseFallback` (appended last) with `anonymized()`.
- `src/bin/rvt_ifc.rs` (help; the note, with the phase replaced under
`--anonymize`), `rvt_gltf.rs` (the note), `rvt_schedule.rs` and
`rvt_sheet.rs` (a line each).
- `rvt-py/src/lib.rs`, `python/rvt/__init__.pyi`: a `RuntimeWarning`
from every export call and from `schedule_csv`, `decoded_elements` and
`element_counts`. `tests/python/test_room_phase_fallback.py` and a step
of the wheel job that fetches the 2018 save (pinned by sha256).
- `viewer/src/main.ts`, `viewer/index.html`: the last phase's label and
hint say so; the downloaded diagnostics redact the phase.
- `rvt-mcp/src/args.rs`: the `phase` description says that naming the
last phase differs from leaving it out (the contract files follow from
the watcher).
- Docs: `docs/schemas/export-diagnostics.schema.json`,
`docs/export-diagnostics.md`, `docs/rooms.md`, `docs/evidence.md`,
`docs/python.md`, `docs/user-guide.md`, `docs/status.md`,
`docs/supported-profile.md`, `docs/mcp.md`, `docs/viewer-api.md`,
`docs/format-reconnaissance.md`, `README.md`,
`reports/element-framing/RE-326-room-phases.md` (new section 9),
`changelog.d/changed/1359-room-phase-fallback.md`.

## Testing

Unit tests are banned in this repository; the only ones are
failure-first tests of pure helpers with no I/O, the exception the
operator policy allows: `room_fallback_phase` (no phases, no room, a
room in the last phase, a phase not in the project, rooms in two earlier
phases, one phase, an order that is not ascending by ElementId) and
`PhaseFilter`'s state (the default, a phase named, the last named, going
back, `differs_in_effect_from`). Nothing was built or run locally;
`cargo fmt --all -- --check` and `tools/release/changelog.py check`
pass.

- [ ] `tools/check-local.sh` passes: not run locally; CI runs it (the
fast jobs passed at `b0abb7b6`).
- [x] Verified end to end on real Revit files, by four Measure runs at
`ea0c74499bdc4346435cf89c8fd95856371127cb` (this PR's code merged with
`main` at `a0639777`, `SpaceKind` included; what follows is
documentation). The commands and the reading are in RE-326 section 9.4.
- Unfiltered, run 42035308270 (`-f base=main -f nordic=true -f
r2025=true -f holdout=true -f samples=true`): 111 exports compared; 12
moved, the 2016 to 2027 saves of `rac_basic_sample_project`, each now 14
`IfcSpace` (0 before) of `SpaceKind` `room` 14 (`space_kinds_vs_ifc`:
area 0, mep_space 0, family_instance 0, no SpaceKind 0), no
`room_not_in_export_phase` (14 in Working Drawings before),
`room_phase_fallback` {Working Drawings, 14}, 464 entities (450 before)
and the `rvt-ifc` log line; the other 99 are byte for byte as before by
`ifc.sha256`, the 2015 save and 18 held-out exports among them (counts
only, none moved). The scorer diff names only those 12 models;
IfcOpenShell's WHERE rules read findings 0 on all 13 saves; no
`space_kinds_vs_ifc.txt` of the head side reports a space without a
kind; the semantic check of the MCP dumps of 34 models reports 0
changes.
- Last phase named, run 42035311977 (`--phase 961604`, 2018 to 2027): 14
`room_not_in_export_phase`, 0 `IfcSpace`, no fallback field,
`ifc.sha256` equal to `main`'s default on 10 of 10 saves. Its
`Same-project gates` job failed and its exports did not: the phase id
exists only in `rac_basic`, so `rac_advanced` writes no IFC under the
flag and the Areas gate saw nothing, a false red that #1446 fixes.
- Working Drawings named, run 42035315319 (`--phase 86961`): 14
`IfcSpace` of kind `room`, and `ifc.sha256` equal to this PR's default
on 10 of 10 saves.
- GlobalId, run 42035335073 (2018 save, kept IFC, equal to the
unfiltered default by `ifc.sha256`) against the public Revit 2018 export
of RE-326 section 5, fetched again and its sha256 checked (`1114ce91…`):
rvt-rs 14 `IfcSpace`, Revit 17, in both 14, only rvt-rs 0, only Revit 3
(the MEP Spaces), as section 6 found for `--phase 86961`. Counted with a
regular expression over the `IFCSPACE` GlobalIds because IfcOpenShell
was not installed where it ran; the scratch copy was deleted and the
export is not committed.
- Coverage: 12 of the 111 exports exercise the fallback, all saves of
one project whose 14 rooms are all placed and in one earlier phase. No
real file has two earlier phases holding rooms (that branch is covered
by the pure helper alone), an unplaced record in the last phase or in a
later phase than the placed rooms, a placed room whose phase did not
read, or an Area beside rooms of an earlier phase.
- Not measured: `mcp answers` for rac_basic (the MCP scorer and dump run
only on models with a Revit export); Revit's default at the last phase
of such a project (no export exists); the Python warnings, which have
`tests/python/test_room_phase_fallback.py` in the wheel job of the full
CI and have not run on this head (the draft ran the fast jobs); the
viewer's label, which has no browser test.
- [x] If this touches the IFC exporter: no witness observation changes
(the scorer diff names only the 12 `rac_basic_sample_project` saves,
which are in no witness set).
- [ ] If this is a performance change: N/A.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR; every
figure names its run and ref
- [x] A user-visible change has its entry under `changelog.d/changed/`
- [x] If a limitation was resolved, the docs are updated: the "left out
by default" statements for `rac_basic_sample_project` are replaced
- [x] The limitations below are in the PR body, RE-326 sections 9.4 and
9.5 and the docs
- [x] Commit messages describe WHAT changed and WHY
- [x] No emojis
- [x] No private paths, personal email addresses, or internal jargon in
committed files
- [ ] Reverse-engineering finding: N/A (a behaviour choice; the probes
of RE-326 stand)

Limitations introduced:

- A project with no room in its last phase gets earlier rooms that
Revit's default might leave out. Revit's default on such a project is
unmeasured.
- The viewer cannot name the last phase exactly: its last option is the
default, so it shows the fallback rooms. `rvt-ifc --phase`, Python and
the MCP server can.
- A placed room whose phase is unset, unread or not one of the project's
is written as before and counts as nothing: if it is in the last phase,
the fallback brings in earlier rooms that Revit's default would not
write beside it. An Area and an unplaced record are no room.
- `rvt-elements`, `rvt-info` and the other CLIs that read the walk write
the fallback rooms and print nothing about it.

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary source, decompiled internals, or NDA'd SDK
content
- [x] No new fixtures (the Python test reads Autodesk's published
sample, fetched by the wheel job and never stored)

## Breaking changes

None to the API: the `ExportNote` variant is appended to a
`#[non_exhaustive]` enum, `ExportDiagnostics` is `#[non_exhaustive]` and
the field is skipped when absent. A caller that matched on the 0.14.0
result for `rac_basic_sample_project` (0 rooms by default) now gets 14,
which is the point; `phase="Learning Content"` (or the last phase's
ElementId) keeps the 0.14.0 result.

## Screenshots or output samples

The log line `rvt-ifc` prints on each of the 12 saves, from run
42035308270: `rvt-ifc: the project's last phase holds no room, so the 14
room(s) of "Working Drawings", the latest phase that holds any, are
written; every other element is of the last phase. Naming the export
phase (rvt-ifc --phase, Python's phase=, the MCP phase argument) is
exact: naming the last writes no room`

## Related issues

Refs #1359 (the issue also holds a report on doors and windows, which
this does not address).
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