Watch
0
0
Fork
You've already forked hyperhive
0

hive-forge: comments --since --limit returns N, not at most 49

The issue-comments endpoint takes no page or limit, so `comments
--since` cut its window client-side from a whole-list response. The
leftover over-fetch-by-one request (`.page_size(limit + 1)`) was a
no-op and the `--limit` clamp to MAX_LIMIT (49) guarded a truncation
check that no longer needs one.

Drop both: `--since T --limit N` now returns N comments. `comments
--json` still emits `since_limit_clamped`, always `false`. `timeline`
is untouched; its endpoint pages and its clamp stays.
This commit is contained in:
atlas 2026-10-09 21:44:00 +02:00
commit 3d81266483
4 changed files with 54 additions and 50 deletions

View file

@ -101,7 +101,7 @@ pub(crate) fn parse_rfc3339(s: &str) -> Result<OffsetDateTime> {
/// Forgejo's per-page cap, shared by every listing verb that over-fetches
/// by one to detect truncation without an exact total (`timeline`'s
/// `--limit`, `comments`' `--since`). The API silently clamps a requested
/// `--limit`). The API silently clamps a requested
/// page size to this value, so it's pinned explicitly rather than left as
/// a hidden default downstream math could drift out of sync with.
pub(crate) const PAGE_SIZE: u64 = 50;