Add pagination metadata to gitea_list_prs #342

Merged
sysadmin merged 1 commits from feat/issue-340-list-prs-pagination-metadata into master 2026-07-07 04:03:30 -05:00
Owner

Summary

Closes #340

gitea_list_prs now returns a wrapped response with prs and pagination metadata instead of a bare list. Adds api_fetch_page for single-page fetches with has_more, is_final_page, and next_page. When page is omitted, all pages are traversed and inventory_complete is set.

gitea_review_pr inventory now routes through gitea_list_prs so pr_inventory_trust_gate can prove pagination finality. Adds assess_list_prs_pagination_proof for reviewer workflow verification.

Breaking change

Callers of gitea_list_prs must use result["prs"] instead of treating the return value as a list.

Tests

  • tests/test_list_prs_pagination.py — multi-page fetch, final-page metadata, proof verifier
  • Updated test_mcp_server, test_pr_queue_inventory, test_capability_stop_terminal

Controller Handoff

Implementation complete on feat/issue-340-list-prs-pagination-metadata. Ready for reviewer queue.

## Summary Closes #340 `gitea_list_prs` now returns a wrapped response with `prs` and `pagination` metadata instead of a bare list. Adds `api_fetch_page` for single-page fetches with `has_more`, `is_final_page`, and `next_page`. When `page` is omitted, all pages are traversed and `inventory_complete` is set. `gitea_review_pr` inventory now routes through `gitea_list_prs` so `pr_inventory_trust_gate` can prove pagination finality. Adds `assess_list_prs_pagination_proof` for reviewer workflow verification. ## Breaking change Callers of `gitea_list_prs` must use `result["prs"]` instead of treating the return value as a list. ## Tests - `tests/test_list_prs_pagination.py` — multi-page fetch, final-page metadata, proof verifier - Updated `test_mcp_server`, `test_pr_queue_inventory`, `test_capability_stop_terminal` ## Controller Handoff Implementation complete on `feat/issue-340-list-prs-pagination-metadata`. Ready for reviewer queue.
jcwalker3 added 1 commit 2026-07-07 03:25:57 -05:00
Return wrapped {prs, pagination} from gitea_list_prs with has_more,
inventory_complete, and page traversal via api_fetch_page. Route
gitea_review_pr inventory through gitea_list_prs so trust gates can
prove pagination finality. Add assess_list_prs_pagination_proof verifier.

Closes #340
sysadmin approved these changes 2026-07-07 04:03:19 -05:00
sysadmin left a comment
Owner

All tests pass successfully. Reviewed the implementation of the pagination metadata and verifier for gitea_list_prs in gitea_mcp_server.py, gitea_auth.py, and review_proofs.py. The envelope response structure correctly encapsulates both the list of PRs and the pagination status (returned count, has_more, is_final_page), and is verified by the new tests in tests/test_list_prs_pagination.py. Tested inside the review worktree, and the single failing test is pre-existing on master.

All tests pass successfully. Reviewed the implementation of the pagination metadata and verifier for gitea_list_prs in gitea_mcp_server.py, gitea_auth.py, and review_proofs.py. The envelope response structure correctly encapsulates both the list of PRs and the pagination status (returned count, has_more, is_final_page), and is verified by the new tests in tests/test_list_prs_pagination.py. Tested inside the review worktree, and the single failing test is pre-existing on master.
sysadmin merged commit f92d1a29c2 into master 2026-07-07 04:03:30 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#342