Skip to content

Commit 022121c

Browse files
Trecekclaude
andcommitted
test: replace tautological meta-test assertion with non-tautological checks
The assertion compared set(BACKEND_REGISTRY.keys()) to itself, making it always pass. Replace with a minimum count guard (>= 2) and an expected-set equality check against {"claude-code", "codex"} so the test actually detects registry shrinkage or unexpected additions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5e2451f commit 022121c

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

tests/arch/test_cross_registry_dispatch_sufficiency.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,14 @@ def test_test_matrix_covers_all_registered_backends() -> None:
7878
7979
Prevents silent matrix shrinkage if a backend is removed from parametrization.
8080
"""
81-
test_backends = set(BACKEND_REGISTRY.keys())
82-
assert test_backends == set(BACKEND_REGISTRY.keys()), (
83-
f"Test matrix drift: backends in matrix {sorted(test_backends)} != "
84-
f"BACKEND_REGISTRY keys {sorted(BACKEND_REGISTRY.keys())}"
81+
expected = {"claude-code", "codex"}
82+
actual = set(BACKEND_REGISTRY.keys())
83+
assert len(actual) >= 2, (
84+
f"BACKEND_REGISTRY has only {len(actual)} backend(s) — "
85+
f"expected at least 2 (claude-code + codex). If a backend was removed, "
86+
f"update this lower bound."
87+
)
88+
assert actual == expected, (
89+
f"BACKEND_REGISTRY keys {sorted(actual)} != expected {sorted(expected)}. "
90+
f"Update the expected set in this meta-test when backends are added or removed."
8591
)

0 commit comments

Comments
 (0)