Repository navigation
fix(notion-app): follow block children pagination (#13915) - #14079
Merged
kodjima33 merged 1 commit intoSep 15, 2026
Merged
Conversation
tool_get_page read a page's blocks with a single children request and ignored has_more/next_cursor, so anything past the first page was silently dropped. fetch_page_blocks now follows the cursor at Notion's 100-block page size until the page is exhausted or the rendered text reaches the 1,000-character output cap — the cap is the only thing that truncates. A later-page failure returns that page's error so the existing fail-closed path reports it; a page ceiling and repeated-cursor detection bound a malformed cursor. Verified: python3 plugins/omi-notion-app/test_pagination.py (9 tests, fail on unpatched upstream/main) and test_main.py (19 tests) pass; .github/scripts/run_checks.py --lane local --check-id notion-pagination-tests passes. Failure-Class: none
Contributor
Author
|
/claim #13915 PayPal: [email removed] |
kodjima33
approved these changes
Sep 15, 2026
kodjima33
left a comment
Collaborator
There was a problem hiding this comment.
Well-scoped bug fix: get_page now follows Notion's has_more/next_cursor block-children pagination instead of truncating at 50, with bounds against malformed cursors. Clear root cause, linked issue, 9 hermetic tests, CI clean. Confidence 5/5 — merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13915
Summary
get_pageread only the first 50 block children and never followedhas_more/next_cursor— long pages silently dropped content.fetch_page_blocksfollowsstart_cursorwhilehas_more(page_size=100, Notion's max), caps at 10 pages, stops on missing/repeated/non-string cursor, surfaces later-page errors through the existing fail-closed pathBLOCK_CHILDREN_PAGE_SIZE/MAX_PAGES/PAGE_CONTENT_LIMIT; shared helpers untouchedtest_pagination.py(9 tests) +notion-pagination-testsmanifest checkVerification
test_main.py19/19 OKrun_checks.py --check-id notion-pagination-tests→ PASS