PageIndex/pageindex
mountain 9ad54122bb fix: resolve concurrency and DoS pitfalls from PR #272 review
- index/utils.py: fix an asyncio deadlock in _sync_llm_semaphore. Sync LLM
  calls (check_toc / process_no_toc / toc_transformer) run on the event-loop
  thread nested inside the async meta_processor, and its blocking ceiling
  acquire could wait forever for a permit held by async _llm_semaphore holders
  that can only release it once the (now-frozen) loop runs. Take the slot
  non-blocking when on a running loop; keep the blocking acquire off-loop.
- index/utils.py: bound parse_pages ranges before materializing range() into
  the list, so a huge span like '1-2000000000' is rejected up front instead of
  exhausting memory before the 1000-page cap is ever checked (DoS).
- storage/sqlite.py: bump a generation counter on close() so a thread that
  cached a connection in thread-local storage reconnects on its next call
  instead of reusing a closed handle (ProgrammingError).
- backend/cloud.py: after connect, bail out of the SSE background thread if the
  consumer already abandoned the stream, instead of draining it in the background.

Adds regression tests for each fix.
2026-07-10 14:49:55 +08:00
..
backend fix: resolve concurrency and DoS pitfalls from PR #272 review 2026-07-10 14:49:55 +08:00
index fix: resolve concurrency and DoS pitfalls from PR #272 review 2026-07-10 14:49:55 +08:00
parser fix: empty-list scope, get_tree bool casing, md fence tracking; dedupe base URL 2026-07-10 11:17:20 +08:00
storage fix: resolve concurrency and DoS pitfalls from PR #272 review 2026-07-10 14:49:55 +08:00
__init__.py fix: address PR #272 review findings (directly-fixable items) 2026-07-08 18:56:51 +08:00
agent.py fix: prompt guidance referenced fields get_document doesn't return 2026-07-10 10:53:43 +08:00
client.py fix: empty-list scope, get_tree bool casing, md fence tracking; dedupe base URL 2026-07-10 11:17:20 +08:00
cloud_api.py fix: empty-list scope, get_tree bool casing, md fence tracking; dedupe base URL 2026-07-10 11:17:20 +08:00
collection.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
config.py Fix sync LLM concurrency limit 2026-07-09 22:12:19 +08:00
errors.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
events.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
page_index.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
page_index_md.py fix: address xhigh code-review findings on 2d46d68..8f536cb 2026-07-08 21:56:41 +08:00
retrieve.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
tokens.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
types.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
utils.py refactor(index): dedupe the copied indexing pipeline behind deprecation shims 2026-07-07 10:42:23 +08:00