Skip to content

fix: keep page text for bookmarked Flash summaries - #388

Open
Iams4kura wants to merge 1 commit into
VectifyAI:mainfrom
Iams4kura:codex/fix-flash-bookmark-summaries-20260805t160323z
Open

fix: keep page text for bookmarked Flash summaries#388
Iams4kura wants to merge 1 commit into
VectifyAI:mainfrom
Iams4kura:codex/fix-flash-bookmark-summaries-20260805t160323z

Conversation

@Iams4kura

Copy link
Copy Markdown

Summary

  • Fixes: PageIndex Flash raises IndexError when a sparse PDF reaches the early outline gate, embedded bookmarks supply a non-empty tree, and summaries are enabled.
  • Root cause: The early-return path passed extracted page text to bookmark merging but omitted it from the result, so the public API gave summarize_tree an empty page list for the bookmark-derived nodes.

Regression evidence

  • Before: PYTHONPATH=. uv run --with-requirements requirements.txt --with pytest pytest -q -p no:cacheprovider tests/test_flash_api.py exited 1

  • After: PYTHONPATH=. uv run --with-requirements requirements.txt --with pytest pytest -q -p no:cacheprovider tests/test_flash_api.py exited 0

Verification

  • PYTHONPATH=. uv run --with-requirements requirements.txt --with pytest pytest -q -p no:cacheprovider
  • PYTHONPATH=. uv run --with-requirements requirements.txt python -m compileall pageindex tests

Scope

  • 2 files changed, +39 / -3 lines

Authorship

This fix was developed with AI assistance and was validated with the regression and project checks listed above.

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.

1 participant