PageIndex/tests
mountain b3616f76a2 fix: dedup race, cwd-relative image paths, unencoded legacy URLs
- SQLite dedup race: add UNIQUE(collection_name, file_hash) and switch
  save_document to a plain INSERT. add_document now catches the
  IntegrityError from a concurrent add of the same content, cleans up its
  managed files, and returns the winning doc_id — instead of two doc_ids
  for one file (each having paid for its own LLM indexing).

- PDF image paths: store the absolute path to each extracted image
  instead of a path relative to the indexing process's cwd. The
  ![image](...) references broke as soon as a query ran from a different
  directory.

- LegacyCloudAPI: URL-encode doc_id / retrieval_id path segments (added
  _enc()), matching CloudBackend. An id containing '/', '?', '#' or a
  space previously hit the wrong endpoint or produced a malformed URL.

Adds regression tests: UNIQUE enforcement, the add-race resolving to the
winner, absolute image paths, and encoded legacy URLs.

Claude-Session: https://claude.ai/code/session_01Kx5DgKbhK1N8autqXH8SmS
2026-07-07 12:06:58 +08:00
..
test_agent.py fix: resolve five P1 defects from the SDK review 2026-07-07 10:12:51 +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: six P2 correctness/robustness cleanups from the SDK review 2026-07-07 11:34:13 +08:00
test_collection.py fix: six P2 correctness/robustness cleanups from the SDK review 2026-07-07 11:34:13 +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: dedup race, cwd-relative image paths, unencoded legacy URLs 2026-07-07 12:06:58 +08:00
test_legacy_shims.py refactor(index): dedupe the copied indexing pipeline behind deprecation shims 2026-07-07 10:42:23 +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: dedup race, cwd-relative image paths, unencoded legacy URLs 2026-07-07 12:06:58 +08:00
test_markdown_parser.py fix: resolve five P1 defects from the SDK review 2026-07-07 10:12:51 +08:00
test_pdf_parser.py fix: dedup race, cwd-relative image paths, unencoded legacy URLs 2026-07-07 12:06: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 fix: dedup race, cwd-relative image paths, unencoded legacy URLs 2026-07-07 12:06: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