Skip to content

Release: promote develop → main (donkey.last_call skeleton, #376–#378) - #382

Merged
tommasobolis merged 3 commits into
mainfrom
develop
Sep 15, 2026
Merged

tommasobolis merged 3 commits into
mainfrom
develop

Conversation

@tommasobolis

Copy link
Copy Markdown
Collaborator

Promotion of develop → main.

Included

Notes

Three skeleton/budget increments landing the donkey.last_call record and its
token-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 → main sync of the three PRs already merged and CI-green
on develop, not a milestone-completion release. All three passed the full
blocking matrix (base-only, typecheck-and-lint incl. mypy --strict + lint-imports,
test 3.10/3.11/3.12).

tommasobolis and others added 3 commits September 15, 2026 08:40
…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>
@tommasobolis
tommasobolis merged commit ffc9034 into main Sep 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant