PageIndex/tests
mountain 6a73279c0c fix: patch three critical defects from the SDK review
- local delete_collection: validate the collection name before rmtree.
  An unvalidated name like "../.." escaped files_dir and deleted
  arbitrary directories (path traversal).

- legacy page_index(): restore the node_id/summary/text/description
  enhancements. IndexConfig now carries booleans (pydantic coerces the
  legacy 'yes'/'no' strings at the boundary), but page_index_main still
  compared `opt.if_add_node_id == 'yes'` — always False — so every
  enhancement was silently skipped for legacy-API callers. Conditions
  now branch on the booleans, matching pageindex/index/page_index.py.

- LegacyCloudAPI._request: bound every request with a timeout
  (30s, 120s read timeout for streamed responses) so a dead connection
  can't hang legacy submit/poll/chat callers forever. The legacy
  contract tests pinned the missing timeout; updated to pin its
  presence instead.

Adds regression tests: path-traversal rejection, 'yes'/'no' -> bool
coercion, and timeout assertions.

Claude-Session: https://claude.ai/code/session_01Kx5DgKbhK1N8autqXH8SmS
2026-07-07 10:05:38 +08:00
..
test_agent.py feat(collection): doc_ids accepts str|list, design cleanups 2026-05-15 17:03:17 +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 fix(cloud): align cloud/local backend contracts and harden the HTTP layer 2026-07-07 09:40:09 +08:00
test_collection.py feat(collection): doc_ids accepts str|list, design cleanups 2026-05-15 17:03:17 +08:00
test_config.py fix: patch three critical defects from the SDK review 2026-07-07 10:05:38 +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_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_legacy_sdk_contract.py fix: patch three critical defects from the SDK review 2026-07-07 10:05:38 +08:00
test_legacy_utils_contract.py feat:compatible with Pageindex SDK (#238) 2026-05-11 21:06:23 +08:00
test_local_backend.py fix: patch three critical defects from the SDK review 2026-07-07 10:05:38 +08:00
test_markdown_parser.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
test_pdf_parser.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
test_pipeline.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
test_sqlite_storage.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +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