PageIndex/tests
mountain 9f01ba41ac Merge upstream/main into dev; port hardening into index/
main's changes landed on the top-level pageindex/page_index.py and
page_index_md.py, which are deprecation shims on dev (the pipeline now
lives in pageindex/index/). Resolving the conflict by keeping the shims
would silently drop main's work, so port it into index/ instead:

- page_index.py: prompt-injection hardening (_SYSTEM_HARDENING,
  _secure_doc_text and the redact/wrap helpers) applied to every prompt
  builder, plus physical_index validation (_validate_physical_indices,
  _validate_chunk_physical_indices) wired into toc_index_extractor,
  process_no_toc and process_toc_no_page_numbers, and TOC-identity
  validation (reject reordered/modified/count-mismatched LLM output).
  Combined with dev's existing robustness edits in the same functions.
- page_index_md.py: recognize whole-line **bold** as a level-1 heading,
  skip empty bold headings, use the stored node level.
- tests: retarget the ported tests at pageindex.index.* instead of the
  shim (underscore helpers aren't re-exported by the shim's `import *`,
  and patching the shim wouldn't intercept the real pipeline calls).

311 passed, 2 skipped.
2026-07-17 18:11:14 +08:00
..
test_agent.py fix: prompt guidance referenced fields get_document doesn't return 2026-07-10 10:53:43 +08:00
test_architecture.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
test_client.py fix: default SDK retrieve_model to gpt-5.4 instead of following model 2026-07-16 16:09:07 +08:00
test_cloud_backend.py fix: enforce collection membership on cloud query doc_ids 2026-07-16 14:40:19 +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: resolve concurrency and DoS pitfalls from PR #272 review 2026-07-10 14:49:55 +08:00
test_config.py fix: default SDK retrieve_model to gpt-5.4 instead of following model 2026-07-16 16:09:07 +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 fix: enforce collection membership on cloud query doc_ids 2026-07-16 14:40:19 +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: empty-list scope, get_tree bool casing, md fence tracking; dedupe base URL 2026-07-10 11:17:20 +08:00
test_legacy_shims.py docs: correct stale config.yaml claims and CLI help default 2026-07-14 17:49:55 +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: harden indexing and query paths against malformed inputs 2026-07-16 06:20:36 +08:00
test_markdown_parser.py fix: empty-list scope, get_tree bool casing, md fence tracking; dedupe base URL 2026-07-10 11:17:20 +08:00
test_page_content.py fix: resolve concurrency and DoS pitfalls from PR #272 review 2026-07-10 14:49:55 +08:00
test_page_index.py Merge upstream/main into dev; port hardening into index/ 2026-07-17 18:11:14 +08:00
test_page_index_md.py Merge upstream/main into dev; port hardening into index/ 2026-07-17 18:11:14 +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: harden indexing and query paths against malformed inputs 2026-07-16 06:20:36 +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_review_fixes_3.py fix: address xhigh review findings for PR #272 2026-07-16 01:31:57 +08:00
test_review_fixes_4.py fix: harden indexing and query paths against malformed inputs 2026-07-16 06:20:36 +08:00
test_sqlite_storage.py fix: resolve concurrency and DoS pitfalls from PR #272 review 2026-07-10 14:49:55 +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