You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Respect model output limits during compaction - #26
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 964a23f2-0aa6-4698-ac6d-a389fcf4e7ba
📥 Commits
Reviewing files that changed from the base of the PR and between 89ab4c8 and 1a1db42.
⛔ Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing: 4
.gitignore
package.json
src/compaction.ts
test/compaction.test.ts
💤 Files with no reviewable changes: 1
.gitignore
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Summary
Summary by CodeRabbit
Bug Fixes
Improved automatic compaction retries by allowing larger retry requests when model limits permit.
Compaction now consistently respects the model’s maximum output capacity.
Prevented unnecessary retries when the available context is exhausted.
Chores
Updated the application release version.
Refined project configuration and development tooling.
Compaction retries now use a 32,768-token fallback, subject to the model’s positive token limit. Tests cover token selection and updated retry outcomes. The package version and development dependency ranges change, and several tool-directory ignore rules are removed.
Changes: Compaction retry token selection
Layer / File(s)
Summary
Retry token selection and validation src/compaction.ts, test/compaction.test.ts
The fallback token value changes from 16,384 to 32,768, while remaining capped by the model’s positive maxTokens limit. Tests cover token selection, request limits, retry counts, usage totals, and prompt propagation.
Package metadata
Layer / File(s)
Summary
Version and development dependencies package.json
The package version changes from 0.2.1 to 0.2.2. The development dependency ranges for @earendil-works/pi-ai, pi-coding-agent, and pi-tui change from ^1.3.0 to ^1.4.0.
Ignore rules
Layer / File(s)
Summary
Tool directory exclusions .gitignore
Ignore rules for .pi/, .pi-subagents/, .agents/, .claude/, and .codex/ are removed. The exclusions for /auth.json, /config.json, and /models.json remain.
No actionable merge-blocking risk is established by the reviewed changes.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly describes the main change: compaction now respects model output limits.
Description check
The description directly explains the compaction behavior, SDK update, and version update in the changeset.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
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
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


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Compaction now uses the model’s output limit when the caller supplies no explicit cap.
No actionable issues found. Tests were not run; dependencies are not installed in this checkout.
Reviews (1) · Last reviewed commit: "Respect model output limits during compa..." · Reviewed by Greptile