test(query): prove completion fields follow registry deletion (#1844) - #2040
Merged
Sinity merged 1 commit intoJun 17, 2026
Merged
Conversation
Add an explicit #1844 contract showing query-field completion candidates disappear when the shared expression registry entry is removed. This closes the last weak acceptance criterion around registry-backed completion being mechanically tied to source-of-truth metadata. Verification: nix develop --command devtools test tests/unit/cli/test_command_aux_runtime.py -k 'query_field_candidates'; nix develop --command devtools verify --quick.
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 the missing #1844 contract test that proves query-field completion candidates are mechanically sourced from
EXPRESSION_FIELD_REGISTRY: if a registry entry is removed, its completion candidate disappears.Problem
The issue acceptance criteria explicitly require proof that deleted/renamed query metadata disappears from completion automatically through the shared registry. Existing tests proved candidates were present and sourced from the registry, but not the disappearance behavior.
Solution
Adds a focused test that removes
repofromEXPRESSION_FIELD_REGISTRYwithmonkeypatch.delitem(...)and verifiesquery_field_candidates("re")no longer emits it.Verification
nix develop --command devtools test tests/unit/cli/test_command_aux_runtime.py -k 'query_field_candidates'— 3 passed.nix develop --command devtools verify --quick— exit_code 0.devtools verify --quickatd5ac86e6— exit_code 0.Closes #1844