Skip to content

feat: clamp compact threshold - #68

Merged
bobrykov merged 2 commits into
masterfrom
feat/compact-threshold-clamp
Aug 4, 2026
Merged

feat: clamp compact threshold#68
bobrykov merged 2 commits into
masterfrom
feat/compact-threshold-clamp

Conversation

@bobrykov

@bobrykov bobrykov commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@bobrykov, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e6896266-a47c-4be3-979c-990b10cf742e

📥 Commits

Reviewing files that changed from the base of the PR and between 8107ac1 and f691ae3.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/config.rs
📝 Walkthrough

Walkthrough

SessionConfig::compact_threshold now normalizes values above 100 during default construction, builder updates, and serde deserialization. Tests cover these paths and valid values. The changelog documents the behavior.

Changes

Compact threshold normalization

Layer / File(s) Summary
Construction and deserialization normalization
src/config.rs, CHANGELOG.md
A shared clamp helper limits default and builder values to 100. A serde helper applies the same limit during deserialization and preserves deserialization errors. Tests cover defaults, high values, and valid values. The changelog documents the behavior.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: clamping the compact threshold.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/compact-threshold-clamp

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/config.rs`:
- Around line 153-154: The documentation in src/config.rs lines 153-154 must
state that serialization remains a JSON number while out-of-range
compact_threshold values are normalized during deserialization, rather than
claiming identical round-tripping. Update CHANGELOG.md line 12 to remove the
“every construction path” wording and the claim that Default carries an
out-of-range value, and explicitly document that public struct literals bypass
normalization.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a4c75b70-c877-4989-a61e-71e1ceae2039

📥 Commits

Reviewing files that changed from the base of the PR and between b4cf96b and 8107ac1.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/config.rs

Comment thread src/config.rs Outdated
@dch-labs dch-labs deleted a comment from coderabbitai Bot Aug 3, 2026
@bobrykov
bobrykov merged commit 2e65fbc into master Aug 4, 2026
7 checks passed
@bobrykov
bobrykov deleted the feat/compact-threshold-clamp branch August 4, 2026 05:23
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