Conversation
…rt' into implement/hamt-shared-child-insert # Conflicts: # mbo/container/internal/hamt_shared_node.h
…rt' into implement/hamt-shared-child-insert
…rt' into implement/hamt-shared-child-insert # Conflicts: # mbo/container/internal/hamt_shared_node.h
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.
Add persistent HAMT child insertion while preserving older snapshots and child lifetimes.
AG;DR
Head f815a47 adds rejection tests for unrelated entry/child count changes and child insertion into terminal collisions. They verify that rejected operations neither allocate nor retain children and preserve the original payload. These cover three previously missed branch paths identified in the remote coverage artifact; no exclusions or baselines change. The pushed head passes bazel test //... (159 passing tests and one existing exception-only skip) and focused pre-commit, with local clang-tidy and trunk-fmt skipped. Replacement remote checks are pending.
Local validation of synchronized head 32f0adb found child-insertion tests still referring to the wildcard import removed by the parent. Head 5fed2be binds those successful allocation payloads with value_or(nullptr), asserts NotNull, and uses checked pointers directly for ownership and inspection. Focused pre-commit passes; local clang-tidy and trunk-fmt remain skipped. Full-suite and remote checks must validate this replacement head.
Synchronized to fully green PR 459 head ac17609 and pushed synchronization c4480b5 immediately. The merge preserves deferred child retention alongside the parent's const construction pointer and original optional return. Follow-up 32f0adb makes CopyChildren accept a const node and applies the same const-pointer/original-result pattern to child insertion. Focused pre-commit passes with local clang-tidy and trunk-fmt skipped. Full-suite and replacement remote validation are pending on this pushed head; earlier heads' results do not validate it. No merging is requested.
TryInsertChild copies the entry array and inserts one child at its dense bitmap rank. Shared allocation and child-copy helpers serve normal construction and entry insertion too. The caller preserves old bitmap slots and adds exactly one node slot. Null children are rejected before allocation; child references are retained only after successful construction. Exact allocator metadata and non-throwing entry constraints remain unchanged.
Tests cover insertion positions, preserved entries, lifetime/reference balancing, invalid counts/ranks, null children, and exhausted storage. HAMT_STORAGE.md documents ownership and caller invariants. This draft follows PR 459; it does not request merging. Validation is in progress. Local clang-tidy and trunk-fmt are skipped as requested.
Published synchronization b325df8 includes its parent's collision/backing-storage and shared-node failure-path tests, exact packed-object lifetime checks, singleton collision lifetime checks, and full-depth routing/lookup tests at widths 4–7. No baselines or exclusions change. Current-head full-suite and replacement remote coverage validation are in progress.