Skip to content

refactor(research): remove class_tag_map, compound_framing and relations, which nothing uses - #1131

Merged
DrunkOnJava merged 5 commits into
mainfrom
refactor/remove-dead-research-modules
Oct 30, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
refactor/remove-dead-research-modules

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Removes three research modules that nothing calls. All three sat behind unstable-research, outside the semver promise.

Motivation

A repository audit (2026-10-30) checked src/, src/bin, tests, examples, benches, fuzz, rvt-py and rvt-wasm. Only src/lib.rs and src/research.rs named these modules, to declare them:

  • relations.rs (320 lines) calls itself "architecture stubs", with "nothing here wired into default IFC emission".
  • compound_framing.rs (150 lines) is a marker tokenizer for the RE-15 compound ArcWall study.
  • class_tag_map.rs (109 lines) is a 2016–2026 tag lookup from docs/data/tag-drift-2016-2026.csv. formats::SchemaClasses (by_tag) reads each file's own tags instead.

Changes

Testing

N/A for output: no exporter path used these modules. CI's clippy and rustdoc runs check that nothing still names them.

Breaking changes

Only under unstable-research: rvt::research::{class_tag_map, compound_framing, relations} go.

Related issues

Refs #154.

…ons, which nothing uses

Repository audit 2026-10-30. No code in src/, src/bin, tests, examples, benches, fuzz or the bindings calls any of the three; lib.rs and research.rs only declared them. relations.rs called itself architecture stubs wired into nothing; compound_framing tokenized markers for the RE-15 compound ArcWall study; class_tag_map's 2016 to 2026 lookup is superseded by formats::SchemaClasses reading each file's own tags. All three sat behind unstable-research. docs/support-matrix.json's #154 status sentence and examples/probe_arcwall_2024.rs's doc no longer name class_tag_map.

@DrunkOnJava DrunkOnJava left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer self-review. GitHub does not let a PR's author approve it, so this review stands in for an approval: I read the full diff and checked each claim.

  • Nothing uses them: git grep -w for class_tag_map, compound_framing and the relations:: path across src, src/bin, tests, examples, benches, fuzz, rvt-py and rvt-wasm finds only the declarations this PR deletes. That leaves two text mentions, the support-matrix sentence and one probe's doc comment, and both are updated. The word relations appears elsewhere only for the witness relation sets, which are unrelated.
  • Declarations: research.rs loses the three #[path] modules and their module-list lines. lib.rs's pub(crate) use list loses the three names (rustfmt clean).
  • Crate file list: cargo package --list now shows docs/support-matrix.json as the only non-source data file, matching git grep include_str!.
  • Output: no exporter, CLI or binding path reached these modules, so exports cannot move. CI's clippy (-D warnings) and rustdoc (-D warnings) confirm nothing still names them.

Ready to land on CI passed.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 08:35
@DrunkOnJava
DrunkOnJava merged commit 4b2fe41 into main Oct 30, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the refactor/remove-dead-research-modules branch October 30, 2026 08:42
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
) (RE-184) (#1074)

## Summary

rvt-ifc now leaves out elements that don't exist in the export phase, as
Revit's export does (#328, RE-184). A project's
`AllProjectPhases.m_phaseIds` lists its phases in order. With no phase
chosen, Revit's IFC export shows the last one, and an element is
exported when it exists there:

```text
exported ⇔ index(created) ≤ last and (demolished = -1 or index(demolished) > last)
```

On Snowdon Towers the order is Legends, Existing, New Construction.
#328's six slabs are created *and* demolished in Legends, so they exist
in no later phase. They are the only elements of Snowdon Architectural
the rule leaves out.

## Motivation

#328: Revit's export of Snowdon Towers leaves out six slabs (2287679 to
2287714) that rvt-rs writes. On 2026-10-18 you asked for this as a PR
numbered RE-184 (my patch had used RE-173, which `main` now has for
column z). This is that patch rebased onto `main` 5a81e74 and
re-measured.

## Changes

- `src/native_document.rs`: `Options::graph_classes` decodes graphs only
for the classes named. Every other record comes back with `Record::base`
(`native_element::decode_base`), which is the cheap way to read every
element's two phase ids.
- `src/native_phases.rs` (research, listed in `src/research.rs`): the
phase order and the ids not in the last phase. It is memoised as
`RevitFile::memoised_phase_filter()`, with the public
`RevitFile::phase_filter()` behind `unstable-research`, as
`design_options` is since #873.
- The filter sits beside `DesignOptions::excludes`:
`without_non_primary_options`, the empty curtain panel scan and the
volumeless count.
- `src/ifc/mod.rs`: a skipped item `element_record_not_in_export_phase`,
counted by class.
- Test: `tests/phase_filter.rs`, registered in
`tests/integration/main.rs` and `tools/ci/test-targets.txt` (`real`).
- Probe: `examples/probe_re184_phase_order.rs`. Report:
`reports/element-framing/RE-184-phase-order.md`.
- Docs: the README's left-out sentence and its two "phase filtering
(#328)" gaps, a dated RE-184 entry in `docs/status.md`, an addendum in
`docs/rvt-moat-break-reconnaissance.md`, and
`changelog.d/fixed/phase-filter.md`.

The commits run feat → test → research → docs.


## Testing

Unit tests are banned in this repository: do not add them. Show the
change working end to end on real files instead.

- [x] `tools/check-local.sh` passes (fmt, clippy, rustdoc, build,
real-file / CLI / contract checks)
  - Each of its required steps, run one by one:
  - `cargo fmt --all -- --check` passes.
- `cargo clippy --workspace --all-targets --all-features -- -D warnings`
passes.
- `cargo doc --no-deps --lib` passes with `RUSTDOCFLAGS='-D warnings'`,
with and without `unstable-research`.
  - `cargo build --workspace --all-targets --all-features` passes
  - `cargo test --profile ci --doc` passes, 28 of 28.
- `basics_inspect`, `basics_elements` and `basics_export` (on
`corpus/tier1/architectural-2024`) run cleanly; `basics_export` writes
its IFC, glTF, CSV and diagnostics.
- `cargo +1.87 check --profile ci --all-targets` (the MSRV job): passes.
- `RUSTFLAGS='-D warnings -D unnameable_types' cargo check --lib --bins`
passes.
- `tools/ci/verify-real-files.sh --profile ci --no-fail-fast`: passes
265 of 265. It ran with `RVT_SAMPLES_DIR` (phi-ag `d2eb1f3`),
`RVT_PROJECT_CORPUS_DIR` (magnetar `fd755e1` with RE1 and `r2025/`, with
my two phase models added locally) and `RVT_NORDIC_LCA_DIR` (BIM4LCA),
so the new test ran rather than skipped.
- `python3 tools/release/changelog.py check` and `python3
tools/ci/re-citations.py` pass.
- [x] Verified end to end on real Revit files: the command, the files
(and their licence), and the measured result against Revit's own export
are in the PR body, with the script or probe that reproduces it

  | model | phases | Revit's export | `main` | this branch |
  |---|---|---|---:|---:|
| `01_Walls_Phases` | Existing, New Construction, Phase 3; wall 2788
created in Phase 3 | 5 walls | 5 | 5 |
| `01_Walls_Phases_Demo` | the same; wall 2892 demolished in Phase 3 | 4
walls, not 2892 | 5 | 4 |

  With the filter disabled the test fails:

  ```text
assertion `left == right` failed: 01_Walls_Phases_Demo: walls rvt-rs
writes against Revit's
    left: {"2787", "2788", "2789", "2790", "2892"}
   right: {"2787", "2788", "2789", "2790"}
  ```

  `rvt-ifc --diagnostics` on `main` and on this branch:

  | file | left out by phase | building elements, `main` → branch |
  |---|---|---|
| Snowdon Architectural 2024 | 6 Floors: 2287679, 2287686, 2287693,
2287700, 2287707, 2287714 | 6,056 → 6,050; only `IfcSlab` changes (224 →
218) |
| Snowdon Architectural 2025 | the same 6 Floors | 6,044 → 6,038; the
files differ only by those six `IfcSlab` and what they own |
| Snowdon Facades 2025 | 104: Wall 42, GenericModel 25, Window 20,
WallSweep 11, Roof 6 (created in Existing, demolished in New
Construction) | 479 → 375: `IfcWall` 80 → 38, `IfcBuildingElementProxy`
307 → 271, `IfcWindow` 66 → 46, `IfcRoof` 6 → 0 |
| Golden Nugget Architektur 2025 | 30: Wall 18, Window 6, StairsRun 2,
Railing, Roof, Stair, StairsLanding (33 records, 30 of them exported
instances) | 2,634 → 2,604: `IfcWall` 451 → 433, `IfcWindow` 46 → 40,
`IfcStairFlight` 19 → 17, `IfcRoof`, `IfcSlab`, `IfcRailing` and
`IfcStair` one each |

Snowdon 2024 is the edition #328 measured, fetched from Autodesk's host
by its pin in `research/autodesk-sample-projects.tsv` (sha256
`33271010…`, matched), and the six slabs it lists are the ones left out.
I have no Revit export of Facades or Golden Nugget, so their counts are
the rule's and are not checked against Revit.

Files: Snowdon Towers (Autodesk's sample projects, 2024 from the pinned
Autodesk download, 2025 a local copy; not redistributed, as
`tools/fetch-autodesk-samples.sh` says, their own terms not checked).
Golden Nugget (a local copy, not in rvt-rs's corpora; licence not
checked, not redistributed). `01_Walls_Phases` and
`01_Walls_Phases_Demo` (my own, not shared). RE1, Core Interior
(magnetar, MIT) and the R2025 models (mine, Apache-2.0, #356).

`probe_re184_phase_order` over every distinct local `.rvt` (135 files):
the native path reads 94, and 91 list phases (Revit 2024 to 2027). Only
the four files above leave anything out. That includes RE1, Core
Interior and the 23 R2025 models, so the rule removes nothing their
reference exports hold. Files the native path doesn't read (Revit 2019
to 2022) get an empty filter and export as before.
- [x] If this touches the IFC exporter: the witness verdicts replay (see
CONTRIBUTING.md) or the changed observations are refreshed in this PR
- Core Interior has no element outside its last phase, so its export is
unchanged and its witness tests pass in the suite above.
- N/A: performance. `tools/bench.sh` wasn't run.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR — no claims
of features that are not actually shipped in this PR
- [x] A user-visible change has its entry as a fragment under
`changelog.d/<section>/` (see `changelog.d/README.md`), not in
`CHANGELOG.md`
  - `changelog.d/fixed/phase-filter.md`.
- [x] If a limitation was resolved, the "Known limitations" / "What
works today" section in the relevant docs is updated
- The README's and `docs/status.md`'s "phase filtering (#328)" gaps are
removed. I left the README's Revit 2024 Snowdon sentence (5,974
elements, 29 of them not in Revit's export, "6 slabs in the Legends
phase") as it is: its counts are against Revit's 2024 export, which I
don't have, so I can't restate them. With this PR those six slabs are no
longer written.
- [x] If a new limitation was introduced, it is documented in the PR
body and in-code
- An export setting that picks a phase other than the last isn't read.
The export phase is always the last.
- [x] Commit messages describe WHAT changed and WHY, not "fix things" or
"updates"
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files
- The test and probe take their paths from `RVT_PROJECT_CORPUS_DIR` or
arguments. The commits are authored with GitHub's noreply address, and
signed.
- [x] If this is a reverse-engineering finding: a reproducible probe
under `examples/` and a dated addendum to
`docs/rvt-moat-break-reconnaissance.md` are included

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0 (see
`CONTRIBUTING.md`)
- [x] This PR contains no Autodesk proprietary source, decompiled
internals, or NDA'd SDK content (see `CLEANROOM.md`)
- [x] Any new test fixtures use synthetic values (`testuser`, `111111`,
`FY-20XX`, etc.) and contain no real-world PII
  - No fixtures. The two phase models are neither committed nor shared.

The changes in this PR are based on public byte observations of the
reference models and of two models I made in Revit 2025, together with
Revit's own IFC exports of them (CLEANROOM.md source 1). I have not used
Autodesk SDK source, ODA SDK source, leaked internal documentation, NDA
material, or decompiled internal Revit implementation code beyond public
symbol exports, and I have not copied or translated code from revit-ifc.

## Breaking changes

None. `RevitFile::phase_filter()` and `rvt::research::native_phases` are
new and behind `unstable-research`. The export writes fewer elements
only where they don't exist in the last phase, and its diagnostics name
them.

## Screenshots or output samples

Snowdon Architectural, `rvt-ifc --diagnostics`:

```json
{"reason": "element_record_not_in_export_phase", "count": 6, "classes": {"Floor": 6}, "sample_names": []}
```

## Related issues

Fixes #328. Related to #309.

## Maintainer changes before landing (2026-10-30)

puzzbobb's commit is kept first, under their name. The maintainer added
the four changes the 2026-10-29 review asked for:

1. **Rooms are not filtered.** Revit's exporter applies the
created/demolished rule to non-spatial elements only (revit-ifc
`ElementFilteringUtil.GetExportFilter`). It skips a room whose
`ROOM_PHASE` is not the export phase (`IsRoomInInvalidPhase`, called
from `Exporter.ExportSpatialElements`), and checks no area or MEP space.
No model here shows `ROOM_PHASE` to be the room's created phase, so
`PhaseFilter::excludes` never excludes a room. The README, status and
supported-profile docs, the report and the changelog state the gap.
2. **The test's CI status is stated.** `tests/phase_filter.rs` and the
report say plainly that CI does not run the test until the two phase
models are published.
3. **A failed phase read warns.** A phase read that fails on a release
the native reader handles (2023 to 2027) now adds an export-diagnostics
warning instead of silently exporting every element.
4. **Snowdon's figures:** 5,968 exported and 23 not in Revit's export,
in the README, reference-models and the W4 row. The new skipped item is
documented in export-diagnostics.

Rebased onto `main` after #1128, #1131 and #1132. The new probe now
lives in `probes/examples/` (#1132).

## Verification

Measure
[41025987689](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41025987689),
unfiltered against `main` with nordic, r2025 and Autodesk's samples:
- 89 of 90 exports are byte-identical. So is every scorer output, and
every diagnostics file but one.
- The one that moves is Autodesk's Snowdon Towers architectural sample.
`IfcSlab` goes from 224 to 218 and Floor elements from 182 to 176, and
the new skipped item `element_record_not_in_export_phase` = 6 (Floor).
Those are the six Legends slabs of #328.
- No model shows a phase-read warning.

---------

Co-authored-by: Griffin Long <[email protected]>
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
… ifc::NotYetImplemented (#1148)

## Summary

This PR removes two leftovers of removed code from the stable API, in
one breaking change as Griffin chose on 2026-10-30:

- the relation-domain section of `rvt-capabilities` and the capability
manifest;
- `ifc::NotYetImplemented`.

## Motivation

The unused-API removal (#1128) kept both because something still named
them. #1131 then removed the typed-relation module itself, which left
the manifest claiming "RelationDomain registry +
SCC/condensation/quarantine stubs exist". `rvt-capabilities` printed
that claim to users, and it was false. `NotYetImplemented` was an error
no exporter returned. The `Exporter` trait's doc still described
exporters "phased up" from a null one.

## Changes

- `src/capability.rs`:
- The manifest loses `relation_domains` and its
`relations.typed_domains` row.
- `RelationDomain`, `RelationDomainRegistry`, `RelationDomainEntry` and
`DomainStatus` go.
- Two rows that carried internal planning labels say in plain words what
they mean ("Nothing reads the compound variant's openings (RE-15)"; "Its
fixtures need Revit API output the project does not have").
- The compound row's non-claim about marker tokenization goes: that
tokenizer was removed in #1131.
- `src/bin/rvt_capabilities.rs`: the text output and the `about` line
drop the section.
- `docs/schemas/capability-manifest.schema.json`: `relation_domains`
leaves `required` and `properties`, and the description no longer
mentions it.
- `src/ifc/mod.rs`: `NotYetImplemented` goes. The `Exporter` doc names
the three exporters that implement it, and `PlaceholderExporter`'s doc
drops its note about the old name.
- `changelog.d/removed/relation-domains.md`.

## Testing

Unit tests are banned and none are added.
`tests/json_schema_contracts.rs` validates `rvt-capabilities --json`
against the edited schema on Linux with the family corpus. `semver
checks` must see the break, which the `!` in the title announces.
Exports do not change: no exporter touches these types.

## Audit-honesty checklist

- [x] No surface claims code that no longer exists
- [x] Changelog fragment under `removed/`
- [x] No emojis, private paths or internal jargon

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content

## Breaking changes

Rust:
- `rvt::capability::{RelationDomain, RelationDomainRegistry,
RelationDomainEntry, DomainStatus}` are gone.
- `CapabilityManifest::relation_domains` is gone.
- `rvt::ifc::NotYetImplemented` is gone.

CLI: `rvt-capabilities --json` drops `relation_domains`, and the text
output drops its section.

Nothing replaces any of these, since no code read or wrote a relation
domain or returned the error.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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