DXF/DWG: an object a kept object holds by a hard owner reference is kept #2919
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 231 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.326
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2919"
general
weight: 0.35
mkzung
What was wrong
The reader and writer decide which unmodelled objects to keep by following each object's owner (group 330) up to something kept. An object whose owner is null but which another kept object holds by a hard owner reference (group 360), as one application's proxy object held by another, broke that chain: it was dropped, and the holder kept a 360 that named nothing. Example: a named-dictionary entry
OTHER_APPholding an XRECORD that holds a second XRECORD by 360, whose own 330 is 0; afterwrite_dxfthe second XRECORD is gone.Fix
hard_ownersmaps each object to the first kept object that names it in a 360, andowner_ofuses that owner when the object's own is null, inretained_objects(read) and in the liveness pass offinish(write). An object with a real owner is unchanged.Tests
crates/io/tests/hard_owned_objects_kept.rs: DXF to DXF twice and DXF to DWG twice; the holder's 360 still names the held record. Fails on main (the held record is missing), passes here.cargo test -p cadcraft-io, clippy with-D warningsand fmt pass.🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Objects referenced through hard-owner links are now preserved when their standard owner is missing, including through DXF and DWG conversions.
Repeated conversions retain these referenced objects while excluding unrelated, unheld objects.
Cyclic hard-owner references remain intact when reachable from a retained object.
* Records with an unresolved, explicitly assigned owner are excluded, even if another object references them through a hard-owner link.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->