Skip to content

Partition schema MVP: Levels/Floors/Materials into iter_elements - #140

Merged
DrunkOnJava merged 1 commit into
mainfrom
cursor/partition-schema-mvp-67f9
Aug 29, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
cursor/partition-schema-mvp-67f9

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Advances schema/partition MVP recovery beyond ArcWall-only into production walker::iter_elements: fail-closed Level, Material, Room, Floor plan-loops, and Revit 2024 ArcWallRectOpening index rows with related-id provenance. Does not invent typed Door/Window success.

Motivation

PR #136 wired ArcWall + typed MVP preference. Geometry P0s #30–#33 still needed Levels/Floors/opening provenance from partition streams. This lands measurable corpus progress without fake typed Door/Window claims.

Changes

  • New partition_schema_mvp — version-gated recovers from partition strings / ArcWall elevations / plan loops / 2024 opening index
  • iter_elements merges those recovers after ArcWall (id dedup, fail closed)
  • FloorBoundarySource::PartitionPlanLoop for honesty in geometry recovery
  • tests/iter_elements_typed.rs — tier1 honesty + Einhoven (≥4 Levels, ≥5 Materials, ≥1 Floor boundary) + 2024 openings (≥50, not labeled Door/Window)
  • Docs (ROADMAP / status / README / compatibility / TODO) updated honestly

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --release --test iter_elements_typed (5 passed; Einhoven: 24 ArcWalls, 4 Levels, 41 Materials, 2 Floors, 3 Rooms; 2024: 2000 openings capped)
  • cargo test --release --lib partition_schema_mvp geometry::recovery
  • New / changed code has unit + integration tests

Audit-honesty checklist

  • Docs do not claim typed Door/Window or schema-field Wall from arbitrary partitions
  • Synthetics stay honest (tier1: no invented Levels/Materials/Floors/openings)
  • HostObjAttr still filtered on production path
  • No Autodesk samples committed

Related issues

Refs #30 #31 #32 #33. Not closing — schema-field Wall, Floor←ElemTable binding, and Door/Window host typing remain open.


Note

Medium Risk
Changes production element enumeration with heuristic partition scans that could add false positives or performance cost on large 2024 files, though fail-closed filters, caps, and corpus tests mitigate that.

Overview
Production walker::iter_elements now merges fail-closed partition recoveries beyond 2023 ArcWall: Level (storey names + ArcWall-derived elevations), Material / Room (strict partition name filters), Floor (closed plan loops with ArcWall-endpoint exclusion), and on Revit 2024 ArcWallRectOpening index rows with related-id provenance — explicitly not relabeled as typed Door / Window.

The new partition_schema_mvp module implements version-gated scans (reusing existing partition / opening-index helpers, WalkerLimits, and caps). recover_floor_boundary tags FloorBoundarySource::PartitionPlanLoop when m_source is partition_plan_loop.

tests/iter_elements_typed.rs tightens tier1 honesty (no invented partition MVP classes) and adds corpus checks for Einhoven (levels, materials, floors) and 2024 Core Interior (opening index). README / ROADMAP / status / compatibility / TODO are updated to describe the broader partial coverage without overclaiming schema-field walls or door/window host binding.

Reviewed by Cursor Bugbot for commit 8ade196. Configure here.

Wire fail-closed partition recovers beyond ArcWall into production
iter_elements: elevation+name Levels, Material/Room display names,
ArcWall-excluded Floor plan loops, and 2024 ArcWallRectOpening index
rows (related-id provenance only — no invented Door/Window).

Corpus tests assert tier1 honesty and measurable Einhoven/2024
progress; docs updated honestly for remaining Wall/Door/Window gaps.

Co-authored-by: DrunkOnJava <[email protected]>
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review August 29, 2026 12:07
@DrunkOnJava
DrunkOnJava merged commit 1b86cdc into main Aug 29, 2026
18 of 24 checks passed
@DrunkOnJava
DrunkOnJava deleted the cursor/partition-schema-mvp-67f9 branch August 29, 2026 12:07

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8ade196. Configure here.

