Repository navigation
Release: promote develop → main (donkey.last_call skeleton, #376–#378) - #382
Merged
Merged
Conversation
…362) (#376) Close the identity asymmetry: on a refusal, DonkeyError already hands the gateway's ids; on a 200 the same information was thrown on the floor. Add one named container, LastCall, populated on every governed model call from the LIVE-VERIFIED §3 response headers and reachable at donkey.last_call. - core/lastcall.py: the LastCall record + LastCallStatus (OBSERVED / UNOBSERVED / UNAVAILABLE), parses x-request-id and x-envoy-decorator-operation (api-instance-<id>.<env>.svc → api_instance_id + environment_id). Unparseable or absent headers leave fields None and never raise (§0.3). Contextvar-scoped, not instance-scoped (hazard #2), matching core.telemetry's correlation id. #307/#309 add their field groups to this same type, no new parent. - transport.py: both async and blocking _on_response observe the record on a model call only (gated on _request_model, the same signal that opens a span), so token fetches / registry GETs sharing the transport do not clobber it. - donkey.py: donkey.last_call passes through an OBSERVED record; else derives UNAVAILABLE (naming the surface) when every resolved adapter is non-observing, else UNOBSERVED — the three honest states, never a bare None (hazard #3). - integrations: Adapter.observes_last_call flag; False on adk/crewai (LiteLLM owns the transport) and llamaindex/agent_framework (default_headers only). - simulator/fixtures.py: keep x-envoy-decorator-operation in the replay allow-list, so simulate()/donkey mock populate the record from the fixtures. - tests/conformance: gateway_identity_observed scenario + asserted exemptions mirroring §8.1 correlation_id_propagated; a test pins the exemption set to the observes_last_call=False adapters so table and code cannot drift. - docs/verified-apis.md §3: note what x-envoy-decorator-operation is parsed into. The response x-correlation-id is deliberately NOT parsed into the record yet — whether it echoes the client-sent id is unconfirmed (#300, hazard #1). Closes #362 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotion of
develop→main.Included
donkey.last_calllast_callNotes
Three skeleton/budget increments landing the
donkey.last_callrecord and itstoken-accounting + gateway routing surface. No breaking changes. No new
blocked/verified surfaces (§0.3) and no extras changes (§8.4).
Partial promotion: no milestone reaches 0 open issues with this set — this is a
requested
develop→mainsync of the three PRs already merged and CI-greenon
develop, not a milestone-completion release. All three passed the fullblocking matrix (base-only, typecheck-and-lint incl. mypy --strict + lint-imports,
test 3.10/3.11/3.12).