Repository navigation
fix(cli): report chunk truncation only when rows are omitted - #4260
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The logic matches the documented semantics and is comprehensively covered by focused regression tests.
0 open findings
What changed in this PR
Fixes incorrect meta.has_more reporting when fetched chunk counts exactly match --limit.
Changes:
- Detects truncation using fetched rows and server totals before slicing.
- Adds eight HTTP-backed pagination and truncation regression cases.
| File | Description |
|---|---|
cli/cmd/chunk/list.go |
Corrects exact-limit truncation detection. |
cli/cmd/chunk/list_truncation_test.go |
Covers limit, pagination, ordering, and empty results. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Summary
chunk list --all-pagesreportedmeta.has_more=truewhen the complete document had exactly--limitchunks. Determine truncation before slicing using fetched rows and the server total, so reaching the limit with no omitted rows reports false. Genuine truncation and single-page behavior stay unchanged.Validation
go test -count=1 ./...andgo vet ./...pass.run --new-from-rev=origin/main --concurrency=2 --timeout=2m ./..., passes fromcli/.Tests use temporary configuration and synthetic loopback HTTP. Full backend checks remain blocked by uncached backend dependencies; these results cover the CLI module. Developed and reviewed with AI assistance.