Skip to content

Expose declaration IDs and label boxes for editor picking (#2210) - #2215

Merged
pzfreo merged 3 commits into
mainfrom
fix/2210-editor-pick-identity
Oct 7, 2026
Merged

pzfreo merged 3 commits into
mainfrom
fix/2210-editor-pick-identity

Conversation

@pzfreo

@pzfreo pzfreo commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Fixes #2210. Adds read-only Drawing.declaration_id_of(name) and Drawing.label_box(name); ambiguous or undeclared annotations return None, unknown names raise KeyError. The declaration lookup uses built model identities and the existing annotation registry, including measurement provenance when a direct feature owner is absent. Verified against the emitted Specify spindle Sheet (hole, step, AP242 dimension, GD&T, datum and OD) and focused tests; ruff, mypy, source-shape guards and codespell pass.

@pzfreo
pzfreo enabled auto-merge (squash) October 6, 2026 23:22
@pzfreo
pzfreo disabled auto-merge October 7, 2026 00:17
@pzfreo
pzfreo enabled auto-merge (squash) October 7, 2026 00:19
@pzfreo

pzfreo commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

Iterative review found a substantive ownership bug: an anchored note with its own declaration ID could make an unrelated mark owned by the anchor feature appear ambiguous to declaration_id_of(). Fixed in 6e704d9 by matching the mark's actual declared owner, with a regression covering both the feature mark and the note mark. Local verification: 17 declaration/source-shape tests, Ruff, mypy, 96% changed-line coverage. Auto-merge is armed again for the corrected head; the obsolete pre-fix CI run was canceled.

@pzfreo
pzfreo merged commit 5027f79 into main Oct 7, 2026
19 checks passed
@pzfreo
pzfreo deleted the fix/2210-editor-pick-identity branch October 7, 2026 01:03
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.

Editor support: map every drawn annotation to its declaration, and expose a label box to pick by

1 participant