Unify LengthDimension/RadiusDimension/AngleDimension/DiameterDimension behind shared DimensionMeasurement base (#1178) - #1200
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous Review Summaries (6 snapshots, latest commit 0cec20e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 0cec20e)Status: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous review (commit 5dcfab4)Status: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous review (commit 8889c6a)Status: No Issues Found | Recommendation: Merge Overview
Files Reviewed (4 files)
Previous review (commit 123f73c)Status: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous review (commit e540a5c)Status: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
Previous review (commit e134d3d)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by nemotron-3-ultra-550b-a55b:free · Input: 360.6K · Output: 11K · Cached: 1.4M |
|
Hold, not ready to merge as-is: this branch carries three files with nothing to do with #1178. The But the branch also carries:
None of these relate to unifying the Dimension classes. They read as genuine work product (not fabricated, unlike some other recent bot-filed content), just committed to the wrong branch, apparently swept in from a shared/dirty workspace alongside separate thread-safety investigation work. Kilo reviewed all 7 files in this diff and still said "No Issues Found," so that pass didn't catch the scope mismatch either. Please drop those three files from this branch (they don't belong here regardless of whether the underlying #1155/#1157 investigation work is good) before this merges. #1156 is closed already (folded into #1153+#1154), so that README in particular has nowhere to land. |
5dcfab4 to
123f73c
Compare
c8a994f to
92d2ef3
Compare
…surement base (#1178) LengthDimension/RadiusDimension/AngleDimension/DiameterDimension shared an identical five-member shape (handle, deinit, value, isValid, setCustomValue, geometry) reimplemented four times. DimensionMeasurement is the new shared base; each concrete type now supplies only its own initializers via super.init(handle:). Rebased onto current main and squashed the branch's own follow-up fixes (the swift-format doc-comment blank line, the unrelated repro-file contamination removed per PR review, and the operation-count update, recomputed here as 4,356 against main's current 4,368 rather than carried forward stale) into one clean commit. Signed-off-by: elb <elb@users.noreply.github.com> Co-authored-by: Kilo <noreply@kilo.ai>
92d2ef3 to
27d6a8a
Compare
What & why
Unified
LengthDimension,RadiusDimension,AngleDimension,DiameterDimension's five duplicated members (deinit,value,isValid,setCustomValue,geometry) behind a shared base classDimensionMeasurement. Each concrete dimension type now only supplies its own initializers. This eliminates the four-way hand-copy risk where the same bridge calls were re-implemented identically in each class, and already-diverged doc comments (e.g.,setCustomValuewording differed across classes) are now single-source.The
AngleDimension-onlydegreesconvenience remains on the subclass.Closes #1178
CHANGELOG entry
Unify LengthDimension/RadiusDimension/AngleDimension/DiameterDimension behind shared DimensionMeasurement base (#1178)
SemVer impact
NONE. Pure refactor with no public API surface change — all four classes keep their exact initializers and public members; only the internal implementation is deduplicated. Existing tests pass without modification.
Checklist
--self-testcase was run once with its subject broken, and the failure is reported heredocs/CHANGELOG.mdis not in this diff.docs/SEMVER.mdis not in this diff.Notes for the reviewer
This is part of the Pass 4b duplication audit (#386). The shared base mirrors what the bridge layer already does (
OCCTDimensionstruct with akindtag, single C functions dispatching on kind). All existing dimension tests pass.