Skip to content

epic-4/story-4: Support Integration Customization and Extension Boundaries - #41

Closed
usmanabbas7 wants to merge 1 commit into
epic-4/story-3-support-cross-sdk-debuggingfrom
epic-4/story-4-support-integration-customization-and-extension-boundaries
Closed

epic-4/story-4: Support Integration Customization and Extension Boundaries#41
usmanabbas7 wants to merge 1 commit into
epic-4/story-3-support-cross-sdk-debuggingfrom
epic-4/story-4-support-integration-customization-and-extension-boundaries

Conversation

@usmanabbas7

Copy link
Copy Markdown
Collaborator

Story 4.4 — Support Integration Customization and Extension Boundaries

Part of sprint `sprint/2026-04-06-convert-python-sdk`. Stacked on #40 (epic-4/story-3) → #39#38 → epic-3 chain.

What was built (test-only — extension infra already shipped by Stories 1.x–3.x)

The @runtime_checkable ports/ Protocols (Transport, DataStore, EventBus), the adapters/ defaults, and both injection points already exist. The Codex-claimed tests/test_integration_customization.py did NOT exist — this PR builds it, proving adapter substitution preserves semantics against the real hybrid injection contract:

  • Transport injected as a keyword-only arg: Core(config, transport=...).
  • Storage injected as a config field: SDKConfig(data_store=...).

7 new tests (tests/test_integration_customization.py, 287 lines, no runtime code touched):

  1. Protocol conformance — inline stubs satisfy @runtime_checkable Transport/DataStore via isinstance without subclassing the defaults (AC feat(python-sdk): add in-memory config evaluation managers #2/feat(python-sdk): add api manager and event queue layer #3).
  2. Task 4.1 — RecordingTransport replaces HttpxTransport end-to-end (eval + tracking + double-flush no-op).
  3. Task 4.2 — RecordingDataStore replaces InMemoryDataStore (sticky context state + goal dedup).
    4–7. Task 4.4 — byte-identical ExperienceResult determinism, default vs custom adapters, across 4 visitor IDs incl. unicode, with a non-vacuous bucketing guard.

Tests: 635 → 642 (+7), zero regressions. No runtime gap found; no runtime code modified.

Audit findings

  • F-012 (storage contract): tests inject via SDKConfig(data_store=...) — the disk-verified field contract.
  • F-022 (AC feat(python-sdk): add deterministic bucketing and rule evaluation core #1): transport via Core kwarg, storage via config field, eval semantics proven unchanged.
  • F-023 (AC feat(python-sdk): add api manager and event queue layer #3): duck-typed @runtime_checkable conformance; the defective "typed init error" wording correctly NOT implemented.
  • F-041 (Task 2.1): transport injection confirmed already wired (`core.py:49`); no new wiring.
  • F-043 (Task 4.3 / Task 3 typed validation): confirmed-deferred (hardening follow-up); incomplete-adapter rejection test omitted.
  • Deferred & correctly absent: `ports/logger.py` (stdlib logging is the seam), `docs/extending.md` + Task 1.4 stability-tier docstrings (→ Story 4.5).

Beads

Epic `ai-driven-product-dev-neqm`; task `-ct2u` (integration customization tests) — closed.

Provenance note

Story retro-marked `done` with a stale GPT-5-Codex Dev Agent Record claiming the integration test + `ports/logger.py` shipped. The driver grepped the live branch, found neither, and resolved a genuine F-012/F-041 contract contradiction against on-disk reality (transport=kwarg, storage=config field).

Readiness

Gate passed 9/10. 5 questions auto-delegated "your call" in sprint mode (all the F-012/F-041 contradiction + deferral decisions; resolved against disk without conflict).

🤖 Generated with Claude Code

@usmanabbas7 usmanabbas7 self-assigned this Jun 8, 2026
@usmanabbas7
usmanabbas7 requested a review from clllaur June 8, 2026 11:59

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new integration test file, tests/test_integration_customization.py, which verifies that custom adapter substitutions for transport and storage preserve SDK semantics and maintain byte-identical evaluation determinism. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@usmanabbas7
usmanabbas7 force-pushed the epic-4/story-3-support-cross-sdk-debugging branch from f723894 to 17b6548 Compare June 14, 2026 17:09
@usmanabbas7
usmanabbas7 force-pushed the epic-4/story-4-support-integration-customization-and-extension-boundaries branch from ec7ed31 to 1338c8c Compare June 14, 2026 17:09
@usmanabbas7
usmanabbas7 force-pushed the epic-4/story-3-support-cross-sdk-debugging branch from 17b6548 to 05162b0 Compare June 15, 2026 11:30
…tution

Beads: ai-driven-product-dev-ct2u
Agent: fullstack-sdk-dev
Status: completed
Proves custom Transport (Core kwarg) + custom DataStore (SDKConfig field) preserve
evaluation/tracking/flush/sticky semantics with byte-identical determinism.
7 tests; 635 -> 642, zero regressions. Test-only story (no runtime gap found).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@usmanabbas7
usmanabbas7 force-pushed the epic-4/story-4-support-integration-customization-and-extension-boundaries branch from 1338c8c to 31b611a Compare June 15, 2026 11:30
@usmanabbas7

Copy link
Copy Markdown
Collaborator Author

F-066 propagation (rebase onto remediated 3-3)

Rebased onto the remediated stack. Does not modify evaluation/segments.py; latch fix inherited cleanly (byte-identical to remediated 3-3), no conflicts.

  • uv run pytest652 passed
  • CI gate: no .github/workflows/ on this branch → no-ci.

@abbaseya

Copy link
Copy Markdown
Collaborator

Superseded — all commits already in main (bc76b64). Closing without merge as part of post-sprint cleanup.

@abbaseya abbaseya closed this Jun 18, 2026
@abbaseya
abbaseya deleted the epic-4/story-4-support-integration-customization-and-extension-boundaries branch June 18, 2026 16:31
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.

2 participants