Skip to content

[fix] preserve unequal values with colliding hashes (LET-45) - #198

Merged
vt128 merged 1 commit into
masterfrom
codex/fix-distinct-equality-let45-20261109
Nov 10, 2026
Merged

vt128 merged 1 commit into
masterfrom
codex/fix-distinct-equality-let45-20261109

Conversation

@vt128

@vt128 vt128 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

distinct([1, 4294967297]) silently discarded an unequal value with the same hash. Compare values using Starlark equality within each hash bucket, preserving first-value identity, numeric type and order. Retain the small local index/collision chain, error propagation and iterator cleanup; no type fast path, new dependency, cache or Go-floor change.

Fresh host/floor build, race tests twice, vet and coverage pass on the final source: 32/32 distinct statements covered, all 46 specified regression names pass twice on both compilers, no old coverage lost. Full 80-configuration consumer and real CLI verification passed on identical runtime/module bytes. After the separate HTTP test-only fix #202, all 175 other files and frozen consumer/CLI inputs remain identical; the source bridge and fresh own4 are independently reviewed. Original source labels and the original macOS failure remain preserved. The final head passes all 23 required / 24 reported checks, both Codecov gates, review inspection and checks-watch.

Correct equality/index storage costs CPU and memory. Original representative List128 results were +61.83% host / +92.50% floor and about +432 / +402–404 B per call, with allocation counts unchanged; smaller fixtures varied. These disclosed costs are accepted to prevent data loss under the safety-first, simple-implementation criterion. No new timing samples or equivalence claim. Tracks LET-45. No tags, releases or auto-merge.

@codacy-production

codacy-production Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 120 complexity · 9 duplication

Metric Results
Complexity 120
Duplication 9

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.01% coverage variation

Metric Results
Coverage variation ✅ +0.01% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b690efc) 8441 8028 95.11%
Head commit (9372640) 8456 (+15) 8043 (+15) 95.12% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#198) 26 26 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Base automatically changed from codex/fix-distinct-iterator-let42 to master November 9, 2026 16:51
@vt128
vt128 force-pushed the codex/fix-distinct-equality-let45-20261109 branch from 47c70c6 to b928dbb Compare November 10, 2026 05:12
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.00%. Comparing base (b690efc) to head (9372640).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #198      +/-   ##
==========================================
+ Coverage   93.98%   94.00%   +0.01%     
==========================================
  Files          53       53              
  Lines        6755     6769      +14     
==========================================
+ Hits         6349     6363      +14     
  Misses        258      258              
  Partials      148      148              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Compare colliding values with Starlark equality while retaining the first
value, type and input order. Keep hash callbacks single-pass and release
iterators on every return. Restore the existing defensive regressions and
document the necessary CPU and memory cost.

Refs LET-45.
@vt128
vt128 force-pushed the codex/fix-distinct-equality-let45-20261109 branch from b928dbb to 9372640 Compare November 10, 2026 05:55
@vt128
vt128 marked this pull request as ready for review November 10, 2026 14:14
@vt128
vt128 merged commit 0e893c1 into master Nov 10, 2026
24 checks passed
@vt128
vt128 deleted the codex/fix-distinct-equality-let45-20261109 branch November 10, 2026 14:14
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.

1 participant