File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ jobs:
171171 - name : Build and install wheel
172172 run : |
173173 python -m pip install --upgrade pip build
174+ python scripts/bundle_schemas.py
174175 python -m build --wheel --outdir dist/
175176 pip install dist/*.whl
176177
Original file line number Diff line number Diff line change 9595 python -m pip install --upgrade pip
9696 pip install build twine
9797
98+ - name : Bundle schemas
99+ if : ${{ steps.release.outputs.release_created == 'true' || (github.event_name == 'workflow_dispatch' && inputs.publish == true) }}
100+ run : python scripts/bundle_schemas.py
101+
98102 - name : Build package
99103 if : ${{ steps.release.outputs.release_created == 'true' || (github.event_name == 'workflow_dispatch' && inputs.publish == true) }}
100104 run : python -m build
Original file line number Diff line number Diff line change @@ -188,7 +188,8 @@ def _ensure_state(version: str | None = None) -> _LoaderState | None:
188188 return None
189189 root = _resolve_schema_root (bundle_key )
190190 if root is None :
191- logger .debug (
191+ log_missing = logger .warning if version is None else logger .debug
192+ log_missing (
192193 "AdCP schemas not found for bundle_key=%s; validation will skip "
193194 "all tools for this version" ,
194195 bundle_key ,
Original file line number Diff line number Diff line change 1111from __future__ import annotations
1212
1313import json
14+ import logging
1415import shutil
1516from pathlib import Path
1617
@@ -190,6 +191,38 @@ def test_validate_request_unknown_version_skips_safely(
190191 assert outcome .issues == []
191192
192193
194+ def test_missing_sdk_pinned_bundle_warns (
195+ monkeypatch : pytest .MonkeyPatch , caplog : pytest .LogCaptureFixture
196+ ) -> None :
197+ monkeypatch .setattr (_loader_mod , "_resolve_schema_root" , lambda bundle_key = None : None )
198+
199+ _reset_for_tests ()
200+ try :
201+ with caplog .at_level (logging .WARNING , logger = "adcp.validation.schema_loader" ):
202+ outcome = validate_request ("synthetic_tool" , {"x" : 1 })
203+ finally :
204+ _reset_for_tests ()
205+
206+ assert outcome .valid
207+ assert any ("AdCP schemas not found" in rec .message for rec in caplog .records )
208+
209+
210+ def test_missing_explicit_version_bundle_does_not_warn (
211+ monkeypatch : pytest .MonkeyPatch , caplog : pytest .LogCaptureFixture
212+ ) -> None :
213+ monkeypatch .setattr (_loader_mod , "_resolve_schema_root" , lambda bundle_key = None : None )
214+
215+ _reset_for_tests ()
216+ try :
217+ with caplog .at_level (logging .WARNING , logger = "adcp.validation.schema_loader" ):
218+ outcome = validate_request ("synthetic_tool" , {"x" : 1 }, version = "9.9.9" )
219+ finally :
220+ _reset_for_tests ()
221+
222+ assert outcome .valid
223+ assert not any ("AdCP schemas not found" in rec .message for rec in caplog .records )
224+
225+
193226def test_validate_response_threads_version_through (
194227 synthetic_legacy_bundle : tuple [str , Path ],
195228) -> None :
You can’t perform that action at this time.
0 commit comments