Skip to content

refactor(probes): move the 244 RE probes into their own workspace crate, rvt-probes - #1132

Merged
DrunkOnJava merged 2 commits into
mainfrom
refactor/probes-crate
Oct 30, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
refactor/probes-crate

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

The 244 probe_*.rs programs behind the RE reports move from examples/ into probes/examples/, the examples of a new unpublished workspace crate, rvt-probes. rvt's builds and CI checks stop compiling them. CI's clippy job checks them once.

Motivation

Griffin's decision, from the 2026-10-30 interview: the audit's four refactors, this one included. As examples of rvt, all 244 probes compiled in every --all-targets run: clippy, the Linux build, the MSRV check and the Windows and macOS builds. cargo package also had to skip each one (#1127).

Changes

  • probes/Cargo.toml: rvt-probes, publish = false. It depends on rvt (with unstable-research) and the five crates the probes use directly: anyhow, cfb, memchr, serde_json and sha2. It is a workspace member, and Cargo.lock gains only its entry (cargo metadata --locked --offline resolves).
  • The move: git mv examples/probe_*.rs probes/examples/. The 49 corpus defaults built from CARGO_MANIFEST_DIR gain /... The 186 run commands in the probes' module docs name -p rvt-probes. rustfmt reflowed the lines that grew.
  • CI: cargo clippy -p rvt-probes --examples --no-deps -- -D warnings in the clippy job.
  • Measure: a probe builds with -p rvt-probes from probes/examples, or from examples/ on a ref older than this move, so base runs on older commits still work. Both land in target/ci/examples, which measure-reference-models.sh already runs from.
  • Docs: CONTRIBUTING, the PR template, the README, examples/README.md, a new probes/README.md, the support matrix's 104 evidence paths, rustdoc in four modules, and 61 scorers' docstrings. Reports and dated research notes keep the paths they were written with; git follows the rename.
  • Changelog: changelog.d/changed/probes-crate.md.

The user examples (basics_*) and the ~37 earlier research tools stay in examples/, since the README and the reconnaissance report cite them by path.

Testing

  • CI is the compile check: the new clippy step builds all 244 probes, and the rvt jobs prove they no longer need them.
  • Measure 41027853083 runs this branch's workflow and code with two probes on Core Interior (probe_re70_wall_join_lists scored by wall_join_lists_vs_ifc, and probe_re33_category_census). That proves the new build path end to end. The result will be posted here before merge.

Breaking changes

None for the crate. Anyone running a probe adds -p rvt-probes.

Related issues

None.

…te, rvt-probes

Griffin's decision (2026-10-30, the repository audit's refactors). The
probes were examples of the rvt package, so every `--all-targets` build,
clippy run and MSRV check compiled all 244, in clippy, the three-OS build
matrix and the MSRV job, and cargo package had to skip them.

- probes/Cargo.toml: rvt-probes, publish = false, depending on rvt with
  unstable-research and on the five crates the probes use directly
  (anyhow, cfb, memchr, serde_json, sha2). A workspace member.
- git mv examples/probe_*.rs probes/examples/. The 49 corpus defaults built
  from CARGO_MANIFEST_DIR gain "/..", and the 186 run commands in the
  probes' docs name -p rvt-probes.
- ci.yml: clippy -p rvt-probes --examples, once, in the clippy job.
- measure.yml: a probe builds from probes/examples with -p rvt-probes, or
  from examples/ on a ref from before the move; both land in
  target/ci/examples, where measure-reference-models.sh runs it.
- Current-state docs point at probes/examples: CONTRIBUTING, the PR
  template, the README, examples/README, a new probes/README, the support
  matrix's evidence, rustdoc and the scorers' docstrings. Reports and dated
  research notes keep the paths they were written with; git follows the
  rename.

@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.

  • The move: git mv of 244 files, all renames with small edits. The 49 CARGO_MANIFEST_DIR corpus defaults now read /../_corpus/… and /../_project_corpus/…, all 6 + 41 single-line forms plus 2 multi-line ones. The 186 run commands name -p rvt-probes. rustfmt reflowed the 39 lines that grew.
  • probes/Cargo.toml: publish = false, depending on rvt with unstable-research plus anyhow, cfb, memchr, serde_json and sha2. A scan of every probe's use and path roots found no other external crate. Cargo.lock adds only rvt-probes.
  • Measure: the build branches on probes/examples versus examples/, so a base run on an older commit still builds its probes. Run 41027853083 built two probes with -p rvt-probes (Compiling rvt-probes v0.0.0), and both ran with exit 0. That run's scorer crash came from the scorer reading Measure's combined capture, not from the move; #1134 fixes it.
  • Docs: reports and dated research notes keep their original paths on purpose. One dated note (docs/cfb-structural-layout-2026.md) was caught by the rewrite and has been restored. The merge with #1131 re-applied the 104 support-matrix path rewrites onto main's file.
  • Verified in CI: CI passed. The new step cargo clippy -p rvt-probes --examples --no-deps -- -D warnings checked every probe in 15.7 s. The Linux build-and-real-files job took 134 s, against 244 s on main's latest run (one pair of runs, so indicative only).

