Skip to content

research(ifc): value sources for every *Source property value, and a test that fails on one with none (#1498) - #1512

Merged
DrunkOnJava merged 1 commit into
mainfrom
lane/1498-value-source-gaps
Nov 9, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
lane/1498-value-source-gaps

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Draft. #1498's structural fix and the additive sources for the inputs it lists. Refs #1498 (not Closes until the test has run green on the gate and the proof run is read).

  • property_readers (src/ifc/element_provenance.rs) lists a noted source for any reader an element's own *Source property values name (BodyHeightSource, BodyBaseSource, BodyEndSource, PlacementAxesSource, ThicknessSource, SpaceOutlineSource), beside its BodySource and ProfileSource. Before, only those two keyed a listing, so a door whose body was its saved mesh never listed the transform its placement was taken from.
  • SOURCE_VALUES in tests/value_sources_offsets.rs gives every written *Source value a row (sourced, covered by another table, unread, or a declared gap with its reason) and fails on a value with none. A sourced row requires its readers on every element that carries the value. It reads the real exports of the CI gate through --element-provenance.
  • New sources, all provenance only and noted only while the table is being built (recording_value_sources()): native_wall (the wall's own native record: join lists, cut pairs, m_realJoined, the curve, the flip), native_wall_joined (the records of the walls the lists name, where every one was read), wall_top_covers and wall_base_cover (the frame of each cover the wall names, rule frame), wall_orientation (agreeing, the scan compares every copy), wall_type_face_angle (agreeing), native_opening (a door's own record: the two flips), opening_host_wall (the host wall's record).

Declared gaps: 20 values

12 bindings to a Level or a storey (LevelBindSource 9, StoreyBindSource 3), 2 family names chosen by a table (FamilyNameSource), 1 column height (BodyHeightSource partition_geometry_node_after_joins: the geometry node's offset is not noted), 5 schema-walker values no model of the 92 writes. Reasons and element counts: docs/export-diagnostics.md, "Written *Source values". Three listed inputs have no *Source property to key a row on and carry a stated reason instead: door and window cut-loop sizes, a beam's cross-section rotation, a section's dimensions (not compared with the export).

Evidence so far

  • Measure run 42136996423 (probe at 92a7e92, base=none, 92 models, scorers=none): the inventory of every *Source value and the readers behind it. It found three values that had no row (StoreyBindSource record_level_reference, LevelBindSource structural_framing_top_level, ProfileSource partition_element_record_join_cut); they have rows now. That run is the probe commit, which has no export code: it says nothing about byte identity.
  • Byte identity: Measure run 42527061016 on this head 9324f0be against ab5f8e1c, unfiltered with samples, held-out models, racadv, BIMcollab, the office and the R2025 models, scorers=none: all 118 exports have the same ifc.sha256 on both sides. Its same-project gates read NOT MEASURED because the run names its scorers, and with every export identical nothing there can move.
  • CI on this head: not yet read.

MCP contract

No rvt-mcp file is touched. The value_sources description (rvt-mcp/src/schema.rs, docs/mcp-tools.json) says the copy each reader took "a value of the element's body from"; with this PR it also lists the values of the wall rules and the placement. The wording is the coordinator's to sync; the reader names are free strings in the schema.

Testing

  • cargo fmt, tools/release/changelog.py check, tools/ci/api-doc-ids.py locally.
  • tests/value_sources_offsets.rs on the gate in CI (Corpus health): not yet read at this head.

Breaking changes

None.

@DrunkOnJava
DrunkOnJava force-pushed the lane/1498-value-source-gaps branch from 65058e3 to 9324f0b Compare November 8, 2026 20:02
@DrunkOnJava
DrunkOnJava force-pushed the lane/1498-value-source-gaps branch from 9324f0b to e481fdb Compare November 9, 2026 00:52
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 9, 2026 01:16
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 9, 2026 02:02
@DrunkOnJava
DrunkOnJava merged commit 99aa1f2 into main Nov 9, 2026
66 checks passed
@DrunkOnJava
DrunkOnJava deleted the lane/1498-value-source-gaps branch November 9, 2026 02:03
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
… as its value source (#1498) (#1562)

## Summary

`main` fails Corpus health. #1512 (value sources for every `*Source`
value) and #1505 (a door set in no wall placed at its stored origin)
landed in the same batch, each green on its own. Together, the offsets
test finds `PlacementOriginSource=stored_origin_no_opening` with neither
a row in `SOURCE_VALUES` nor a declared gap: 1 door on RE1 Architecture,
74 on the BIM4LCA office as built and 76 at permit. That was seen on
#1560's full run, a dependency bump that changes no code.

The value has a source. `attach_opening_placement_origins` takes the
door's origin from
`partition_instance_transforms::scan_instance_transforms`, which notes
each transform it reads as an `instance_transform` value source. So:

- `element_provenance::property_readers` maps
`PlacementOriginSource=stored_origin_no_opening` to the
`instance_transform` reader, as `PlacementAxesSource` maps to its
readers.
- `tests/value_sources_offsets.rs` gains the row: sourced, from
`instance_transform`.

No export changes: value sources are diagnostics only. #1512's Measure
run 42542513656 found every export byte for byte the same with them in
place.

## Testing

This PR's full CI runs the Corpus health job, the one that failed. The
four tests that failed on #1560 should pass there:
-
`family_extrusion_value_sources_name_the_forms_the_body_was_rebuilt_from`
- `project_corpus_value_sources_name_the_copy_the_reader_took`
- `nordic_office_value_sources_name_the_copy_the_reader_took`
- `nordic_office_permit_value_sources_exercise_the_current_copy_rule`
DrunkOnJava added a commit that referenced this pull request Nov 15, 2026
…e test declares (#1498) (#2027)

## Summary

`docs/export-diagnostics.md`'s inventory of declared value-source gaps
now matches the test that enforces them. The prose said "19 values", and
the table listed 22 and left out `LevelBindSource`
`partition_room_parameter_block`. `SOURCE_VALUES` in
`tests/value_sources_offsets.rs` declares 23 `Gap` rows: 13
`LevelBindSource`, 3 `StoreyBindSource`, 2 `FamilyNameSource`, 1
`BodyHeightSource` and 4 schema-walker values. The prose now says 23 and
names the test, and the table's binding row lists the room parameter
block (13).

Closes #1498. Its done-when ("each of these has a source that names the
bytes it came from, or a stated reason, and a test fails on a written
value with neither") is met on `main`:

- #1512 (`99aa1f28`) and #1562 (`3f82d14c`) list a source for every
`*Source` property value of walls, door placements, covers, orientation,
flip, taper face angle and joined walls.
`tests/value_sources_offsets.rs` fails on a written value with neither a
row nor a declared gap.
- The three items that have no source have a stated reason in this page:
a door's or window's cut-loop size (lines 226 to 232), a beam's
cross-section rotation (`m_rotation`, lines 235 to 239), and the numbers
of the parts the test does not compare (line 298).

## Motivation

A Tendrils triage of #1498 (batch b10, 2026-11-13) found the inventory
disagreeing with the test, re-read here against `main`. That triage also
proposed requiring `native_wall_joined` on the `BodyEndSource` row. This
PR does not, because the source is listed "only where every one of them
was read in the same pass" (this page's row for it), so requiring it
would fail on a wall whose joined walls were not all read. The row stays
`all: ["native_wall"]`.

## Changes

- `docs/export-diagnostics.md`: the count and the binding row.

## Testing

Docs only. The counts are read from `SOURCE_VALUES` (23 `Gap` entries).

## Audit-honesty checklist

- [x] No changelog fragment: a correction of a count in the docs.
- [x] No emojis, private paths or jargon.

## Legal and contribution hygiene

- [x] Apache-2.0.

## Breaking changes

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