vomebook commited on
Commit ·
4cdaec2
1
Parent(s): 4c52a62
Group backend proxy ownership contracts
Browse files- quality/mutation-reviews/mutation-equivalent-mutation-gate.json +1 -1
- scripts/check_search_words_mutation.py +1 -1
- tests/proxy/README.txt +13 -0
- tests/proxy/__init__.py +1 -0
- tests/{test_proxy_ownership.py → proxy/test_proxy_ownership.py} +0 -0
- tests/{test_proxy_streams_contract.py → proxy/test_proxy_streams_contract.py} +0 -0
- tests/test_mutation_gate_main.py +1 -1
- tests/test_quality_inventory.py +1 -1
quality/mutation-reviews/mutation-equivalent-mutation-gate.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"tool": "mutmut 3.8.1",
|
| 3 |
"source": "scripts/check_search_words_mutation.py",
|
| 4 |
-
"source_sha256": "
|
| 5 |
"scope": "Only ordinary built-in dicts with built-in string keys and integer values, without concurrent mutation, dict subclasses, tracing, introspection, or monkeypatching. Comparison is the return value and exceptions of mutation_errors. The initial required-field validation is executed unchanged. These survivors remain survivors, not killed.",
|
| 6 |
"equivalent": {
|
| 7 |
"scripts.check_search_words_mutation.x_mutation_errors__mutmut_22": {
|
|
|
|
| 1 |
{
|
| 2 |
"tool": "mutmut 3.8.1",
|
| 3 |
"source": "scripts/check_search_words_mutation.py",
|
| 4 |
+
"source_sha256": "fefe4fd5ddbceb3bf2565b55ba1b52a80e39d4ea043486cf981f127df413171c",
|
| 5 |
"scope": "Only ordinary built-in dicts with built-in string keys and integer values, without concurrent mutation, dict subclasses, tracing, introspection, or monkeypatching. Comparison is the return value and exceptions of mutation_errors. The initial required-field validation is executed unchanged. These survivors remain survivors, not killed.",
|
| 6 |
"equivalent": {
|
| 7 |
"scripts.check_search_words_mutation.x_mutation_errors__mutmut_22": {
|
scripts/check_search_words_mutation.py
CHANGED
|
@@ -68,7 +68,7 @@ SPECS: dict[str, tuple[str, list[str], list[str]]] = {
|
|
| 68 |
"search_execution": ("search/backend/test_search_execution.py", EXECUTION_TESTS, []),
|
| 69 |
"record_metadata": ("search/backend/test_record_metadata_contract.py", [], []),
|
| 70 |
"search_filters": ("search/backend/test_search_filters_mutation_contract.py", [], []),
|
| 71 |
-
"proxy_streams": ("test_proxy_streams_contract.py", [], []),
|
| 72 |
"folder_tree": ("search/backend/test_folder_tree_mutation_contract.py", [], []),
|
| 73 |
"search_projection": ("search/backend/test_search_projection_mutation_contract.py", [], []),
|
| 74 |
"search_candidates": ("search/backend/test_search_candidates_mutation_contract.py", [], ["search_indexes.py"]),
|
|
|
|
| 68 |
"search_execution": ("search/backend/test_search_execution.py", EXECUTION_TESTS, []),
|
| 69 |
"record_metadata": ("search/backend/test_record_metadata_contract.py", [], []),
|
| 70 |
"search_filters": ("search/backend/test_search_filters_mutation_contract.py", [], []),
|
| 71 |
+
"proxy_streams": ("proxy/test_proxy_streams_contract.py", [], []),
|
| 72 |
"folder_tree": ("search/backend/test_folder_tree_mutation_contract.py", [], []),
|
| 73 |
"search_projection": ("search/backend/test_search_projection_mutation_contract.py", [], []),
|
| 74 |
"search_candidates": ("search/backend/test_search_candidates_mutation_contract.py", [], ["search_indexes.py"]),
|
tests/proxy/README.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Backend proxy ownership contracts
|
| 2 |
+
=================================
|
| 3 |
+
|
| 4 |
+
From the repository root:
|
| 5 |
+
|
| 6 |
+
python -B -m unittest -v tests.proxy.test_proxy_streams_contract tests.proxy.test_proxy_ownership
|
| 7 |
+
python -B scripts/check_search_words_mutation.py --module proxy_streams
|
| 8 |
+
|
| 9 |
+
The mutation gate covers the generated inventory for backend/proxy_streams.py
|
| 10 |
+
using the original isolated contract and its scoped, hash-bound survivor review.
|
| 11 |
+
The ownership integration tests remain in both backend coverage and the upstream
|
| 12 |
+
responsiveness suite; tests.test_async_proxy retains the shared fake helpers.
|
| 13 |
+
This directory does not represent coverage of the whole proxy or site.
|
tests/proxy/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"""Backend proxy contracts and integration tests."""
|
tests/{test_proxy_ownership.py → proxy/test_proxy_ownership.py}
RENAMED
|
File without changes
|
tests/{test_proxy_streams_contract.py → proxy/test_proxy_streams_contract.py}
RENAMED
|
File without changes
|
tests/test_mutation_gate_main.py
CHANGED
|
@@ -298,7 +298,7 @@ class MutationGateMainTests(unittest.TestCase):
|
|
| 298 |
def test_full_selected_and_native_contracts_and_dependencies_are_copied(self):
|
| 299 |
for module in ('search_words', 'search_matching', 'search_execution', 'search_indexes', 'reader_identity',
|
| 300 |
'search_projection', 'search_candidates', 'search_bootstrap', 'search_filters', 'folder_tree',
|
| 301 |
-
'cache_core', 'record_metadata', 'reader_index'):
|
| 302 |
with self.subTest(module=module):
|
| 303 |
self.prepare_module(module)
|
| 304 |
self.calls.clear()
|
|
|
|
| 298 |
def test_full_selected_and_native_contracts_and_dependencies_are_copied(self):
|
| 299 |
for module in ('search_words', 'search_matching', 'search_execution', 'search_indexes', 'reader_identity',
|
| 300 |
'search_projection', 'search_candidates', 'search_bootstrap', 'search_filters', 'folder_tree',
|
| 301 |
+
'cache_core', 'record_metadata', 'reader_index', 'proxy_streams'):
|
| 302 |
with self.subTest(module=module):
|
| 303 |
self.prepare_module(module)
|
| 304 |
self.calls.clear()
|
tests/test_quality_inventory.py
CHANGED
|
@@ -1147,7 +1147,7 @@ class Example:
|
|
| 1147 |
self.assertEqual(outcomes, {"killed": 1, "survived": 0, "timeout": -24, "unrun": None})
|
| 1148 |
|
| 1149 |
def test_proxy_mutation_gate_includes_entire_contract_and_hash_bound_reviews(self):
|
| 1150 |
-
self.assertEqual(SPECS["proxy_streams"], ("test_proxy_streams_contract.py", [], []))
|
| 1151 |
root = Path(__file__).resolve().parents[1]
|
| 1152 |
review = json.loads((root / "quality/mutation-reviews/mutation-equivalent-proxy-streams.json").read_text())
|
| 1153 |
self.assertEqual(review["tool"], "mutmut 3.8.1")
|
|
|
|
| 1147 |
self.assertEqual(outcomes, {"killed": 1, "survived": 0, "timeout": -24, "unrun": None})
|
| 1148 |
|
| 1149 |
def test_proxy_mutation_gate_includes_entire_contract_and_hash_bound_reviews(self):
|
| 1150 |
+
self.assertEqual(SPECS["proxy_streams"], ("proxy/test_proxy_streams_contract.py", [], []))
|
| 1151 |
root = Path(__file__).resolve().parents[1]
|
| 1152 |
review = json.loads((root / "quality/mutation-reviews/mutation-equivalent-proxy-streams.json").read_text())
|
| 1153 |
self.assertEqual(review["tool"], "mutmut 3.8.1")
|