Ready to land.

@DrunkOnJava
DrunkOnJava merged commit e50403b into main Oct 30, 2026
35 checks passed
@DrunkOnJava
DrunkOnJava deleted the refactor/probes-crate branch October 30, 2026 08:57
DrunkOnJava added a commit to puzzbobb/rvt-rs that referenced this pull request Oct 30, 2026
…te (DrunkOnJava#1132)

DrunkOnJava#1132 moved every probe into probes/examples while this PR was open; its new probe moves there too, its run command names -p rvt-probes, and the RE-184 report and reconnaissance addendum cite the new path.
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
…re captures with its JSON rows (#1134)

## Summary

Measure writes a probe's stderr into the same file as its stdout
(`measure-reference-models.sh:352`, `> "$out" 2>&1`), so the probe's
summary line comes first. Five wall scorers parsed every line as JSON
and crashed on it. They now read only the lines that start with `{`, as
`record_flags_vs_ifc` and `reference_slots_vs_ifc` already do.

## Motivation

Found while verifying #1132. In Measure 41027853083,
`wall_join_lists_vs_ifc` on `probe_re70_wall_join_lists` failed with
`JSONDecodeError: Expecting value: line 1 column 1` on the summary line
`Revit 2024: 319 walls with a centreline, …`. The move in #1132 did not
cause it: the scorer has read the file this way since it was written.

## Changes

`wall_join_lists_vs_ifc`, `wall_angled_joins_vs_ifc`,
`wall_arcs_vs_ifc`, `wall_layer_joins_vs_ifc` and
`wall_tee_joins_vs_ifc`: `map(json.loads, open(path))` becomes a
generator over the lines that start with `{`.

## Testing

A probe's scorer comes from `-f ref`, not `--ref`. The first check (run
41028375789) set `-f ref=main`, so it ran `main`'s unfixed scorers and
failed on the same line 58. These runs used this branch for both:

- Measure
[41029780230](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41029780230),
Core Interior, every scorer `exit 0`:
- `probe_re70_wall_join_lists` → `wall_join_lists_vs_ifc`: "319 walls
with a centreline; 122 name a wall".
  - `probe_re71_layered_joins` → `wall_layer_joins_vs_ifc`.
- `probe_re73_tee_joins` → `wall_tee_joins_vs_ifc`: "202 single layer,
every layer right".
- `probe_re75_wall_arcs` → `wall_arcs_vs_ifc`: Core Interior has no arc
walls.
- Measure
[41029788981](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41029788981):
`probe_re73_tee_joins` → `wall_angled_joins_vs_ifc`, `exit 0`. Core
Interior has no angled joins to count.

## Breaking changes

None.

## Related issues

Refs #1132.
@DrunkOnJava DrunkOnJava mentioned this pull request Oct 30, 2026
4 tasks done
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
## Summary

Release metadata for v0.11.0 (RELEASE.md steps 4 to 7). Merging this is
not the release: the signed `v0.11.0` tag on its squash commit is.

## Motivation

`main` holds user-facing fixes that installed users do not have yet,
above all #1075 (a model over the reader's limits exported empty with
exit status 0; the reporter can verify only from a release) and #421
(files that kept an older schema read as zero elements). It also holds
the breaking removal of unused stable API (#1128), which makes this a
minor release.

## Changes

- Version 0.11.0 in `Cargo.toml`, `rvt-py/Cargo.toml` (and its `=0.11.0`
pin), `rvt-wasm/Cargo.toml`, `tools/stream_evidence/Cargo.toml`,
`viewer/package.json`, `CITATION.cff` (dated 2026-10-30), both
lockfiles' workspace entries, and the `FILE_NAME` / `IFCAPPLICATION`
lines of the two synthetic IFC fixtures, which the contract checks
compare byte for byte since #1133. RELEASE.md's version list now names
those fixtures.
- `CHANGELOG.md`: `changelog.py assemble` moved the 33 fragments into
`[0.11.0] — 2026-10-30`, with an introduction, credits (puzzbobb: #1074,
#1076, #1077, #1081; n3ur0m4n: #1073) and "Upgrading from 0.10" (removed
API, exit status 3 for a model over the limits, saved meshes on by
default, properties no longer written, `Flagged` schema fields, the
probes crate).
- `README.md`: "Release 0.11.0 and main", and the reconnaissance probes
point at `probes/examples/` (#1132).
- `rvt-py/README.md` (packed into the wheel): what `write_ifc()` does
when part of a file was over the limits.

## Testing

CI is the gate. After this PR's CI, both Core Interior `rvt-rs.json`
witness observations and their verdicts are refreshed from its
`octetproof-core-interior` artifact (only `witness_version` and the
verdict hashes may differ); the PR stays unarmed until then.

## Audit-honesty checklist

- [x] The changelog section and README release section state only what
the entries measured
- [x] No emojis, private paths or internal jargon

## Legal and contribution hygiene

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

## Breaking changes

The release carries #1128's removal of unused public API; "Upgrading
from 0.10" lists what a user changes.
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