You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(adcp): support ADCP_BASE_URL env override in sync_schemas.py (#285)
* feat(adcp): support ADCP_BASE_URL env override in sync_schemas.py
Matches the JS SDK pattern so cross-SDK CI can set ADCP_BASE_URL once
to point both clients at a fixture CDN or pre-release bundle server.
Trailing slashes on the env var value are stripped to prevent a doubled
/protocol path segment. Adds a print when the override is active.
Closes#284https://claude.ai/code/session_01KXfYPHYKr3R6EDqUbbo9ty
* fix(test): guard test_default_value against ADCP_BASE_URL in env; use ! sigil
test_default_value was relying on the already-loaded _mod which bakes in
whatever ADCP_BASE_URL was when pytest started — exactly the CI case this
feature enables. Switched to the same fresh-module-load pattern the other
two env-override tests already use, with monkeypatch.delenv to guarantee
the default code path. Also align the override print line with the
established ! sigil convention.
https://claude.ai/code/session_01KXfYPHYKr3R6EDqUbbo9ty
* feat(adcp): reject ADCP_BASE_URL values ending in /protocol
Acting on python-expert review of this PR:
The script appends '/protocol' itself, so an override like
'https://fixture.example.com/protocol' would silently produce
'/protocol/protocol' and 404 against any sensible CDN. Convert that
into a loud ValueError at module import so the typo surfaces
immediately rather than during the fetch.
Two new tests cover the failure mode (suffix + suffix-with-trailing-
slash). The existing trailing-slash-strip test still covers the
common case where users add an accidental trailing slash on the host
itself.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments