Repository navigation
research(re-15): geometry probes for slabs, layers, doors, names - #117
Conversation
Add falsifiable RE-15 probes and a synthesis report toward real geometry (#87/#88/#89/#86), plus narrowly version-gated helpers: 2024 ArcWallRectOpening 60 B index decoder and partition name candidate classification. Corpus invariant tests lock the confirmed findings. Does not touch the ArcWall IFC finish-line path. Refs #87 #88 #89 #86 #81 #82 #83 #84 Co-authored-by: DrunkOnJava <[email protected]>
Adapt RE-15/#86 name candidates from PR #117 and wire confident building-storey labels (Level N / Roof / Ground floor) onto elevation- derived IFC storeys. Keep thickness unresolved per RE-15/#88; leave openings to #117. Co-authored-by: DrunkOnJava <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Scan skips last record start
- Changed both probe scanners from exclusive
0..len.saturating_sub(min)to inclusive0..=(len - min)with a length guard, matchingArcWallRecord::find_allso offsetlen - 292is visited.
- Changed both probe scanners from exclusive
Or push these changes by commenting:
@cursor push dec307087e
Preview (dec307087e)
diff --git a/examples/probe_re15_compound_layers.rs b/examples/probe_re15_compound_layers.rs
--- a/examples/probe_re15_compound_layers.rs
+++ b/examples/probe_re15_compound_layers.rs
@@ -30,15 +30,17 @@
} else {
0x20
};
- for i in 0..buf.len().saturating_sub(min) {
- let tag = u16::from_le_bytes([buf[i], buf[i + 1]]);
- if tag != ARC_WALL_TAG || buf[i + 2] != 0 || buf[i + 3] != 0 {
- continue;
+ if buf.len() >= min {
+ for i in 0..=(buf.len() - min) {
+ let tag = u16::from_le_bytes([buf[i], buf[i + 1]]);
+ if tag != ARC_WALL_TAG || buf[i + 2] != 0 || buf[i + 3] != 0 {
+ continue;
+ }
+ let v = u16::from_le_bytes([buf[i + 0x10], buf[i + 0x11]]);
+ if v == variant {
+ out.push(i);
+ }
}
- let v = u16::from_le_bytes([buf[i + 0x10], buf[i + 0x11]]);
- if v == variant {
- out.push(i);
- }
}
out
}
diff --git a/examples/probe_re15_opening_stride60.rs b/examples/probe_re15_opening_stride60.rs
--- a/examples/probe_re15_opening_stride60.rs
+++ b/examples/probe_re15_opening_stride60.rs
@@ -24,15 +24,17 @@
.flatten()
.collect();
let mut offs = Vec::new();
- for i in 0..concat.len().saturating_sub(292) {
- let tag = u16::from_le_bytes([concat[i], concat[i + 1]]);
- if tag != ARC_WALL_TAG || concat[i + 2] != 0 || concat[i + 3] != 0 {
- continue;
+ if concat.len() >= 292 {
+ for i in 0..=(concat.len() - 292) {
+ let tag = u16::from_le_bytes([concat[i], concat[i + 1]]);
+ if tag != ARC_WALL_TAG || concat[i + 2] != 0 || concat[i + 3] != 0 {
+ continue;
+ }
+ let variant = u16::from_le_bytes([concat[i + 0x10], concat[i + 0x11]]);
+ if variant == ARC_WALL_VARIANT_STANDARD {
+ offs.push(i);
+ }
}
- let variant = u16::from_le_bytes([concat[i + 0x10], concat[i + 0x11]]);
- if variant == ARC_WALL_VARIANT_STANDARD {
- offs.push(i);
- }
}
println!(
"=== Einhoven ArcWall thickness sweep — {} records ===",You can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4bdba44. Configure here.
| } else { | ||
| 0x20 | ||
| }; | ||
| for i in 0..buf.len().saturating_sub(min) { |
There was a problem hiding this comment.
Scan skips last record start
Low Severity
The exclusive range 0..len.saturating_sub(292) never visits the last legal start of a 292-byte standard ArcWall record. The existing production scanner uses an inclusive bound. A wall packed at the end of the partition is skipped, so trailer and thickness sweeps can undercount.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 4bdba44. Configure here.
Remove unused LoopCandidate::sample and thickness_plausible helper so clippy -D warnings passes on the RE-15 probe examples. Co-authored-by: DrunkOnJava <[email protected]>
- Use slice::contains for Level 1 assertion (manual_contains) - Replace 12.0/12.0 with 1.0 in thickness sweep (eq_op) Co-authored-by: DrunkOnJava <[email protected]>
|
Deps advisories (deny / audit / npm): out of scope for this RE-15 research PR. A shared deps PR will clear |
Bump anyhow (≥1.0.103), crossbeam-epoch (≥0.9.20), quick-xml 0.41, and pyo3 0.29 to clear RUSTSEC advisories that were failing cargo audit/deny across finish-line PRs. Adapt PartAtom parsing for quick-xml 0.38+ GeneralRef entity streaming. Run npm audit fix in viewer/ (nanoid, postcss, vite 8.x patch) so high-severity npm audit passes without a Vite major bump. Co-authored-by: DrunkOnJava <[email protected]>
…ry-probes-44c9 Pull in shared Rust/npm advisory bumps from #118 so RE-15 PR #117 clears deny/audit/npm CI noise without expanding decoder scope. Co-authored-by: DrunkOnJava <[email protected]>
|
Deps advisories cleared via merge of #118 ( Local after merge: |
## Summary Clears the shared cargo-audit / cargo-deny / viewer npm-audit failures that have been failing unrelated finish-line PRs (#114–#117) on the same advisories. **After this merges, #115 / #116 / #117 (and related finish-line branches) should rebase onto `main`** so they pick up the lockfile fixes without each re-fighting the same CI jobs. ### Rust (`Cargo.lock` / `Cargo.toml` / `rvt-py`) | Crate | From → To | Advisory | |---|---|---| | `anyhow` | 1.0.102 → 1.0.104 | RUSTSEC-2026-0190 | | `crossbeam-epoch` | 0.9.18 → 0.9.20 | RUSTSEC-2026-0204 | | `quick-xml` | 0.36.2 → 0.41.0 | RUSTSEC-2026-0194 / 0195 | | `pyo3` | 0.24.2 → 0.29.2 | RUSTSEC-2026-0176 / 0177 | `PartAtom` parsing adapted for quick-xml ≥0.38 (`Event::GeneralRef` entity streaming; no ignore/pin). ### Viewer npm `npm audit fix` in `viewer/` (stayed on Vite 8.x): - `vite` 8.0.9 → 8.2.2 - `postcss` → 8.5.26 - `nanoid` → 3.3.18 ## Test plan - [x] `cargo check --workspace` - [x] `cargo audit` clean - [x] `cargo deny check advisories` ok - [x] `cargo test --lib part_atom` (8 passed) - [x] `cd viewer && npm audit --audit-level=high` → 0 vulnerabilities - [ ] CI green on this PR No product / ArcWall / viewer feature work included. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > PartAtom parsing behavior changed to match a new XML event model; incorrect entity/whitespace handling could misread family metadata, while pyo3 upgrades affect the Python wheel ABI surface. > > **Overview** > Bumps Rust and viewer dependencies to clear **cargo-audit**, **cargo-deny**, and **npm audit** failures that were blocking unrelated PRs, with a targeted parser fix for the **quick-xml** major-line upgrade. > > **Rust:** `quick-xml` **0.36 → 0.41**, `pyo3` **0.24 → 0.29** (`rvt-py`), plus transitive fixes (`anyhow`, `crossbeam-epoch`). **`PartAtom::from_bytes`** in `part_atom.rs` is updated for quick-xml ≥0.38: entities stream as **`Event::GeneralRef`** instead of inline expansion, text is accumulated in **`pending`** and flushed on end tags (replacing **`trim_text`** + **`BytesText::unescape`**), and category **`scheme`** attributes use **`normalized_value`**. > > **Viewer:** `viewer/package-lock.json` from **`npm audit fix`** (e.g. **vite** 8.0.9 → 8.2.2, **rolldown** 1.2.6, **postcss** / **nanoid** bumps)—dev tooling only, no app feature changes. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e312d79. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>
## Summary Deepens the only working real-project typed export path (Revit 2023 ArcWall → IFCWALL) with RE-15 trailer recovery: validated ElementIds, type-id candidates, base elevations, elevation-derived storeys with confident partition Level names, a shared partition scan API, and ElemTable linkage — without inventing wall height or thickness. ## Motivation Gate B / 0.3.0 / M11 needs the ArcWall path to stop being an IFC-only side scan with hardcoded thickness/height defaults. Refs #30, #33, #25, #28. Incorporates low-risk findings from sibling RE-15 PR #117. ## Changes - `src/arc_wall_record.rs` — singleton trailer decode (`ElementId`, `TypeId`, base elevation); `height_feet()` from core Z delta - `src/partition_arc_walls.rs` — shared scan API; storey recovery; ElementId→partition index; Level-name application - `src/partition_name_candidates.rs` — adapted from PR #117 (#86); plus `is_building_storey_name` / `building_storey_name_candidates` - `src/elem_table.rs` — `index_by_element_id` + `link_arcwall_element_ids` - `src/ifc/mod.rs` — shared path; named storeys when confident; property set; no invented 10 ft height; thickness placeholder + #88-aware diagnostics - `reports/element-framing/RE-15-arcwall-trailer-synthesis.md` — trailer evidence + #117 cross-links - Corpus / walker integration tests; docs/status honesty pass ## CI follow-ups - **IfcOpenShell real IFC:** validator accepts one `IfcRelContainedInSpatialStructure` per non-empty storey (Einhoven: 4 rels / 4 storeys / 24 walls); related-element total must cover `building_elements`. - **Viewer Playwright:** drop `unsupported_geometry_missing_level`; assert `Partial decode`, `/unit|thickness|storey/i`, `storey_count: 4`, thickness warning. - **Deps:** `anyhow` 1.0.104, `crossbeam-epoch` 0.9.20, `quick-xml` 0.41 (+ PartAtom parse adapt), `pyo3` 0.29; viewer `npm audit fix`. - **PartAtom (wheel CI):** sibling `<title>` elements were concatenating (`racbasicsamplefamily0610 x 0915mm`) after the ArcWall-branch quick-xml 0.41 rewrite. Synced `src/part_atom.rs` pending-buffer + End flush from #118 (green Python wheels) and added `later_title_element_replaces_earlier` / entity-chunk unit tests so only the Atom title text is returned. --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>
Resolve add/add on partition_name_candidates by keeping the Gate B storey-name filter from main, and keep rect_opening_index from RE-15. Co-authored-by: DrunkOnJava <[email protected]>
## Summary Clears the shared cargo-audit / cargo-deny / viewer npm-audit failures that have been failing unrelated finish-line PRs (#114–#117) on the same advisories. **After this merges, #115 / #116 / #117 (and related finish-line branches) should rebase onto `main`** so they pick up the lockfile fixes without each re-fighting the same CI jobs. ### Rust (`Cargo.lock` / `Cargo.toml` / `rvt-py`) | Crate | From → To | Advisory | |---|---|---| | `anyhow` | 1.0.102 → 1.0.104 | RUSTSEC-2026-0190 | | `crossbeam-epoch` | 0.9.18 → 0.9.20 | RUSTSEC-2026-0204 | | `quick-xml` | 0.36.2 → 0.41.0 | RUSTSEC-2026-0194 / 0195 | | `pyo3` | 0.24.2 → 0.29.2 | RUSTSEC-2026-0176 / 0177 | `PartAtom` parsing adapted for quick-xml ≥0.38 (`Event::GeneralRef` entity streaming; no ignore/pin). ### Viewer npm `npm audit fix` in `viewer/` (stayed on Vite 8.x): - `vite` 8.0.9 → 8.2.2 - `postcss` → 8.5.26 - `nanoid` → 3.3.18 ## Test plan - [x] `cargo check --workspace` - [x] `cargo audit` clean - [x] `cargo deny check advisories` ok - [x] `cargo test --lib part_atom` (8 passed) - [x] `cd viewer && npm audit --audit-level=high` → 0 vulnerabilities - [ ] CI green on this PR No product / ArcWall / viewer feature work included. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > PartAtom parsing behavior changed to match a new XML event model; incorrect entity/whitespace handling could misread family metadata, while pyo3 upgrades affect the Python wheel ABI surface. > > **Overview** > Bumps Rust and viewer dependencies to clear **cargo-audit**, **cargo-deny**, and **npm audit** failures that were blocking unrelated PRs, with a targeted parser fix for the **quick-xml** major-line upgrade. > > **Rust:** `quick-xml` **0.36 → 0.41**, `pyo3` **0.24 → 0.29** (`rvt-py`), plus transitive fixes (`anyhow`, `crossbeam-epoch`). **`PartAtom::from_bytes`** in `part_atom.rs` is updated for quick-xml ≥0.38: entities stream as **`Event::GeneralRef`** instead of inline expansion, text is accumulated in **`pending`** and flushed on end tags (replacing **`trim_text`** + **`BytesText::unescape`**), and category **`scheme`** attributes use **`normalized_value`**. > > **Viewer:** `viewer/package-lock.json` from **`npm audit fix`** (e.g. **vite** 8.0.9 → 8.2.2, **rolldown** 1.2.6, **postcss** / **nanoid** bumps)—dev tooling only, no app feature changes. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d4e146a035a291fb82a75f45f5e4e01b788008d2. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>
## Summary Deepens the only working real-project typed export path (Revit 2023 ArcWall → IFCWALL) with RE-15 trailer recovery: validated ElementIds, type-id candidates, base elevations, elevation-derived storeys with confident partition Level names, a shared partition scan API, and ElemTable linkage — without inventing wall height or thickness. ## Motivation Gate B / 0.3.0 / M11 needs the ArcWall path to stop being an IFC-only side scan with hardcoded thickness/height defaults. Refs #30, #33, #25, #28. Incorporates low-risk findings from sibling RE-15 PR #117. ## Changes - `src/arc_wall_record.rs` — singleton trailer decode (`ElementId`, `TypeId`, base elevation); `height_feet()` from core Z delta - `src/partition_arc_walls.rs` — shared scan API; storey recovery; ElementId→partition index; Level-name application - `src/partition_name_candidates.rs` — adapted from PR #117 (#86); plus `is_building_storey_name` / `building_storey_name_candidates` - `src/elem_table.rs` — `index_by_element_id` + `link_arcwall_element_ids` - `src/ifc/mod.rs` — shared path; named storeys when confident; property set; no invented 10 ft height; thickness placeholder + #88-aware diagnostics - `reports/element-framing/RE-15-arcwall-trailer-synthesis.md` — trailer evidence + #117 cross-links - Corpus / walker integration tests; docs/status honesty pass ## CI follow-ups - **IfcOpenShell real IFC:** validator accepts one `IfcRelContainedInSpatialStructure` per non-empty storey (Einhoven: 4 rels / 4 storeys / 24 walls); related-element total must cover `building_elements`. - **Viewer Playwright:** drop `unsupported_geometry_missing_level`; assert `Partial decode`, `/unit|thickness|storey/i`, `storey_count: 4`, thickness warning. - **Deps:** `anyhow` 1.0.104, `crossbeam-epoch` 0.9.20, `quick-xml` 0.41 (+ PartAtom parse adapt), `pyo3` 0.29; viewer `npm audit fix`. - **PartAtom (wheel CI):** sibling `<title>` elements were concatenating (`racbasicsamplefamily0610 x 0915mm`) after the ArcWall-branch quick-xml 0.41 rewrite. Synced `src/part_atom.rs` pending-buffer + End flush from #118 (green Python wheels) and added `later_title_element_replaces_earlier` / entity-chunk unit tests so only the Atom title text is returned. --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>



Summary
Reverse-engineering progress toward real geometry for open RE-15 P0/P1 issues, kept off the ArcWall finish-line product path. Adds reproducible probes, a dated synthesis report, corpus invariant tests, and two small ArcWall-safe helpers (2024 opening-index decoder + partition name-candidate classifier).
Motivation
Advance falsifiable RE on #87 (slab profiles), #88 (compound layers), #89 (door dims + openings), #86 (real names), with optional recall baselines for #81–#84.
Sibling branch
cursor/arcwall-finish-line-44c9ownssrc/ifc/mod.rsArcWall emission — this PR does not rewrite that path.Changes
examples/probe_re15_{names,rect_opening,opening_stride60,compound_layers,slab_profiles,recall_tags}.rs— corpus probesreports/element-framing/RE-15-synthesis.md— confidence-scored findings + next decoder stepssrc/rect_opening_index.rs— Revit 2024-only decoder for the dominant 60 BArcWallRectOpeningindex envelope (not width/height geometry)src/partition_name_candidates.rs— Material/Level/Space-like string classification helperstests/re15_geometry_invariants.rs— locks confirmed tag drift, opening-index, and name invariantssrc/lib.rs— module exports onlyCI follow-up
cargo fmt --all+ clippy-D warningsfixes in probe/test code only (unusedsample/thickness_plausible,manual_contains,eq_op)cursor/deps-advisory-bump-44c9) via merge commita17b3eb(no rebase/force-push) to clear shared deny/audit/npm advisories — Cargo.toml/Cargo.lock/rvt-py, PartAtom GeneralRef, viewerpackage-lock.jsonKey findings
Concrete,Level 1, …)ArcWallRectOpening(0x01a7) 60 B fixed index with marker0x40088204(~72%)ArcWallRectOpeninghitsTesting
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo deny check/cargo audit(post-fix(deps): clear shared CI advisories blocking finish-line PRs #118 merge)cargo test --release --test re15_geometry_invariants(5 passed)cargo test --release --lib rect_opening_index/partition_namesrc/ifc/mod.rsBreaking changes
None.
Related issues
Refs #87 #88 #89 #86 #81 #82 #83 #84