Skip to content

Conversation

@jairad26
Copy link
Contributor

@jairad26 jairad26 commented Nov 6, 2025

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • Adds prop tests to distributed & local chroma for e2e create_collection and get_collection flow to ensure all reconciliation logic for vector index config, and schema index configs for inverted indexes on metadata keys & sparse vector indexes are created with the correct parameters
  • New functionality
    • ...

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Migration plan

Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?

Observability plan

What is the plan to instrument and monitor this change?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

jairad26 commented Nov 6, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jairad26 jairad26 force-pushed the jai/schema-prop-tests branch from 394633e to 801ec5a Compare November 6, 2025 18:00
@jairad26 jairad26 force-pushed the jai/fix-default-path-reconcile branch from 061ee06 to fe04c8f Compare November 6, 2025 18:00
@jairad26 jairad26 marked this pull request as ready for review November 6, 2025 18:01
@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Nov 6, 2025

Add property-based tests for schema & vector-index reconciliation logic

Introduces extensive Hypothesis‐driven tests that exercise create_collection / get_collection paths for both local and distributed modes. The new tests randomly generate combinations of collection metadata, configuration blocks (HNSW, SPANN, embedding function, etc.) and user-defined schema objects, then assert that the resulting collection configuration and persisted schema match the expected reconciliation logic. Supporting strategies were expanded to create realistic Schema, VectorIndexConfig, SparseVectorIndexConfig, metadata with HNSW keys, and mutually-exclusive configuration permutations.

Key Changes

• Added chromadb/test/property/test_schema.py (~760 LOC) containing two property tests (test_vector_index_configuration_create_collection, test_schema_create_and_get_collection) plus many helper assertion/util functions.
• Greatly extended chromadb/test/property/strategies.py (+380 LOC): new Hypothesis strategies for vector/sparse index configs, schema generation, metadata/configuration combinations, helper conversions (vector_index_to_dict, non_none_items), and a registered SimpleIpEmbeddingFunction subclass.
• Introduced dataclass CollectionInputCombination for bundling generated inputs and added helper functions to translate index configs to comparable dicts.
• Minor fixups to existing strategy code (added trailing commas, safe casting, updated sampling dictionaries) and small corrections to SPANN config examples.

Affected Areas

• Python test suite
chromadb/test/property/test_schema.py
chromadb/test/property/strategies.py

This summary was automatically generated by @propel-code-bot

@jairad26 jairad26 changed the title [TST] add schema proptest [TST] add schema proptest to python Nov 6, 2025
@jairad26 jairad26 force-pushed the jai/schema-prop-tests branch from 801ec5a to 46bddae Compare November 6, 2025 18:25
@jairad26 jairad26 force-pushed the jai/schema-prop-tests branch from 46bddae to 148fe32 Compare November 7, 2025 19:26
@jairad26 jairad26 force-pushed the jai/fix-default-path-reconcile branch from fe04c8f to db3b74e Compare November 7, 2025 19:26
@blacksmith-sh
Copy link
Contributor

blacksmith-sh bot commented Nov 7, 2025

Found 4 test failures on Blacksmith runners:

Test View Logs
worker/compactor::compaction_manager::tests::test_compaction_manager View Logs
worker/
execution::functions::statistics::tests::test_k8s_integration_statistics_function
View Logs
worker/execution::orchestration::compact::tests::test_rebuild View Logs
worker/execution::orchestration::compact::tests::test_rebuild_empty_filepath View Logs


Fix in Cursor

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.

2 participants