Skip to content

fix(sources): paginate github issues on the gateway raw page length - #176

Merged
bakey merged 1 commit into
mainfrom
fix/github-issues-raw-page-size
Jul 30, 2026
Merged

fix(sources): paginate github issues on the gateway raw page length#176
bakey merged 1 commit into
mainfrom
fix/github-issues-raw-page-size

Conversation

@bakey

@bakey bakey commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes the deferred P1 on github.issues: the OC action filters pull requests out after paginating, so the filtered page length is not a termination signal — short-page termination silently truncated on the first PR-bearing page, and even empty-page termination fails on 100 consecutive PRs. Upstream now reports the raw page length (open-connector#228, merged); this PR consumes it.

  • Engine: PageNumber gains raw_page_size_path (mirroring total_pages_path) — the scan continues while the RAW page was full, regardless of how short or empty the filtered rows are. Missing signal → RowPathNotFound; non-integer → new PaginationRawPageSizeInvalid (kind-only). The two authoritative signals are mutually exclusive at validate time.
  • Pack: github.yaml issues declares raw_page_size_path: "$.pageInfo.fetched"; contract re-captured from a live gateway carrying the fix and the fingerprint re-pinned — older gateways fail issues registration at the fingerprint gate instead of truncating (documented, incl. the minimum-gateway note).
  • Tests: engine units (continue on full-raw/short-filtered and full-raw/empty pages, terminate on short raw page, missing/invalid signal, mutual exclusion) + a pack e2e driving a 3-page scan whose middle page is all pull requests — the case that defeats every filtered-count heuristic. Mock stubs and the demo stub gateway now emit pageInfo.
  • Live-verified: all 11 tables register with the new pin against a local gateway at upstream HEAD; the issues scan reaches the credential wall.

246 open_connector / 803 lib tests green; clippy baseline unchanged.

🤖 Generated with Claude Code

The OC list_repository_issues action filters pull requests out AFTER
paginating, so the filtered issues array's length is not a termination
signal: short-page termination silently truncated the scan on the first
PR-bearing page, and even empty-page termination fails on 100
consecutive PRs. Upstream now reports the raw page length
(pageInfo.fetched, oomol-lab/open-connector#228); this change consumes
it.

Engine: PageNumber gains raw_page_size_path, mirroring
total_pages_path — when declared, the scan continues while the RAW page
was full regardless of how short (or empty) the filtered rows are; a
missing signal propagates as RowPathNotFound and a non-integer one
fails as the new PaginationRawPageSizeInvalid (kind-only), never a
silent truncation. The two authoritative signals are mutually exclusive
at validate time. Loader exposes raw_page_size_path on page_number
pagination; the issues table declares $.pageInfo.fetched.

Contract re-captured from a live gateway carrying the upstream fix
(outputSchema now declares pageInfo) and the fingerprint re-pinned, so
older gateways fail issues registration at the fingerprint gate instead
of truncating. Live-verified: all 11 tables register with the new pin
and the issues scan reaches the credential wall.

Tests: engine units (continue on full raw page with short/empty rows,
terminate on short raw page, missing/invalid signal failures, total/raw
mutual exclusion) and a pack e2e driving a 3-page scan whose middle
page is ALL pull requests — the case that defeats every filtered-count
heuristic. Stubs and the demo stub gateway now emit pageInfo. Docs and
spec updated with the minimum-gateway note. 246 open_connector / 803
lib tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.84173% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...c/sources/providers/open_connector/packs/github.rs 94.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@bakey
bakey merged commit f41664f into main Jul 30, 2026
3 checks passed
@bakey
bakey deleted the fix/github-issues-raw-page-size branch July 30, 2026 08: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.

2 participants