Skip to content

red: SerialNumber test alone (#35) - #607

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/serial-number
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/serial-number

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Scratch PR: the new test serial_number on its own, to show it red on CI before the implementation. Closed once the red run is recorded.


Note

Low Risk
Test-only change plus CI target registration; no production export or runtime behavior is modified.

Overview
Adds a real-file integration test for RE-156 (#35) that locks IFC SerialNumber on tagged elements to match Revit’s reference IFC4 exports for RE1 Electrical (31 elements) and Plumbing (1), across Pset_ManufacturerOccurrence and Pset_PrecastConcreteElementGeneral.

The test exports via RvtDocExporter, parses STEP for property-set SerialNumber values keyed by element Tag and set name, and compares them to the paired RE1-*.ifc files under RVT_PROJECT_CORPUS_DIR (skips when corpus or files are missing). No exporter changes in this PR—it is intended to run red until SerialNumber mapping is implemented.

Registers the new serial_number target in tools/ci/test-targets.txt so CI runs it with the other real corpus tests.

Reviewed by Cursor Bugbot for commit bd04c14. Configure here.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red run recorded (run 37142425779: 50 of 50 SerialNumber values missing on RE1 Electrical); the test is cherry-picked onto the item branch with that output.

@DrunkOnJava DrunkOnJava closed this Oct 3, 2026
@DrunkOnJava
DrunkOnJava deleted the red/serial-number branch October 3, 2026 18:02
DrunkOnJava added a commit that referenced this pull request Oct 3, 2026
…ialNumber sets (#35) (#608)

RE-156 (#606) found Revit's SerialNumber stored as a text entry whose id
is the shared parameter `Serial Number`'s ElementId, inside the
element's own data object, and the parameter's definition as a data
object holding its group, name and GUID. This reads it.

- `partition_room_parameters`: `find_parameter_definitions` (parameter
name -> ElementId, from the definitions' strings) and
`scan_text_parameter`, RE-153's scan for any element set and parameter
id; `scan_room_text_parameter` now calls it.
- `partition_schema_mvp`: `m_serial_number` on every element with a
value.
- `export_content`: `Pset_ManufacturerOccurrence.SerialNumber`
(IfcIdentifier), and on a building-element proxy
`Pset_PrecastConcreteElementGeneral.SerialNumber` too, as Revit's RE1
Electrical (12 flow terminals, 19 proxies) and Plumbing (1 flow
terminal) exports write them.

Test: `tests/serial_number.rs` (real target). Red on main: draft #607,
run 37142425779, 50 of 50 values missing on RE1 Electrical; the output
is in the test commit's message.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Adds heuristic partition binary parsing and changes IFC property-set
output for elements with Serial Number; export fidelity impact but no
security or auth surface.
> 
> **Overview**
> **RE-156** wires Revit’s shared parameter **Serial Number** from
partition data through to IFC export so values match Revit’s own
exports.
> 
> Partition scanning is generalized: **`scan_text_parameter`** reads any
element’s text parameter by id inside its data object;
**`find_parameter_definitions`** maps project/shared parameter **names**
to ElementIds from definition blobs. Room floor-finish scanning now
delegates to the shared helper. During MVP decode,
**`attach_serial_numbers`** sets **`m_serial_number`** on walls,
columns, doors, windows, slabs, and generic products when the parameter
exists.
> 
> IFC export adds **`serial_number_property_sets`**:
**`Pset_ManufacturerOccurrence.SerialNumber`** (`IfcIdentifier`), and
the same on **`Pset_PrecastConcreteElementGeneral`** for
**`IFCBUILDINGELEMENTPROXY`**, emitted alongside existing Reference
property sets.
> 
> A new **`tests/serial_number.rs`** corpus test (RE1
Electrical/Plumbing vs reference IFC) and CI **`serial_number`** real
target guard parity.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
80adbc2. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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