Watch
0
0
Fork
You've already forked hyperhive
0

hive-forge list trusts the forge's own next-page signal for its trailer

This commit is contained in:
atlas 2026-10-21 00:34:38 +02:00
commit 62a8a40e90
2 changed files with 140 additions and 87 deletions

View file

@ -344,14 +344,16 @@ to discover valid label names before triaging or to audit the label set.
- `list --limit N` is a *request*: the forge clamps page size to its own
`api.MAX_RESPONSE_ITEMS` (50 by default), so `--limit 400` returns at
most 50 rows. The stderr trailer (printed in `--json` mode too)
reports the real total from the response's `X-Total-Count`
(`… 50 of 187 shown … 137 more`), so trust the trailer, not the row
count, when deciding whether you've seen everything. The trailer
reports the rows shown so far, out of the total when the forge sent
one, plus a `re-run with --page N+1` hint. The last page prints no
trailer and no hint, so silence means the list is complete. Without
`X-Total-Count` it falls back to `N shown … more results may exist`
on a full page.
is driven by the forge's own `Link: rel="next"` / `X-HasMore`
signal, so it stays right when the forge clamps `--limit`: while a next
page exists it prints the rows shown so far (out of the response's
`X-Total-Count` when sent, `… 50 of 187 shown … 137 more`) and a
`re-run with --page N+1` hint. The last page prints no trailer, so
silence means the list is complete. Two cases stay ambiguous: without
`X-Total-Count` the headers didn't come through, and it falls back to
`N shown … more results may exist` on a page of exactly `--limit` rows
(silent on a clamped one); a proxy that strips only `Link` while
keeping `X-Total-Count` reads as a last page.
- `repo-search` reads `X-Total-Count` the same way `list` does and warns
with the real remaining count when it's present (`… 50 of 187 shown …
137 more exist`); without it (an older forge, a stripping proxy) it