Slice 2: Cap session._client._transport encapsulation leak #38

Closed
opened 2026-06-05 18:10:58 +02:00 by AlexKucera · 1 comment
AlexKucera commented 2026-06-05 18:10:58 +02:00 (Migrated from github.com)

Parent

#36 — PRD-003: Deepen Codebase Architecture

What to build

Add a public transport property to LibroFmSession that returns self._client._transport, then update the one call site in the download engine to use it instead of reaching through two layers of private attributes.

Acceptance criteria

  • LibroFmSession exposes a transport property (getter) returning the underlying httpx transport
  • downloader.py calls session.transport instead of session._client._transport
  • 1-2 new tests verify the property returns correct transport and works with MockTransport injection
  • Full test suite passes
  • No other code in the codebase reaches into session._client or session._client._transport

Blocked by

None - can start immediately

## Parent #36 — PRD-003: Deepen Codebase Architecture ## What to build Add a public `transport` property to `LibroFmSession` that returns `self._client._transport`, then update the one call site in the download engine to use it instead of reaching through two layers of private attributes. ## Acceptance criteria - [ ] `LibroFmSession` exposes a `transport` property (getter) returning the underlying httpx transport - [ ] `downloader.py` calls `session.transport` instead of `session._client._transport` - [ ] 1-2 new tests verify the property returns correct transport and works with MockTransport injection - [ ] Full test suite passes - [ ] No other code in the codebase reaches into `session._client` or `session._client._transport` ## Blocked by None - can start immediately
AlexKucera commented 2026-06-05 18:35:57 +02:00 (Migrated from github.com)

Closed via commit 2013249 — public transport property on LibroFmSession with 2 tests, call site updated in downloader.py. All acceptance criteria met.

Closed via commit `2013249` — public `transport` property on `LibroFmSession` with 2 tests, call site updated in downloader.py. All acceptance criteria met.
Sign in to join this conversation.