Skip to content

fix(elements): an instance whose data copies disagree takes its current copy's transform (#227) (RE-216) - #949

Merged
DrunkOnJava merged 8 commits into
mainfrom
feat/227-current-copies
Oct 24, 2026
Merged

DrunkOnJava merged 8 commits into
mainfrom
feat/227-current-copies

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

A family instance whose element data sits in more than one partition, with copies whose transforms disagree, had no transform at all: scan_instance_transforms dropped it. It now takes the copy in the partition the instance's current record is in, by the same routing native_document reads records with (RE-145). On Core Interior this gives Revit's opening to the 8 doors RE-215 §7 left as boxes: all 132 doors within 0.001 ft of Revit's, from 124. Part of #227; answers #548's "which copy" question for instance transforms. RE-216.

Motivation

#227's remainder named 8 Core Interior doors with a cut loop but no transform read. examples/probe_227_missing_transforms.rs found why:

  • each has element data in Partitions/46 and Partitions/59;
  • the two rotations are identical, and the origins differ by one inch along the model's X, which is the instance's Y, across the host wall;
  • the scan read both copies and dropped the instance.

Which copy Revit drew:

  • tools/re/opening_copies_vs_ifc.py (Measure 40137774555) moves Revit's opening into each copy's frame. Only Partitions/59 puts it on the cut loop and the host's band, 0.0000 ft against 0.0833 ft.
  • native_document reads all 8 doors' current records from Partitions/59 (40138226998).

The 8 are one stacked door, so this is one pattern confirmed eight times. The rule's broader evidence is RE-145: the route takes the latest copy on 1,518 of 1,522 differing ids.

Changes

  • src/native_document.rs: routed_partitions(file, ids) (crate-visible). It gives the partition each id's stored revision routes to (native_index::route_episode), using the memoised preamble.
  • src/partition_instance_transforms.rs, scan_instance_transforms:
    • keeps each copy with its partition number;
    • where copies disagree, takes the copy in the routed partition, or in the latest holder where the routed one holds none, as native_document does;
    • an instance whose revision doesn't route, or whose current partition holds disagreeing copies itself, is still dropped (fail closed);
    • agreeing copies are unchanged.
  • Research tooling:
    • examples/probe_227_missing_transforms.rs;
    • tools/re/opening_copies_vs_ifc.py.
  • Docs:
    • reports/element-framing/RE-216-current-instance-copies.md;
    • RE-215 §7's closing line;
    • the reconnaissance addendum;
    • docs/support-matrix.json: the family-instance-transforms note and evidence, and native-symbol-cut-sizes, now 138 of 138 openings.
  • changelog.d/fixed/current-instance-copies.md.
  • Core Interior's two witness observations and verdicts, regenerated from this PR's CI run (follow-up commit).

Testing

Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.

  • tools/check-local.sh passes: CI runs it. rustfmt and the let-chain scan pass locally.

  • Verified end to end on real Revit files. Measure 40138537515, this branch against main (c38a5b0), default models plus -f r2025=true -f nordic=true:

    model main this change
    Core Interior, doors within 0.001 ft of Revit's opening (opening_boxes_vs_ifc) 124 of 132 (8 within 0.26 ft) 132 of 132
    Core Interior, openings within 0.01 ft (openings_vs_ifc) 130 of 138, largest 0.25 ft 138 of 138, largest 0.00 ft
    BIM4LCA office at building permit, door type GlobalIds differing from Revit's (type_objects_vs_ifc) 43 33
    • The office's doors take their flip from their facing against the host (B72), which needs the transform. 10 doors whose copies disagreed now have one, so their Flipped type GlobalId is Revit's.
    • The IFC of every other model is byte-identical: Einhoven, the four RE1 models, the 23 R2025 models and the office as built.
    • All 31 models' diagnostics are identical.
    • Files and licences are in the report: Core Interior (MIT) and the BIM4LCA office (CC BY-SA 4.0), fetched by Measure and never stored.
  • If this touches the IFC exporter: Core Interior's export gains 8 placements and 56 property values. Its two rvt-rs.json observations are refreshed from this PR's octetproof-core-interior artifact (CI run 40139655393, commit 45ac78b); only those counts and the observation hash change. tools/ci/witness-verdict.py regenerates both verdicts as PASS, with all three replays matching, byte-identical to the committed ones.

  • N/A: performance. The routing reads the memoised preamble only when an instance's copies disagree.

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • A user-visible change has its entry as a fragment under changelog.d/
  • Resolved limitations updated (RE-215 §7, the support matrix)
  • No new limitation; the remaining ones are in the report's section 6
  • Commit messages describe what changed and why
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files
  • Reverse-engineering finding: a probe under examples/ and a dated addendum to docs/rvt-moat-break-reconnaissance.md

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content
  • No fixtures

Contributor declaration (CLEANROOM.md): the finding rests on byte observations of the files listed in the report and on Revit's own IFC exports of them. I have not used Autodesk SDK source, ODA SDK source, leaked internal documentation, NDA material, or decompiled internal Revit implementation code.

Breaking changes

None. scan_instance_transforms keeps its signature; it returns more instances.

Screenshots or output samples

N/A: the change is in the measured table above.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d9d53f340

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/partition_instance_transforms.rs Resolved
…' opening placements and properties (#227) (RE-216)
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 24, 2026 22:44
… names it, so an unreadable current copy drops the instance rather than taking an older one (#227)
@DrunkOnJava
DrunkOnJava merged commit 0b14bca into main Oct 24, 2026
32 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/227-current-copies branch October 24, 2026 22:58
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
…y's issue changes (#227) (#873) (#951)

## Summary

Docs catch up with what landed and changed today.

## Changes

- `docs/contribution-map.md`: the 0.8.0 and 1.0.0 remainders regenerated
from the tracker. #227 has its new title (the releases other than 2024
and 2025), and #873, closed with S1 and S2 passed, is gone.
- `ROADMAP.md`: 0.8.0's #227 remainder is the openings on releases other
than 2024 and 2025. RE-216 (#949) opened Core Interior's last 8 doors.
- `docs/status.md`: an RE-216 line after RE-215's, saying all 132 of
Core Interior's door openings are within 0.001 ft of Revit's.

## Testing

Unit tests are banned in this repository: do not add them. Show the
change working end to end on real files instead.

- N/A: docs only. The figures are #949's measurement (Measure
40139965684).

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- N/A: no user-visible capability change beyond #949's, which has its
fragment
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files
- N/A: not a reverse-engineering finding

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content
- [x] No fixtures

## Breaking changes

None.

## Screenshots or output samples

N/A.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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