free-claude-code/core
Ali Khokhar e2fa4b66d9
Some checks are pending
CI / Ban type ignore suppressions (push) Waiting to run
CI / pytest (push) Waiting to run
CI / ruff-check (push) Waiting to run
CI / ruff-format (push) Waiting to run
CI / ty (push) Waiting to run
Extract shared stream recovery session for provider transports (#835)
## Summary

- Add `StreamRecoverySession` in
`core/anthropic/stream_recovery_session.py` to centralize early-retry
classification, holdback buffering, retry counting, and flush/discard
behavior shared by Anthropic and OpenAI transports.
- Refactor `AnthropicMessagesTransport` and `OpenAIChatTransport` to use
the shared session instead of duplicating recovery holdback and
early-retry logic.
- Update architecture docs and tests for per-delta overlap trim on
midstream recovery; bump version to 2.2.1.

## Test plan

- [x] `uv run pytest tests/core/anthropic/test_stream_recovery.py`
- [x] `uv run pytest tests/providers/test_anthropic_messages.py
tests/providers/test_streaming_errors.py`
2026-06-16 22:01:53 -07:00
..
anthropic Extract shared stream recovery session for provider transports (#835) 2026-06-16 22:01:53 -07:00
openai_responses Fix Codex responses reasoning bridge 2026-06-16 18:05:15 -07:00
__init__.py Architecture refactor: core anthropic, runtime, smoke tiers, remove providers.common 2026-04-24 20:03:14 -07:00
rate_limit.py Major refactor: API, providers, messaging, and Anthropic protocol 2026-04-26 03:01:14 -07:00
trace.py feat(logging): structured TRACE events and end-to-end request correlation 2026-05-10 18:24:48 -07:00