Skip to content

red run: native_current_records (B04, do not merge) - #564

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/b04-native-current-records
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/b04-native-current-records

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Scratch PR for a red run of tests/native_current_records.rs on main. Closed and its branch deleted once CI reports.


Note

Low Risk
Test and CI manifest only; no library or CLI behavior changes in this diff.

Overview
Adds a real-corpus integration test (native_current_records) that locks in #548: for Einhoven and Core Interior, native_document::extract on channel 101 must emit exactly one record per element in Global/ElemTable, with summary.selected_ids_without_records empty and emitted count matching summary.indexed_elements.

Corpus handling matches other project tests: if RVT_PROJECT_CORPUS_DIR is unset the test skips; if set, missing fixture files fail fast.

Registers native_current_records in tools/ci/test-targets.txt so CI and the local gate run it with the other real targets.

Reviewed by Cursor Bugbot for commit f34c721. Configure here.

…emitted (#548)

A real-file target: native_document::extract over channel 101 on
Einhoven and Core Interior, where every declared element has a channel-101
record (RE-145), emits one record per declared element and reports no
selected element without one. Expected red on main: elements whose stored
revision routes to a partition holding none of their records are skipped
as historical (RE-145: 5 single copies on Einhoven).
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red run captured; the test lands in the B04 fix PR.

@DrunkOnJava DrunkOnJava closed this Oct 3, 2026
@DrunkOnJava
DrunkOnJava deleted the red/b04-native-current-records branch October 3, 2026 10:53
DrunkOnJava added a commit that referenced this pull request Oct 3, 2026
…s takes its latest copy (#548) (#565)

`native_document::extract` emits an element's record only from the
partition its stored revision routes to (`native_index::route_episode`).
Records in other partitions are skipped as historical.

RE-145 (probe `examples/probe_re145_current_copy_routing.rs`, Measure
run 37117317288) found partitions that hold none of the routed elements'
records:

- **Einhoven:** 6 elements route to `Partitions/1`.
- **Core Interior:** 10 elements route to `Partitions/48`.

So the native path emitted 2,609 of Einhoven's 2,615 elements and 26,415
of Core Interior's 26,425, although every declared element on both files
has a record.

**Fix.** A first pass records which partitions hold each selected
element's records, per channel. When the routed partition holds none,
the current record is the copy in the latest partition that holds one.
That is the copy the route itself picks wherever it finds one: 569 of
571 differing pairs on Core Interior, 887 of 887 on the 2021
`rac_advanced` sample. The new summary field
`current_records_outside_route` counts them.

The commits are separate:

1. `test(native_document)` adds the real-file target
`tests/native_current_records.rs`. Its red run on `main` (draft PR #564,
corpus tier 2) is in the commit message: `Revit_IFC5_Einhoven.rvt: 6
declared elements have no emitted record: [2846, 5973, 5974, 5976, 5978,
5979]`.
2. The fix and its changelog entry.

The target reads the project corpus, so it runs in `Corpus health (tier
2 — external)`, which is not a required check. I will read that job
before arming.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes which native partition record is chosen for a subset of
elements, affecting downstream consumers of `native_document::extract`
output.
> 
> **Overview**
> **`native_document::extract`** no longer drops elements whose stored
revision routes to a partition that holds none of their records. A
**pre-pass** builds per-channel, per-element partition holders; emission
still treats other partitions as historical, but when the routed
partition is empty for that element, the **current** copy is taken from
the **latest** partition that actually holds a record (RE-145, #548).
> 
> Record parsing inside partition walks is **refactored** into shared
**`group_records`**, and **`Summary`** gains
**`current_records_outside_route`** to count fallback emissions.
**CHANGELOG** documents the behavior;
**`tests/native_current_records.rs`** asserts every declared element on
Einhoven and Core Interior gets an emitted channel-101 record when the
project corpus is present, and CI registers the new real-file target.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0c63572. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->


## Measured

- `Corpus health (tier 2 — external)` on this PR:
`tests/native_current_records.rs` passes on Einhoven and Core Interior.
- Measure run 37117901879 compared head against `main` with the samples:
all 6 model IFCs are byte-identical, and every scorer, `rvt-info` and
`diagnostics.json` output is identical on all 6 models and 36 samples.
The exporter does not read these records, so nothing it writes changes.
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