Skip to content

test(query): prove completion fields follow registry deletion (#1844) - #2040

Merged
Sinity merged 1 commit into
masterfrom
feature/test/completion-registry-disappearance-1844
Jun 17, 2026
Merged

test(query): prove completion fields follow registry deletion (#1844)#2040
Sinity merged 1 commit into
masterfrom
feature/test/completion-registry-disappearance-1844

Conversation

@Sinity

@Sinity Sinity commented Jun 17, 2026

Copy link
Copy Markdown
Owner

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 repo from EXPRESSION_FIELD_REGISTRY with monkeypatch.delitem(...) and verifies query_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.
  • Push hook reran devtools verify --quick at d5ac86e6 — exit_code 0.

Closes #1844

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.
@Sinity
Sinity merged commit bdbdfd9 into master Jun 17, 2026
10 checks passed
@Sinity
Sinity deleted the feature/test/completion-registry-disappearance-1844 branch June 17, 2026 09:39
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.

Build completion on shared query grammar

1 participant