Skip to content

[doc] Explain distinct hash collisions and integer workaround - #200

Merged
vt128 merged 1 commit into
masterfrom
codex/docs-distinct-usage-let45-20261110
Nov 9, 2026
Merged

vt128 merged 1 commit into
masterfrom
codex/docs-distinct-usage-let45-20261110

Conversation

@vt128

@vt128 vt128 commented Nov 9, 2026

Copy link
Copy Markdown
Member

distinct currently treats matching hashes as duplicates and can discard unequal integers: distinct([1, 4294967297]) returns [1]. Document this current limitation and a native-integer workaround using an ordered Starlark dict. The equality fix in #198 remains unmerged; this PR changes documentation only.

Validation: ran the exact Starlark example and current distinct behavior once on Go 1.27.3/darwin-arm64 and once on Go 1.19.13/linux-amd64, both with the pinned interpreter. The dict example returns [1, 4294967297]; current distinct returns [1]. The normal commit hook (gofmt, vet and tests) passed. Every other tracked file, including Go source, tests and module files, is byte-identical to master 1d050572.

The workaround is scoped to native integers; it makes no claim about arbitrary host values or performance costs.

Refs LET-45 / LOCAL-046.

Refs LET-45 / LOCAL-046. Document the current hash-only limitation without claiming the pending equality fix is merged.
@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

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation (-1.00%)
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1d05057) 8433 8018 95.08%
Head commit (ea7e4cf) 8433 (+0) 8018 (+0) 95.08% (+0.00%)

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 (#200) 0 0 ∅ (not applicable)

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.

@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.95%. Comparing base (1d05057) to head (ea7e4cf).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #200   +/-   ##
=======================================
  Coverage   93.95%   93.95%           
=======================================
  Files          53       53           
  Lines        6750     6750           
=======================================
  Hits         6342     6342           
  Misses        259      259           
  Partials      149      149           

☔ 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.

@vt128
vt128 marked this pull request as ready for review November 9, 2026 17:57
@vt128
vt128 merged commit d0aaa4a into master Nov 9, 2026
24 checks passed
@vt128
vt128 deleted the codex/docs-distinct-usage-let45-20261110 branch November 9, 2026 17:58
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