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
{{ message }}
Repository navigation
Commit f55691e
Browse filesBrowse the repository at this point in the historyBrowse files
* release(0.13.1): drift-fixes — B1 check_v3 + B3 chain_end + M3 approximate_budget + B2 track_single docstring
Drift audit 2026-07-04 (docs/drift.md) found 4 BLOCKERs still active
in 0.13.0 SDK vs backend wire contract. All four closed:
* B1: Transport.check_v3 (drift B1) — was POSTing to /api/v1/check
(removed 2026-06-27, returns 410 Gone with replacement=/api/v1/gate).
Now delegates to Transport.check which targets /api/v1/gate and
forwards all v3 wire fields (chain_id, chain_op, idempotency_key,
stream). check() is the canonical entry; check_v3 is kept as a
v3-named alias for backward compat.
* B2: Transport.track_single docstring + test body — described
fictitious wire shape {execution_id, actual_cost_cents, api_key_id,
cost_source}. Real TrackRequestRaw is {workflow_id, tokens,
cost_cents, ...} (built by runtime._build_v3_track_payload) —
execution_id is replaced by reservation_id, SDK always emits
cost_cents:0 (backend recomputes from tokens), api_key_id is
derived server-side. Docstring + test now match real contract.
* B3: Transport.chain_end (drift B3) — was POSTing to /api/v1/chain/end
(never registered on backend). Now POSTs to /api/v1/gate with
chain_op: "end" (matches documented backend contract).
* M3: Transport.approximate_budget (drift M3) — was appending
?organization_id=<id>. Backend resolves org from X-API-Key /
Authorization header, does NOT accept query params. Method now
calls bare URL. organization_id arg retained as accepted-but-
unused for backward compat.
Tests touched (tests/test_v3_wire_contract.py):
* test_check_v3_includes_protocol_header — re-mocked /api/v1/gate
* test_check_v3_accepts_chain_context — re-mocked /api/v1/gate
* test_chain_end_includes_protocol_header — re-mocked /api/v1/gate
+ added chain_op=end check
* test_chain_end_sends_chain_id_in_body — re-mocked /api/v1/gate
+ added chain_op=end check
* test_track_single_includes_protocol_header — body matches real
wire shape
1037 lib tests pass (no regression). No SDK_MIN_VERSION bump —
wire format unchanged from caller's perspective; only URLs +
docstrings changed. Recommended upgrade path: 0.13.0 -> 0.13.1.
* chore(gitignore): exclude docs/postman/ collection exports
The Postman collection + environments were exported under docs/postman/
for ad-hoc local API exploration. They are working artifacts, not part
of the SDK source surface — keeping them on disk but out of VCS.
0 commit comments