DXF/DWG: prune kept ACDBASSOCDEPENDENCY objects whose target handle is unmapped #3426
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 251 lines diff across 3 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.331
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3426"
general
weight: 0.35
rahul05ranjan
When
dxf_raw::finishremaps handles on kept associative objects, a danglingdependentOnObjectpointer (the first group330inside theAcDbAssocDependencysubclass) was rewritten to"0"while the dependency remained active and stayed listed in the owningACDBASSOCACTIONgroup-360dependency list. Because the null handle cannot carry a persistent reactor ({ACAD_REACTORS), other CAD readers flag such dependencies as missing their reactor on the dependent-on object and mark them invalid.dxf_raw::finishnow drops any keptAcDbAssocDependencywhose non-nulldependentOnObjecthandle does not resolve to a written object or entity (along with kept objects owned only by that dependency, such as a dependency body), while leaving originally unbound dependencies (330 = 0in the input) untouched. InMap::object,AcDbAssocActionfilters dropped handles out of its360dependency list and updates the preceding90dependency count accordingly.Tests
assoc_dependency_prune::orphaned_assoc_dependency_is_pruned_along_with_action_entry_and_bodyassoc_dependency_prune::originally_unbound_assoc_dependency_with_null_target_is_keptcargo fmt --check,cargo clippy -p cadcraft-io --all-targets -- -D warnings,cargo test -p cadcraft-io --lib<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
DXF output now omits associative dependencies whose target objects are not included in the output, along with objects owned by those dependencies.
Association actions retain only valid dependency references, and their dependency counts are updated accordingly.
Dependencies with null targets remain in the output, and surviving entries retain their original group codes.
* Dependencies referenced by actions with unrecognized dependency-list layouts are not pruned based on those lists.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->