Skip to content

Update docs to reflect AVL tree implementation#8

Merged
hellerve merged 1 commit into
mainfrom
claude/update-docs-avl
Jun 10, 2026
Merged

Update docs to reflect AVL tree implementation#8
hellerve merged 1 commit into
mainfrom
claude/update-docs-avl

Conversation

@carpentry-agent

Copy link
Copy Markdown

Summary

PR #5 replaced the unbalanced BST with a self-balancing AVL tree in
define-ord-map / define-ord-set, but two documentation sources
still described the old implementation:

  • docs/design.md: described the ordered map as an "unbalanced
    persistent BST" and listed "balanced ordered map (AVL/RB)" under
    "What's deliberately not here yet"
  • persistent_docs.carp: listed the ordered map as "unbalanced
    persistent 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.

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.

@carpentry-reviewer carpentry-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 hellerve merged commit 9a03cb0 into main Jun 10, 2026
2 checks passed
@hellerve hellerve deleted the claude/update-docs-avl branch June 10, 2026 10:16
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