Skip to content

Define HAMT options and failure contract - #449

Draft
helly25 wants to merge 1 commit into
feature/hamt-node-indexfrom
feature/hamt-options
Draft

Define HAMT options and failure contract#449
helly25 wants to merge 1 commit into
feature/hamt-node-indexfrom
feature/hamt-options

Conversation

@helly25

@helly25 helly25 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Define the public constexpr configuration and lightweight bounded-failure vocabulary shared by all HAMT forms. The initial options expose only decisions already required by the contract: fragment width and hard maximum size.

AG;DR

  • adds structural HamtOptions suitable for a non-type template argument
  • validates the 4- through 7-bit fragment widths retained for measurement
  • rejects zero-sized containers
  • defines allocation-exhausted and max-size-exceeded failures without heavyweight status machinery
  • avoids prematurely exposing unmeasured ownership and iterator strategies

Validation:

  • bazel test //mbo/container:hamt_options_test
  • focused pre-commit passed with local clang-tidy and the sandbox-incompatible trunk wrapper explicitly skipped; clang-format passed

This is a chained draft based on PR #448 and must not merge before its predecessors.

@helly25
helly25 force-pushed the feature/hamt-options branch from 97996a3 to 1b1f3f2 Compare September 11, 2026 11:50
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