Repository navigation
Restore Chen balancing for recursive and iterative size-balanced trees - #33
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #32
Working session summaryPR #33 is ready for review. It restores Chen balancing for recursive and iterative updates, adds in-place recovery for legacy trees, and prepares crates.io trusted publishing with the existing token fallback. Case study and evidence The 4,096-key regression now preserves balance after every insertion and finishes at 13 levels, down from 17. The independent deletion regression also passes. All PR checks passed on Linux, macOS, and Windows with 100% library line coverage. The hosted benchmark produced all 32 results, and the 15-minute review window closed with no findings. CI · Benchmarks I reported the affected Rust consumer and verified the pinned fix with insert, delete, reinsert, and query checks in its unit and split stores. doublets-rs #99 This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (289.3K + 13.7M cached) input tokens, 91.7K output tokens, $5.269474 cost 🤖 Models used:
📎 Log file uploaded as Gist (1181KB)This AI session has ended. Monitoring of this pull request continues. Feel free to review and add feedback while checks are running. |
✅ Ready to mergeThis pull request is now ready to be merged:
|
Fixes #32
Changes
Reproduce and verify
cargo run --locked --example tree_balancechecks the invariant after each edit. The same example on crates.ioplatform-trees0.3.4 first fails at node 3 on the 11th hot/cold insertion, and ends at height 17 for 4,096 keys (bound 16). An independent complete-tree deletion sequence fails at node 17. The fixed release candidate preserves the invariant on both workloads and finishes the insertion workload at height 13. Before · AfterThe automated checks
interleaved_attachments_keep_every_subtree_balancedanddeleting_from_a_complete_tree_preserves_balancereproduce those failures. The broader suite compares rotations and node layouts for the two algorithms and checks 40,320 insertion orders, 322,560 first deletions, and recovery from a 4,096-node legacy chain. The local verification reports 131 unit and integration tests, four doctests, and 700/700 covered library lines. Regression tests · Coveragecargo run --locked --release --example benchmark_collectionsprints the comparison. Choosebenchmarksin the workflow dispatch to record the release-mode report and upload it as an artifact. README measurements · Hosted benchmark run · 32-row reportThe final commit passed on Linux, macOS, and Windows. Its hosted coverage gate measured 656/656 instrumented lines on Rust 1.100.1, and the package check confirmed the README includes the benchmark table. Final CI run
Investigation and downstream report
The case study includes the complete requirement map, archived GitHub data and benchmark artifacts, and the migration analysis. The downstream library builds against the pinned Git fix. In-memory unit and split stores also passed 1,024 interleaved shared-endpoint inserts, deletions, and reinserts, with assertions for searches and endpoint counts. Its issue tracks the dependency update and persisted-index validation. Case study · doublets-rs #99