Skip to content

Commit c905fe4

Browse files
Enforce wait-for-job helper primitive boundary
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 37041b2 commit c905fe4

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ This runs lint, format checks, compile checks, tests, and package build.
9999
- `tests/test_extract_payload_helper_usage.py` (extract start-payload helper usage enforcement),
100100
- `tests/test_guardrail_ast_utils.py` (shared AST guard utility contract),
101101
- `tests/test_job_pagination_helper_usage.py` (shared scrape/crawl pagination helper usage enforcement),
102+
- `tests/test_job_wait_helper_boundary.py` (centralization boundary enforcement for wait-for-job helper primitives),
102103
- `tests/test_job_wait_helper_usage.py` (shared wait-for-job defaults helper usage enforcement),
103104
- `tests/test_makefile_quality_targets.py` (Makefile quality-gate target enforcement),
104105
- `tests/test_manager_model_dump_usage.py` (manager serialization centralization),

tests/test_architecture_marker_usage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"tests/test_extract_payload_helper_usage.py",
4040
"tests/test_examples_naming_convention.py",
4141
"tests/test_job_pagination_helper_usage.py",
42+
"tests/test_job_wait_helper_boundary.py",
4243
"tests/test_job_wait_helper_usage.py",
4344
"tests/test_example_sync_async_parity.py",
4445
"tests/test_example_run_instructions.py",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from pathlib import Path
2+
3+
import pytest
4+
5+
pytestmark = pytest.mark.architecture
6+
7+
8+
MANAGERS_DIR = Path("hyperbrowser/client/managers")
9+
10+
11+
def test_wait_for_job_result_primitives_are_centralized():
12+
violating_modules: list[str] = []
13+
for module_path in sorted(MANAGERS_DIR.rglob("*.py")):
14+
if module_path.name in {"__init__.py", "job_wait_utils.py"}:
15+
continue
16+
module_text = module_path.read_text(encoding="utf-8")
17+
if "wait_for_job_result(" in module_text or "wait_for_job_result_async(" in module_text:
18+
violating_modules.append(module_path.as_posix())
19+
20+
assert violating_modules == []

0 commit comments

Comments
 (0)