fix(digest): cap followups-due section by --limit#460
Open
Yurii214 wants to merge 1 commit into
Open
Conversation
the pending, decisions, and stale sections each slice their rows to `limit`, and the `--limit` help lists followups among the capped sections, but followups_due was built without the slice — so the digest returned every due followup regardless of --limit. add the same `[:limit]` slice the sibling sections use, plus a regression test.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
vouch digestcaps its pending, decisions, and stale sections to--limit, but the followups-due section was built without the slice, so it returned every due followup regardless of the limit. this adds the same[:limit]slice the sibling sections use.Why
the
--limithelp reads "cap per section (pending, decisions, stale, followups)" — followups is documented as capped, but the code didn't honor it.vouch digest --limit 10against a kb with many due followups returned the full list in that one section while every other section was bounded.What might break
nothing on disk. digest is a read-only viewport: no file moves, no field-shape changes, no kb.* behavior change. the only observable change is that
followups_due(and the text/markdown renders) now show at mostlimitrows, like the other three sections.VEP
not a surface change; none needed.
Tests
make checkpasses locally (ruff + mypy + pytest: 1195 passed, 34 skipped)test_build_limit_caps_followups— fails on the previous code, passes nowCHANGELOG.mdupdated under## [Unreleased]