Repository navigation
research(elements): RE-145 the native route takes the latest copy, and can land on an empty partition (#548) - #569
Merged
Conversation
…element's current record (#548) Routes every declared element as native_document does (native_index::route_episode from its stored revision) and compares the partition with the ones that hold its channel-101 records: single copies routed to a partition without a record of theirs, and for repeated ids whether the route takes the latest or earliest partition's copy. On the admitted releases it also runs native_document::extract on channel 101.
…holds none of their records (#548) Adds every element, single or repeated, that native_index::route_episode sends to a partition without a channel-101 record of it, with its class, partitions and stored revision; and the indexed elements with a record that native_document::extract does not emit. The first run (37116666890) found 5 such single copies on Einhoven and 10 elements extract does not emit on Core Interior.
…d can land on an empty partition (#548)
DrunkOnJava
enabled auto-merge (squash)
October 3, 2026 11:03
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Example arrays are invalid JSON
- Added json_u32_array to serialize partition lists as JSON arrays instead of BTreeSet Debug output in both example fields.
Or push these changes by commenting:
@cursor push f42cd718d9
Preview (f42cd718d9)
diff --git a/examples/probe_re145_current_copy_routing.rs b/examples/probe_re145_current_copy_routing.rs
--- a/examples/probe_re145_current_copy_routing.rs
+++ b/examples/probe_re145_current_copy_routing.rs
@@ -82,6 +82,11 @@
format!("{{{}}}", parts.join(","))
}
+fn json_u32_array(set: &BTreeSet<u32>) -> String {
+ let parts: Vec<String> = set.iter().map(|k| k.to_string()).collect();
+ format!("[{}]", parts.join(","))
+}
+
fn probe(path: &str) -> anyhow::Result<String> {
let file = std::path::Path::new(path)
.file_name()
@@ -164,9 +169,10 @@
routed_without_copy += 1;
if without_copy.len() < EXAMPLES {
without_copy.push(format!(
- "{{\"id\":{id},\"class\":{},\"partitions\":{partitions:?},\"routed\":{routed},\
+ "{{\"id\":{id},\"class\":{},\"partitions\":{},\"routed\":{routed},\
\"stored_revision\":{},\"identical\":{}}}",
class_of(&list[0].body),
+ json_u32_array(&partitions),
identity.stored_revision,
list.iter().all(|c| c.body == list[0].body)
));
@@ -216,8 +222,9 @@
let list = &copies[id];
let partitions: BTreeSet<u32> = list.iter().map(|c| c.partition).collect();
format!(
- "{{\"id\":{id},\"class\":{},\"partitions\":{partitions:?}}}",
- class_of(&list[0].body)
+ "{{\"id\":{id},\"class\":{},\"partitions\":{}}}",
+ class_of(&list[0].body),
+ json_u32_array(&partitions)
)
})
.collect();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 9189130. Configure here.
…nd skips Measure's flags Reported by Cursor Bugbot on #569: the example lists embedded a BTreeSet's Debug form ({0, 3}), which is not JSON. The probe also opened Measure's trailing --records flag as a file.
DrunkOnJava
added a commit
that referenced
this pull request
Oct 3, 2026
…counts as JSON
The blocks-by-id-minus-one map was a BTreeMap's Debug form ({1: 46}) and a
counterexample's stated count an Option's (Some(n)); both are JSON now,
as the probe's one-object-per-line contract says (the same defect Cursor
Bugbot found in RE-145's probe on #569).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This answers #548, which copy of an element's record is current, for every file measured (Measure runs 37116666890 and 37117317288).
native_index::route_episodetakes the latest partition's copy on 1,518 of 1,522 differing ids. On 2021rac_advancedthat is 887 of 887, as puzzbobb and RE-143 found.New: the probe
examples/probe_re145_current_copy_routing.rsand the reportreports/element-framing/RE-145-current-copy-routing.md.Open: why the route lands on an empty partition.
Note
Low Risk
Research-only: new probe example, report, and changelog; no production extraction or routing code changes in this diff.
Overview
Documents RE-145 research for #548: how
native_index::route_episodechooses which partition’s channel-101 record counts as “current” when an element appears in multiple partitions.Adds
examples/probe_re145_current_copy_routing.rs, which walks partition streams, compares routed partitions to where records live, and (on admitted Revit versions) cross-checksnative_document::extractskip/emit counts. Addsreports/element-framing/RE-145-current-copy-routing.mdwith Measure-run tables across Core Interior, Einhoven, RE1 models, and Autodesk samples.Findings recorded in CHANGELOG: for differing copies, routing picks the latest partition’s copy on 1,518 / 1,522 ids (including 887/887 on 2021
rac_advanced); a smaller set routes to partitions with no copy for that element (16 on Einhoven/Core Interior in the report), which the changelog notes was addressed separately in #565.Reviewed by Cursor Bugbot for commit 9189130. Configure here.