break;
}
}
Ok(out)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New scans ignore WalkerLimits caps

High Severity

Production iter_elements now inflates and byte-scans Partitions/* for floors and 2024 openings without applying WalkerLimits.max_scan_bytes. Opening recovery never consults the scan budget, and the floor path still processes the largest stream after the budget is already exceeded. That drops the existing DoS cap on hostile or 98 MiB-class partitions.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by learned rule: WalkerLimits cap production ArcWall scans

Reviewed by Cursor Bugbot for commit 8ade196. Configure here.

Comment thread src/walker.rs
}
out.push(decoded);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

IFC scaffold emits new proxies

Medium Severity

Merging partition Material, Room, Floor, and ArcWallRectOpening rows into production iter_elements feeds default scaffold IFC export. Unmapped Material and ArcWallRectOpening become IFCBUILDINGELEMENTPROXY (all named *-unnamed because id is None). On 2024 files that can be thousands of proxies; name-only Room/Floor hits also count as typed IFC.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by learned rule: Lane Seven IFC modes shape emission; no HostObjAttr proxies

Reviewed by Cursor Bugbot for commit 8ade196. Configure here.

DrunkOnJava added a commit that referenced this pull request Aug 29, 2026
… ElemTable joins (#141)

## Summary
Advances #30–#33 after partition schema MVP (#140) by wiring recovers
into IFC/viewer honestly and tightening opening provenance.

### Newly recovers / wires
- **Materials** no longer emit as `IFCBUILDINGELEMENTPROXY`; partition
display names → `IfcMaterial` (Einhoven 41, Core Interior 92).
- **Levels** → IFC storeys even when elevation-unresolved (2024: 12
name-only storeys).
- **Floors** → boundary-annotated `IFCSLAB` (no invented thickness);
geometry gaps use `floor_boundary_annotation_only`.
- **Rooms** → `IFCSPACE`.
- **2024 ArcWallRectOpening**: related_id_a/b cross-checked against
`Global/ElemTable` (≥1997/2000 confirmed under test caps); still **not**
typed Door/Window.
- **Inspect + viewer File Status**: production class counts +
storey/material totals; unsupported features split honestly.

### Still open (AC not met — issues stay open)
- Schema-field `Wall` instances / 2024 ArcWall envelope (#23)
- Door vs Window discrimination + host IFC voids/fills
- Floor↔ElemTable ElementId binding + slab extrusion thickness
- Opening index → `IfcOpeningElement` host join (deferred to avoid
flooding STEP)

### Tests
- Tier1 honesty + `iter_elements_typed` corpus (Einhoven / Core
Interior)
- `project_count_fixtures`, `walker_to_ifc_integration`, clippy `-D
warnings`

Refs: #30 #31 #32 #33

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> <sup>[Cursor Bugbot](https://cursor.com/bugbot) is generating a
summary for commit 1010523. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: DrunkOnJava <[email protected]>
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
## Summary

Advances schema/partition MVP recovery beyond ArcWall-only into
production `walker::iter_elements`: fail-closed `Level`, `Material`,
`Room`, `Floor` plan-loops, and Revit 2024 `ArcWallRectOpening` index
rows with related-id provenance. Does **not** invent typed
`Door`/`Window` success.

## Motivation

PR #136 wired ArcWall + typed MVP preference. Geometry P0s #30–#33 still
needed Levels/Floors/opening provenance from partition streams. This
lands measurable corpus progress without fake typed Door/Window claims.

## Changes

- New `partition_schema_mvp` — version-gated recovers from partition
strings / ArcWall elevations / plan loops / 2024 opening index
- `iter_elements` merges those recovers after ArcWall (id dedup, fail
closed)
- `FloorBoundarySource::PartitionPlanLoop` for honesty in geometry
recovery
- `tests/iter_elements_typed.rs` — tier1 honesty + Einhoven (≥4 Levels,
≥5 Materials, ≥1 Floor boundary) + 2024 openings (≥50, not labeled
Door/Window)
- Docs (ROADMAP / status / README / compatibility / TODO) updated
honestly

## Testing

- [x] `cargo fmt --all -- --check`
- [x] `cargo clippy --all-targets --all-features -- -D warnings`
- [x] `cargo test --release --test iter_elements_typed` (5 passed;
Einhoven: 24 ArcWalls, 4 Levels, 41 Materials, 2 Floors, 3 Rooms; 2024:
2000 openings capped)
- [x] `cargo test --release --lib partition_schema_mvp
geometry::recovery`
- [x] New / changed code has unit + integration tests

## Audit-honesty checklist

- [x] Docs do not claim typed Door/Window or schema-field Wall from
arbitrary partitions
- [x] Synthetics stay honest (tier1: no invented
Levels/Materials/Floors/openings)
- [x] HostObjAttr still filtered on production path
- [x] No Autodesk samples committed

## Related issues

Refs #30 #31 #32 #33. Not closing — schema-field Wall, Floor←ElemTable
binding, and Door/Window host typing remain open.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes production element enumeration with heuristic partition scans
that could add false positives or performance cost on large 2024 files,
though fail-closed filters, caps, and corpus tests mitigate that.
> 
> **Overview**
> Production **`walker::iter_elements`** now merges fail-closed
partition recoveries beyond 2023 **ArcWall**: **Level** (storey names +
ArcWall-derived elevations), **Material** / **Room** (strict partition
name filters), **Floor** (closed plan loops with ArcWall-endpoint
exclusion), and on Revit **2024** **`ArcWallRectOpening`** index rows
with related-id provenance — explicitly **not** relabeled as typed
**Door** / **Window**.
> 
> The new **`partition_schema_mvp`** module implements version-gated
scans (reusing existing partition / opening-index helpers,
**`WalkerLimits`**, and caps). **`recover_floor_boundary`** tags
**`FloorBoundarySource::PartitionPlanLoop`** when `m_source` is
`partition_plan_loop`.
> 
> **`tests/iter_elements_typed.rs`** tightens tier1 honesty (no invented
partition MVP classes) and adds corpus checks for Einhoven (levels,
materials, floors) and 2024 Core Interior (opening index). README /
ROADMAP / status / compatibility / TODO are updated to describe the
broader partial coverage without overclaiming schema-field walls or
door/window host binding.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
e56eb3ab5b728833b8d54332736d05d1b51765fb. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: DrunkOnJava <[email protected]>
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
… ElemTable joins (#141)

## Summary
Advances #30–#33 after partition schema MVP (#140) by wiring recovers
into IFC/viewer honestly and tightening opening provenance.

### Newly recovers / wires
- **Materials** no longer emit as `IFCBUILDINGELEMENTPROXY`; partition
display names → `IfcMaterial` (Einhoven 41, Core Interior 92).
- **Levels** → IFC storeys even when elevation-unresolved (2024: 12
name-only storeys).
- **Floors** → boundary-annotated `IFCSLAB` (no invented thickness);
geometry gaps use `floor_boundary_annotation_only`.
- **Rooms** → `IFCSPACE`.
- **2024 ArcWallRectOpening**: related_id_a/b cross-checked against
`Global/ElemTable` (≥1997/2000 confirmed under test caps); still **not**
typed Door/Window.
- **Inspect + viewer File Status**: production class counts +
storey/material totals; unsupported features split honestly.

### Still open (AC not met — issues stay open)
- Schema-field `Wall` instances / 2024 ArcWall envelope (#23)
- Door vs Window discrimination + host IFC voids/fills
- Floor↔ElemTable ElementId binding + slab extrusion thickness
- Opening index → `IfcOpeningElement` host join (deferred to avoid
flooding STEP)

### Tests
- Tier1 honesty + `iter_elements_typed` corpus (Einhoven / Core
Interior)
- `project_count_fixtures`, `walker_to_ifc_integration`, clippy `-D
warnings`

Refs: #30 #31 #32 #33

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> <sup>[Cursor Bugbot](https://cursor.com/bugbot) is generating a
summary for commit 1a0d86337dfb01b1cb70cb9f6aed898f9c958633. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: DrunkOnJava <[email protected]>
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.

2 participants