Repository navigation
fix(cli): rvt-diff --elements counts a change in the rule that read a value as a label change, not a change (#1864) - #1969
Merged
Conversation
… value as a label change, not a change (#1864)
Owner
Author
|
Pair run 43544616792,
No export changes; the schema contract runs in CI. |
DrunkOnJava
marked this pull request as ready for review
November 14, 2026 02:31
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.
Summary
rvt-diff --elementsnow compares resolved values, not the rules that read them. An element whoseLevelBindSourcealone differs, or whoseBodySourcediffers while its body is the same, counts as unchanged and is listed apart as a label change:relabelledin the JSON, each entry with itslabels, and a "label changes" line in the summary. A body that differs is still a change, with itsBodySourcebeside it. This is #1864's third bullet, as rvtReview decided it there.Motivation
Two saves of
rst_basic(2025 and 2026) bind the same Level to 12 beams by two rules (the reference list, the reference level). #1915's Measure showsLevelElementIdequal on all 370 beams, yetrvt-diff --elementslisted the 12 as changed, which hides the model's own changes among rvt-rs's provenance labels. The value each label stands for is compared on its own, so nothing real is dropped:LevelElementIdandLevelBindResolvedfor a Level bind, and the body digest for a body.Changes
src/ifc/element_diff.rs:LABEL_PROPERTIES(LevelBindSource), andBodySourceas a label only where the two bodies' digests are equal.ElementChange::labels,ElementDiff::relabelled. A relabelled element counts inunchanged, soleft_elements = removed + changed + unchanged + set_aside.leftstill holds. Two failure-first tests of the pure comparison beside the existing ones: a Level bind's rule alone is a label, and aBodySourceis a change where the body differs.src/bin/rvt_diff.rs: the summary prints the label changes apart, and--redactscrubs them too.docs/schemas/rvt-diff-elements.schema.json:relabelled(arelabeldefinition: no changes, at least one label) andchange.labels.docs/library.mdand a changelog fragment.Testing
No export changes.
tests/json_schema_contracts.rsrunsrvt-diff --elementsand validates its JSON against the schema, and CI's--libjob runs the comparison's tests.The pair run: Measure 43544616792,
probe_1864_body_diffon the 2025 samples against their 2026 saves. Expected, registered before it runs:rst_basic's 12LevelBindSourcedifferences leave the changed list, andrac_advanced's roof 201262 (sketch on 2025, saved mesh on 2026) stays on it.tools/check-local.sh: no local builds;rustfmt --checkpasses; CI runs the rest.Audit-honesty checklist
Legal and contribution hygiene
Part of #1864.