Skip to content

fix(digest): cap followups-due section by --limit#460

Merged
plind-junior merged 2 commits into
vouchdev:testfrom
Yurii214:fix/digest-followups-limit
Jul 13, 2026
Merged

fix(digest): cap followups-due section by --limit#460
plind-junior merged 2 commits into
vouchdev:testfrom
Yurii214:fix/digest-followups-limit

Conversation

@Yurii214

Copy link
Copy Markdown

What changed

vouch digest caps 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 --limit help reads "cap per section (pending, decisions, stale, followups)" — followups is documented as capped, but the code didn't honor it. vouch digest --limit 10 against 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 most limit rows, like the other three sections.

VEP

not a surface change; none needed.

Tests

  • make check passes locally (ruff + mypy + pytest: 1195 passed, 34 skipped)
  • new behaviour has a test: test_build_limit_caps_followups — fails on the previous code, passes now
  • CHANGELOG.md updated under ## [Unreleased]

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.
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d1460026-5678-48b3-8fbb-357429c085f5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance tests tests and fixtures size: XS less than 50 changed non-doc lines labels Jul 10, 2026
@plind-junior plind-junior merged commit d458ed8 into vouchdev:test Jul 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation, specs, examples, and repo guidance size: XS less than 50 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants