Repository navigation
fix: preserve concrete type identity in selected map keys - #71
Merged
Merged
Conversation
Keep interface key types through helper parameter wrappers and compare normalized scalar keys consistently for direct and helper writes/deletes. Preserve range and summary composition behavior, with explicit conservative native-width boundaries.
Use a BitLen representability check before exact fixed-width truncation, retaining the existing signed-minimum, overflow, native-width and floating-conversion fallbacks. Differential validation covers 11,099 normalization inputs.
picatz
marked this pull request as ready for review
October 9, 2026 05:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
int(1),int64(1), and defined types are distinct; aliases retain Go identity.Precision boundary
Native
int,uint, anduintptrvalues outside the range common to 32- and 64-bit targets remain unknown because this SSA layer does not provide target sizes. Three same-large-native-key controls are explicitly conservative: baseline 0 findings, candidate 1, semantic expectation 0. Fractional/out-of-range float-to-int and integer-to-string conversions remain weak.The targeted 77-case behavioral matrix corrects 43 baseline fixture results: 22 missed flows and 21 overreports. The three native-width controls are separate. These synthetic counts are not a prevalence estimate or global soundness claim.
Validation
All gates pass on frozen head
cbd9cc8a236e9997b8bfbbec2088f521d214f1e9:Allocation measurements
Complete helper-key queries exclude SSA construction. Three allocation repetitions agree:
The last three include newly corrected result/parameter behavior. Initial unoptimized int64 matching used 1160 B/29; the reviewed fast path removes that overhead. Existing bounded string-helper shapes save 48 B/5 allocations per query. No shared-host timing claim is made.
Inherited nested conditional clear/delete, nested write-then-delete, uncertain-map alias, and helper range limitations remain outside this correction.