Skip to content

Warn when tree rotation results are ignored - #1

Merged
konard merged 2 commits into
mainfrom
v2
Nov 1, 2026
Merged

konard merged 2 commits into
mainfrom
v2

Conversation

@FreePhoenix888

@FreePhoenix888 FreePhoenix888 commented May 25, 2023 •

Copy link
Copy Markdown
Member

Ignoring the root returned by a tree rotation leaves the caller pointing at only part of the tree. Mark left_rotate_core and right_rotate_core as #[must_use], with a diagnostic explaining that the returned node must update the subtree root.

This retains the useful rotation-result practice from the original v2 proposal, following the review request. Main is merged into v2 with history preserved and all conflicts resolved. The obsolete dependency/API changes, unfinished slice-tree prototype, empty benchmark, and assertion-free property test were discarded after review. Current tree/list behavior and public signatures are preserved.

The decision audit accounts for the original changes and maps the request to verification evidence. A patch changelog fragment prepares the automatic release.

Validation:

  • Added two compile-fail documentation tests using #![deny(unused_must_use)]. Both failed before the annotations because discarded results compiled successfully; both pass afterward.
  • All 116 integration tests and four documentation tests pass, including existing rotation tests for returned roots, links, sizes, and in-place updates.
  • Formatting, Clippy with warnings denied, release build, package listing, and repository file-size/changelog/version checks pass locally.
  • GitHub Actions run 41072545242 passed on commit 94cdf4a, including Linux, macOS, and Windows tests and the release build/package check. CodeFactor also passed.

No separate issue or required sub-issue is linked to this PR.

@konard

konard commented Oct 30, 2026

Copy link
Copy Markdown
Member

Double check if we can take any better practices from this pull request, after resolving conflicts, and only if anything will be better keep changes.

@konard
konard marked this pull request as draft October 30, 2026 14:24
@konard

konard commented Oct 30, 2026

Copy link
Copy Markdown
Member

🤖 AI Work Session Started

Started at 2026-10-30T14:24:48.867Z. Please wait for it to finish before giving feedback.

Runtime: solve v2.39.7 · tool codex · model gpt-6.1-sol · task image konard/hive-mind-dind:2.39.7@sha256:aef0be15dfafc36fe6602e7624904dd7f79e601981d67733bc7284ba4858202b

Resolve the old proposal against current implementations, preserving main's public API and dependency migration. Adopt must-use diagnostics on root-returning rotations with reproducing doctests and document the selection of improvements.
@konard konard changed the title Remove inner folder and its dependencies Warn when tree rotation results are ignored Oct 30, 2026
@konard
konard marked this pull request as ready for review October 30, 2026 14:36
@konard

konard commented Oct 30, 2026

Copy link
Copy Markdown
Member

Working session summary

PR #1 is conflict-free and ready for review.

  • Retained useful rotation diagnostics with two regression tests.
  • Documented the review of superseded changes.
  • All 120 tests and CI checks pass.
  • Pushed 94cdf4a to v2; working tree is clean.

Completed in about 11 minutes.


This summary was automatically extracted from the AI working session output.

@konard

konard commented Oct 30, 2026

Copy link
Copy Markdown
Member

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-6.1 Sol
  • Provider: OpenAI
  • Public pricing estimate: $1.437749

📊 Context and tokens usage:

  • 105.9K / 272K (39%) input tokens, 21.2K / 128K (17%) output tokens

Total: (105.9K + 3.5M cached) input tokens, 21.2K output tokens, $1.437749 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-6.1-sol
  • Thinking level: xhigh (~31999 tokens)
  • Model: GPT-6.1 Sol (gpt-6.1-sol)

📎 Log file uploaded as Gist (629KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Oct 30, 2026

Copy link
Copy Markdown
Member

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No uncommitted changes

@konard
konard merged commit b44b370 into main Nov 1, 2026
13 checks passed
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.

2 participants