Record-search pagination tip recommends --offset even when --json rejects it

Open Beginner friendly
#2,940 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Read shortcuts/base/record_export.go around the shared pagination tip, then inspect shortcuts/base/record_query.go around its JSON and pagination validation. Reconcile the continuation guidance for flag mode and JSON-body mode; done when the tip directs JSON callers to put the next offset in the request body and no longer suggests a conflicting --offset flag.

Written by the indexing model from the issue text.

Description

bug

Hullo folks,

I'm doing some research for Tessl Code Review and we ran it against your repo. It flagged a potential issue, and I figured it made sense to share it with you:

The shared record-analysis tip tells callers to continue with --offset set to next_offset when has_more is true. +record-search includes this tip, including when the request uses --json.

For example, a caller starts with:

lark-cli base +record-search --base-token <base> --table-id <table> \
  --json '{"keyword":"Alice","search_fields":["Name"],"limit":2}'

If the response has more results, following the tip by adding --offset 2 conflicts with --json. The validator rejects explicitly supplied pagination flags; offset is in that exclusive set.

Expected: distinguish flag-mode continuation from JSON-body continuation. For the latter, put "offset":2 inside the JSON body. The validation hint already explains this, but the earlier pagination instruction sends the caller into the error.

This is a help-text/validation inconsistency established from current source, not a live Lark API test. Checked commit: c5fbf1a52df77d5cb9cac2b1501770b2fb9af7d2.

Full transparency: I work at Tessl, and we've spotted that using Tessl Code Review - using repository-level context and specific review lenses that improve over time through feedback. That’s how this finding surfaced.

We’re just getting started and want to offer the tool free to open-source projects. If this is useful, happy to give you access.

Baptiste

Dominant language
Go
Stars
18.2k
Forks
1.4k
Avg merge
20h 34m
Merged PRs (30d)
17

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from larksuite/cli

All issues in larksuite/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.