Skip to content

update pyenvector 1.5.x#13

Open
euphoria0-0 wants to merge 8 commits into
mainfrom
feat/update-1.5
Open

update pyenvector 1.5.x#13
euphoria0-0 wants to merge 8 commits into
mainfrom
feat/update-1.5

Conversation

@euphoria0-0

@euphoria0-0 euphoria0-0 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #12 — updates the integration to pyenvector 1.5.0 and exposes the new SDK capabilities. Branched from feat/update-1.4, so this PR includes the 1.4.x commits; once this lands, #12 can be closed.

pyenvector 1.5.0 integration

  • Partitions: partition_name on add_texts / add_documents / delete, partition_names on all similarity-search variants, plus create_partition / drop_partition / list_partitions helpers on Envector.
  • Metadata update: new Envector.update_metadata(ids, texts, metadatas) and update_documents(ids, documents) — wholesale replacement of the stored {"text", "metadata"} envelope by item ID via the SDK's Index.update_metadata. Vectors are untouched.
  • KMS connection: ConnectionConfig gains kms_address / kms_secure / kms_ca_cert; when set, the client calls init_kms_connect() after init_connect() (shares the indexer auth session). Keys are then KMS-managed — omit KeyConfig.key_path.
  • pyenvector>=1.5.0 in pyproject.toml.
  • IndexSettings.metadata_encryption type fixed to Optional[bool] to match the SDK.
  • README: partitions + metadata-update examples, KMS config note, limitations updated ("item-level updates unsupported" → vector updates only).

Tests

  • FakeIndex extended with partition capture, update_metadata, and partition management.
  • 8 new unit tests covering partition pass-through (insert/search/delete), metadata update packing/validation, update_documents delegation, and partition helpers.

python -m pytest -q -m "not integration" → 31 passed.

e2e 검증 & 후속 수정 (2026-07-24)

1.5.0 서버 스택(KMS no-TLS 포함)에서 e2e 검증 후 4건 수정:

  • secure/kms_secure 기본값을 None으로 변경 — SDK 기본 규칙(토큰 있을 때만 TLS)에 위임. 기존 True 고정값은 no-TLS 로컬 접속을 깨서 test_e2e가 접속 단계에서 실패했음
  • cipher 쿼리 e2e 레그 제거 — pyenvector 1.5.x는 query encryption을 전 preset/eval_mode 조합에서 미지원(mm32/mms32는 evi NotSupportedError, mm은 SDK가 거부). README 예시도 plain으로 정정
  • KMS-managed 키 배선 수정 — KeyConfig.key_path를 Optional로 바꾸고 kms_address 설정 시 init_index_config에 key_path를 넘기지 않음(SDK의 KMS-managed 모드 조건). 수정 전에는 KMS 키 생성까지 되고도 로컬 EncKey.json을 찾다 인덱스 생성이 실패했음
  • fresh 인덱스에서 delete/update_metadata 시 "Index not loaded" 에러 수정 — 호출 전 Index.load() 보장 (표준 test_delete_missing_content 실패 원인)

검증(1.5.0 스택 + PyPI pyenvector 1.5.0): 유닛 31 passed · test_e2e.py(plain) passed · langchain 표준 스위트 3 passed/16 skipped/6 xpassed · KMS-managed insert→search→delete e2e OK · 파티션/metadata-update e2e OK

Known follow-ups:

  • 표준 테스트 xfail 오버라이드 6건이 실제로는 xpass(능력 과소 선언) — fresh index에서 서버 할당 ID가 요청 ID와 우연히 일치했을 가능성 포함해 재검토 필요
  • partition_names 미지정 검색은 _default 파티션만 탐색함 — README 문구("searches the whole index")와 실측 동작 불일치

@euphoria0-0 euphoria0-0 self-assigned this Jul 23, 2026
@euphoria0-0
euphoria0-0 marked this pull request as ready for review July 24, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant