Skip to content

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
DrunkOnJava merged 1 commit into
mainfrom
fix/1864-label-changes
Nov 14, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
fix/1864-label-changes

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

rvt-diff --elements now compares resolved values, not the rules that read them. An element whose LevelBindSource alone differs, or whose BodySource differs while its body is the same, counts as unchanged and is listed apart as a label change: relabelled in the JSON, each entry with its labels, and a "label changes" line in the summary. A body that differs is still a change, with its BodySource beside 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 shows LevelElementId equal on all 370 beams, yet rvt-diff --elements listed 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: LevelElementId and LevelBindResolved for a Level bind, and the body digest for a body.

Changes

  • src/ifc/element_diff.rs: LABEL_PROPERTIES (LevelBindSource), and BodySource as a label only where the two bodies' digests are equal. ElementChange::labels, ElementDiff::relabelled. A relabelled element counts in unchanged, so left_elements = removed + changed + unchanged + set_aside.left still holds. Two failure-first tests of the pure comparison beside the existing ones: a Level bind's rule alone is a label, and a BodySource is a change where the body differs.
  • src/bin/rvt_diff.rs: the summary prints the label changes apart, and --redact scrubs them too.
  • docs/schemas/rvt-diff-elements.schema.json: relabelled (a relabel definition: no changes, at least one label) and change.labels.
  • docs/library.md and a changelog fragment.

Testing

No export changes. tests/json_schema_contracts.rs runs rvt-diff --elements and validates its JSON against the schema, and CI's --lib job runs the comparison's tests.

The pair run: Measure 43544616792, probe_1864_body_diff on the 2025 samples against their 2026 saves. Expected, registered before it runs: rst_basic's 12 LevelBindSource differences leave the changed list, and rac_advanced's roof 201262 (sketch on 2025, saved mesh on 2026) stays on it.

  • tools/check-local.sh: no local builds; rustfmt --check passes; CI runs the rest.

Audit-honesty checklist

  • The schema and the docs say what is compared and what is listed apart.
  • A changelog fragment.

Legal and contribution hygiene

  • Apache-2.0.

Part of #1864.

@DrunkOnJava

DrunkOnJava commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner Author

Pair run 43544616792, probe_1864_body_diff on the 2025 samples against their 2026 saves, read against the expectation:

No export changes; the schema contract runs in CI.

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 14, 2026 02:31
@DrunkOnJava
DrunkOnJava merged commit 3d60662 into main Nov 14, 2026
64 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1864-label-changes branch November 14, 2026 02:47
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