PageIndex/tests
mountain 9ad7c687e0 fix: degrade to empty result on LLM retry exhaustion instead of aborting
llm_completion/llm_acompletion raised RuntimeError once retries were
exhausted, which propagated through the unprotected sync TOC-detection
chain (find_toc_pages -> toc_transformer -> toc_extractor -> ...) and
aborted the whole document index — a regression vs. the pre-SDK behavior
that returned "" and let callers degrade (extract_json('') -> {} ->
.get(default), falling back to no-TOC indexing).

Restore the empty-result contract ("" / ("", "error") with
return_finish_reason), now logged at WARNING so the failure is visible
rather than silent. The async gather sites keep return_exceptions=True to
absorb any non-LLM error. A single persistently-failing call no longer
blocks indexing the rest of the document.
2026-07-10 10:49:58 +08:00
..
test_agent.py fix: prompt-injection delimiter escape, legacy config coercion, gather resilience, true cross-thread concurrency bound 2026-07-09 11:15:58 +08:00
test_architecture.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
test_client.py feat(collection): doc_ids accepts str|list, design cleanups 2026-05-15 17:03:17 +08:00
test_cloud_backend.py test: de-flake query_stream early-break test 2026-07-09 20:09:23 +08:00
test_collection.py fix: six P2 correctness/robustness cleanups from the SDK review 2026-07-07 11:34:13 +08:00
test_concurrency.py fix: degrade to empty result on LLM retry exhaustion instead of aborting 2026-07-10 10:49:58 +08:00
test_config.py fix: prompt-injection delimiter escape, legacy config coercion, gather resilience, true cross-thread concurrency bound 2026-07-09 11:15:58 +08:00
test_content_node.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
test_env_compat.py fix: exact md page selection + restore CHATGPT_API_KEY alias 2026-07-08 17:33:41 +08:00
test_errors.py feat:compatible with Pageindex SDK (#238) 2026-05-11 21:06:23 +08:00
test_events.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
test_issue_163.py merge upstream/main into dev; port #188 into the index pipeline 2026-07-07 16:34:02 +08:00
test_legacy_sdk_contract.py fix: tolerate empty body on legacy delete_document 2026-07-09 20:18:44 +08:00
test_legacy_shims.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
test_legacy_utils_contract.py fix: six P2 correctness/robustness cleanups from the SDK review 2026-07-07 11:34:13 +08:00
test_local_backend.py fix: return actionable error for malformed page ranges in local tool 2026-07-09 19:22:04 +08:00
test_markdown_parser.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
test_page_content.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
test_pdf_parser.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
test_pipeline.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
test_review_fixes.py feat(cli): accept both bare flags and legacy yes/no for --if-add-* args 2026-07-08 19:11:52 +08:00
test_review_fixes_2.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00
test_sqlite_storage.py fix: reject trailing newline in collection-name validation 2026-07-09 19:12:56 +08:00
test_storage_protocol.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
test_types.py fix: CMYK image drop, empty-doc crash, page_index shadowing, sqlite hardening, flaky tests 2026-07-09 11:58:59 +08:00