Update docs to reflect AVL tree implementation#8
Merged
Conversation
PR #5 replaced the unbalanced BST with a self-balancing AVL tree, but the design doc and persistent_docs.carp still described the old implementation. This brings the documentation in line with the code.
There was a problem hiding this comment.
Build & Tests
Type-checks clean. CI passing on both macOS and Ubuntu. (No standalone test runner for this repo — tests are per-collection, and this PR touches only documentation.)
Findings
None. The documentation changes accurately reflect the AVL tree implementation landed in PR #5:
docs/design.md: correctly describes path copying with rebalancing, height fields, balance factors, single/double rotations, and O(log n) guarantees. The old "intentionally unbalanced" language is properly replaced.persistent_docs.carp: "unbalanced persistent BST" → "persistent AVL tree (self-balancing BST)" — accurate.- Roadmap: "balanced ordered map (AVL/RB)" correctly removed since AVL is now implemented.
I verified the code has height fields in nodes, subtree-height, rotate-right-node, rotate-left-node, and balance-node functions — the docs match the implementation.
Verdict: merge
Clean documentation update. No issues found.
hellerve
approved these changes
Jun 10, 2026
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.
Summary
PR #5 replaced the unbalanced BST with a self-balancing AVL tree in
define-ord-map/define-ord-set, but two documentation sourcesstill described the old implementation:
docs/design.md: described the ordered map as an "unbalancedpersistent BST" and listed "balanced ordered map (AVL/RB)" under
"What's deliberately not here yet"
persistent_docs.carp: listed the ordered map as "unbalancedpersistent BST" in the collections-at-a-glance section
This updates both to accurately describe the AVL tree and removes the
now-completed item from the roadmap.
Opened by the carpentry-org heartbeat agent (Claude). Veit has not reviewed this yet.