Skip to content

Commit 87c0eba

Browse files
Add architecture guard for shared schema injection helper
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 714d044 commit 87c0eba

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ This runs lint, format checks, compile checks, tests, and package build.
109109
- `tests/test_polling_loop_usage.py` (`while True` polling-loop centralization in `hyperbrowser/client/polling.py`),
110110
- `tests/test_pyproject_architecture_marker.py` (pytest marker registration enforcement),
111111
- `tests/test_readme_examples_listing.py` (README example-listing consistency enforcement),
112+
- `tests/test_schema_injection_helper_usage.py` (shared schema injection helper usage enforcement in payload builders),
112113
- `tests/test_session_profile_update_helper_usage.py` (session profile-update parameter helper usage enforcement),
113114
- `tests/test_session_upload_helper_usage.py` (session upload-input normalization helper usage enforcement),
114115
- `tests/test_start_job_context_helper_usage.py` (shared started-job context helper usage enforcement),

‎tests/test_architecture_marker_usage.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"tests/test_example_sync_async_parity.py",
4242
"tests/test_example_run_instructions.py",
4343
"tests/test_computer_action_endpoint_helper_usage.py",
44+
"tests/test_schema_injection_helper_usage.py",
4445
"tests/test_session_profile_update_helper_usage.py",
4546
"tests/test_session_upload_helper_usage.py",
4647
"tests/test_start_job_context_helper_usage.py",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from pathlib import Path
2+
3+
import pytest
4+
5+
pytestmark = pytest.mark.architecture
6+
7+
8+
MODULES = (
9+
"hyperbrowser/client/managers/browser_use_payload_utils.py",
10+
"hyperbrowser/client/managers/extract_payload_utils.py",
11+
)
12+
13+
14+
def test_payload_utils_use_shared_schema_injection_helper():
15+
for module_path in MODULES:
16+
module_text = Path(module_path).read_text(encoding="utf-8")
17+
assert "inject_resolved_schema(" in module_text
18+
assert "resolve_schema_input(" not in module_text

0 commit comments

Comments
 (0)