Skip to content

[Bug]: --select removes pageInfo, disabling truncation detection #12

Description

@marco-dc

TWG CLI version

1.2.6

Operating system

Ubuntu 24.04 (WSL2)

Command or agent request

Both run against a project with more than 100 matching issues:

twg jira workitem query --jql 'project = ABC' --limit 200 -o json
twg jira workitem query --jql 'project = ABC' --limit 200 --select data.issues.key -o json

Expected behavior

pageInfo is not payload data: it is the signal that the result set was truncated. It should survive a --select projection, or its removal should be reported.

Actual behavior

Without --select:

issues returned: 100
pageInfo: {'hasNextPage': True, 'nextCursor': '<redacted>'}

With --select data.issues.key, same query and same limit:

issues returned: 100
pageInfo: absent
top-level keys: ['apiVersion', 'command', 'meta', 'data']

Exit code 0 in both cases.

A pagination loop that reads hasNextPage finds it absent and stops, so a full page is treated as a complete result set. --select is the flag recommended for reducing token usage in agent contexts, so this affects consumers following that guidance.

Workaround: name pageInfo in the projection (--select data.issues.key,pageInfo). A full page returned without pageInfo should be treated as an error rather than as the end of the set.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions