feat: sentinel error ErrBadHash #19

Merged
mvhutz merged 2 commits from feat/sentinel-errors into main 2026-04-14 00:38:11 +00:00
Owner

Description

Currently, the errors are not sentinel, and so are hard to test for. This PR makes sure hash collision errors are accounted for.

Changes

  • Add ErrBadHash. Happens when there are too many collisions for an item to be added.

Design Decisions

  • Chose to name ErrBadHash over ErrCycle because the feedbach that the user should be given is to evaluate their hash functions. Cycle collision is a bit esoteric.

Checklist

  • Tests pass
  • Docs updated
## Description Currently, the errors are not sentinel, and so are hard to test for. This PR makes sure hash collision errors are accounted for. ## Changes - Add `ErrBadHash`. Happens when there are too many collisions for an item to be added. ### Design Decisions - Chose to name `ErrBadHash` over `ErrCycle` because the feedbach that the user should be given is to evaluate their hash functions. Cycle collision is a bit esoteric. ## Checklist - [x] Tests pass - [x] Docs updated
mvhutz added 1 commit 2026-04-03 19:09:49 +00:00
feat: sentinel error for collision cycle
All checks were successful
CI / Check PR Title (pull_request) Successful in 19s
CI / Go Lint (pull_request) Successful in 41s
CI / Makefile Lint (pull_request) Successful in 38s
CI / Markdown Lint (pull_request) Successful in 22s
CI / Unit Tests (pull_request) Successful in 47s
CI / Fuzz Tests (pull_request) Successful in 1m10s
CI / Mutation Tests (pull_request) Successful in 1m17s
7bcb68b3b1
mvhutz added 1 commit 2026-04-03 19:16:26 +00:00
docs: recommend rebuilding the table
All checks were successful
CI / Check PR Title (pull_request) Successful in 19s
CI / Go Lint (pull_request) Successful in 41s
CI / Makefile Lint (pull_request) Successful in 39s
CI / Markdown Lint (pull_request) Successful in 22s
CI / Unit Tests (pull_request) Successful in 38s
CI / Fuzz Tests (pull_request) Successful in 1m10s
CI / Mutation Tests (pull_request) Successful in 1m8s
f4c0f349ba
mvhutz merged commit 867a1d49df into main 2026-04-14 00:38:11 +00:00
mvhutz deleted branch feat/sentinel-errors 2026-04-14 00:38:11 +00:00
Sign in to join this conversation.