test: add comprehensive Python integration regression suite - #55
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
apsw was dropped on main (PR #54); Python >=3.14 stdlib sqlite3 (SQLite 3.50.4) now provides loadable extensions and the required SQLite version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…functions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CI only triggered on pull_request and workflow_dispatch, so the default branch never populated the vcpkg binary cache. GitHub Actions caches are branch-scoped, so every PR started cold and recompiled all vcpkg deps from source (~20m on the Intel macOS runner). Add a push trigger on main so the cache is saved on the default branch and restorable by all PRs. Tighten the upload/publish job conditions to require workflow_dispatch so the new push trigger does not spawn empty publish jobs on every merge. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a comprehensive, behavior-characterizing Python integration test suite (stdlib
sqlite3) that locks down vectorlite's observable SQL behavior, so future changes (including larger refactors) cannot silently regress it. Test-only change — no C++ source modified.New test files under
bindings/python/vectorlite_py/test/(+92 tests; full suite now 112 passing):helpers.py/conftest.py— shared numpy reference helpers (brute_force_knn, per-space distance fns) and fixtures.test_scalar_functions.py—vector_distance(l2/ip/cosine) vs numpy,vector_to_json/vector_from_jsonround-trip + errors,vectorlite_info.test_vector_roundtrip.py— byte-exact f32 read-back, bf16/f16 dequant tolerances, cosine normalization.test_knn_query.py— exact-match nearest, full ordering vs brute force (ef≥N), distance column vs numpy, k/ef validation, rowid filters, multipleknn_search, unconstrained-scan rejection.test_ddl_options.py— all element types × spaces, hnsw option parsing, invalid options/syntax, hidden command columns.test_dml.py— update, duplicate rowid, delete, capacity limits,allow_replace_deletedsemantics, wrong-dim insert, large batch.test_persistence.py— save/load across types, overwrite, mismatch/missing-file errors, multi-table, file-backed reopen, rename, vacuum.Also includes the design spec and implementation plan under
docs/superpowers/.Determinism: all data uses fixed seeds; exact-ordering assertions use
random_seed+ef≥N; reference math matches the extension (L2 is squared, per hnswlib).Test Plan
PYTHONPATH=bindings/python python -m pytest bindings/python/vectorlite_py/test→ 112 passedbindings/python/vectorlite_py/test/anddocs/Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com