Repository navigation
Conversation
Apply filename prefix matching to the final query token and paginate the complete filtered candidate set with stable ordering and accurate totals. Reuse input page-range syntax in read locators, including rN and all, and preserve selected-page boundaries during block and character continuation. Update CLI/SDK/HTTP contracts, bilingual help, documentation, and regressions. Validation: 667 Doclib/CLI tests passed; Ruff and formatting checks passed. Refs #5366, #5337, #5365.
|
Thank you for the contribution. Last-page selection is now supported on Use Range reads preserve the selected pages during continuation and stop when the selection is complete. Local validation: 667 related Doclib/CLI tests passed, with Ruff and formatting checks passing. The Refs #5300. |
Motivation
mineru read "doc:<short_id>/tier:flash/page:last"is currently rejected even when the document's last page is cached. Numeric page locators work, but callers cannot use the documented last-page shorthand.Fixes #5300
Modification
lastas a page token in read locators.page:lastagainst the document'spage_countbefore the existing numeric page-range and target logic runs.invalid_locatorerror when the document page count is unavailable.BC-breaking
No. Existing numeric page, block, and character locators retain their current behavior and remain 1-based.
Testing
.venv/bin/python -m pytest -q -o addopts='' tests/unittest/test_doclib_cache_semantics.py tests/unittest/test_doclib_locators.py tests/unittest/test_doclib_progressive_reading.py(210 passed)uvx ruff check mineru/doclib/server.pyuvx ruff check --ignore ANN001,E501 tests/unittest/test_doclib_cache_semantics.py(the ignored rules have existing violations outside this patch)page:last/block:2/char:8Model/GPU parsing E2E was not run because this change is isolated to doclib locator parsing and cached-content reads.
Checklist