Skip to content

fix(problems): surface pagination completeness on turno_list_problems - #12

Merged
ai-nlma merged 1 commit into
mainfrom
fix/problems-pagination-envelope
Sep 10, 2026
Merged

ai-nlma merged 1 commit into
mainfrom
fix/problems-pagination-envelope

Conversation

@ai-nlma

@ai-nlma ai-nlma commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • GET /v2/problems has no upstream Laravel-paginator envelope (unlike /v2/projects, which returns current_page/last_page/per_page/total), so a caller could not tell a full page apart from a truncated one.
  • turno_list_problems now adds returned/limit_applied/has_more to the response so truncation is detectable without a wasted probe call (has_more = returned === limit_applied). If upstream ever starts including its own paginator fields, they're passed through untouched instead of being overwritten.
  • Tool description now documents the undocumented upstream default limit of 100.
  • Left the broader 49-tool envelope normalization as a follow-up, per the issue.

Closes #11

Test plan

  • npm run typecheck
  • npm test (47 passed, including new tests/unit/problems-tool.test.ts covering: synthesized envelope + has_more true/false, default-limit-100 behavior, pass-through when upstream paginator fields are present, and query-param forwarding)
  • npm run build

GET /v2/problems has no upstream paginator envelope (unlike /v2/projects,
which returns current_page/last_page/per_page/total), so a caller could
not tell a full page from a truncated one. Add returned/limit_applied/
has_more so truncation is detectable without a second probe call, passing
an upstream envelope through untouched if one is ever present. Also
document the undocumented upstream default limit of 100 in the tool
description.

Fixes #11

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ai-nlma

ai-nlma commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

Heads up: the `typecheck-and-test` GitHub Actions check failed immediately with "your account is locked due to a billing issue" — the job never actually ran, so this is unrelated to the change in this PR.

Verified locally instead:

  • `npm run typecheck` — clean
  • `npm test` — 47/47 passed (8 files), including the 5 new cases in `tests/unit/problems-tool.test.ts`
  • `npm run build` — clean

No branch protection is configured requiring this check, so merging on the strength of the local verification above. Worth fixing the Actions billing issue separately so future PRs get real CI signal.

@ai-nlma
ai-nlma merged commit c5cfe9e into main Sep 10, 2026
1 check failed
@ai-nlma
ai-nlma deleted the fix/problems-pagination-envelope branch September 10, 2026 05:28
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.

turno_list_problems returns no pagination metadata and silently caps at 100, unlike turno_list_projects

1 participant