Skip to content

feat: add records-limit flags for json and ndjson#150

Open
lidel wants to merge 1 commit into
mainfrom
fix/json-records-limit-via-boxo
Open

feat: add records-limit flags for json and ndjson#150
lidel wants to merge 1 commit into
mainfrom
fix/json-records-limit-via-boxo

Conversation

@lidel
Copy link
Copy Markdown
Member

@lidel lidel commented May 19, 2026

JSON responses under-delivered: boxo applied the records limit before filtering, so records dropped by filters shrank the response below what callers asked for.

The fix lives in boxo:

Someguy bumps to it and exposes the caps as configurable flags.

Changes

  • main.go: add --records-limit / SOMEGUY_RECORDS_LIMIT (100) and --streaming-records-limit / SOMEGUY_STREAMING_RECORDS_LIMIT (1000); reject negative values
  • server.go: wire both into server.WithRecordsLimit / WithStreamingRecordsLimit
  • go.mod: bump boxo to the post-filter records-limit commit

Note

#149 and #150 fix the same bug two ways. Merge only one.

Feedback welcome, but my gut feeling is the #150 is preferable: it fixes the root cause in the shared layer. Needs ipfs/boxo#1157 first.

JSON delegated routing responses under-delivered: boxo applied the
records limit before filtering, so records dropped by filters
shrank the response below what callers asked for. The fix lives in
boxo (ipfs/boxo#1157); someguy bumps to it and exposes the caps as
configurable flags.

- main.go: add --records-limit / SOMEGUY_RECORDS_LIMIT (100) and
  --streaming-records-limit / SOMEGUY_STREAMING_RECORDS_LIMIT
  (1000); reject negative values
- server.go: wire both into server.WithRecordsLimit /
  WithStreamingRecordsLimit
- go.mod: bump boxo to the post-filter records-limit commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant