Make the Guardiann test helpers reusable as test fixtures - #4677
Draft
normen662 wants to merge 1 commit into
Conversation
Move the Guardiann test helpers (`TestHelpers`, now `GuardiannTestHelpers`) and `ConfigRecommendation` into the fdb-extensions test fixtures, and lift the reusable parts of `SiftTest` into static helpers there: the interleaved churn and shuffled delete schedules, and the "only these primary keys remain" and "drained to a single empty cluster" structure checks. The dynamic recall check takes the metric of its brute-force ground truth, and the recall checks accept any searcher. `SiftTest` keeps its tests and loops, which now use these helpers; its behavior is unchanged.
normen662
added this pull request to stack #4679
September 27, 2026 10:47
This branch has not been deployed
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.
Moves the reusable Guardiann test code into the
fdb-extensionstest fixtures, so that it is published with them (see #4676) and can be reused outside this build. Existing tests use the moved code; their behavior is unchanged.guardiann/TestHelpersbecomes the publicGuardiannTestHelpersfixture (batch insert/delete, sampling, recall and ordered-by-distance checks, the test listeners).countUnderReplicatedPrimariesmoves into its only user,ReassignConvergenceTest.ConfigRecommendationmoves into the fixtures and becomes public.EUCLIDEAN_SQUARE_METRIC, which computes exactly the previousl2SquaredDistance), and the recall checks accept any searcher (BiFunction<RealVector, Integer, List<Tuple>>); theGuardiannoverloads delegate to them.SiftTestbecome static helpers:interleavedChurnScheduleandshuffledDeleteBatches(the insert/delete schedules, with the same use of the random generator as before), and theassertOnlyPrimaryKeysRemain,assertDrainedToSingleEmptyClusteranddescribeStructurestructure checks inGuardiannStructureAsserts.SiftTestkeeps its tests and loops, which now use them.Verified:
:fdb-extensions:checkpasses (includingscalarFallbackTest); the recall, quality and checkpoint log lines of all sixSiftTesttests (CI and-Ptests.nightlyvariants) are byte-identical tomainfor the same seed.