Repository navigation
Real testcontainers tests for ClickHouse (fixes top_k injection + reconnect) — #829 - #845
Merged
Merged
Conversation
…x reconnect (#844) Only MagicMock-tested, which hid two bugs found against a real clickhouse-server: top_k was interpolated into the LIMIT clause without validation, and search() returned [] after a reconnect (short-circuited on a local table-created flag). Cast top_k to a positive int (a non-int payload now raises ValueError before touching the DB) and check EXISTS TABLE in _search_sync, so a reconnected instance finds persisted rows. Adds real clickhouse-server testcontainers tests and removes the MagicMock test. (This store already offloaded via run_in_executor.) Part of #829. Closes #844.
Closed
18 of 19 tasks
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
Next in epic #829: ClickHouse. The store already offloaded via
run_in_executor(async fine), but real testing (#844) found two bugs.Bugs found & fixed
top_kSQL-interpolated intoLIMITunvalidated — now cast to a positive int; a payload like"5; DROP TABLE ..."raisesValueErrorbefore hitting the DB.search()returned[]on a fresh instance; now_search_syncchecksEXISTS TABLE.Verification (real data)
8/8 pass against real
clickhouse-server: realL2Distanceranking, metadata filter, top_k, reconnect persistence, injection rejection, async contract. Wired into the CIintegrationjob.Part of #829.