Skip to content

fix: unwrap nested ConversationEvent in SDK resource layer#35

Merged
johnxing-amigo merged 1 commit intomainfrom
fix/unwrap-conversation-events
Mar 14, 2026
Merged

fix: unwrap nested ConversationEvent in SDK resource layer#35
johnxing-amigo merged 1 commit intomainfrom
fix/unwrap-conversation-events

Conversation

@johnxing-amigo
Copy link
Contributor

Summary

  • SDK now automatically unwraps ConversationEvent RootModel wrapper in interact streams
  • Callers get concrete event types (InteractionCompleteEvent, NewMessageEvent, etc.) directly from evt.root
  • Updated default SERVICE_ID to active dogfood service
  • Added --no-cov to integration test CI (coverage threshold is for unit tests only)

Test plan

  • 189 unit tests pass (85.03% coverage)
  • 18/18 conversation integration tests pass against dogfood
  • Tests use evt.root directly — no _unwrap_event helper needed

🤖 Generated with Claude Code

The generated Pydantic models wrap interact stream events in a nested
RootModel chain: InteractResponse.root → ConversationEvent.root →
InteractionCompleteEvent. This meant callers had to manually unwrap
two levels to check event types.

Now the SDK resource layer unwraps ConversationEvent automatically,
so callers get concrete event types (InteractionCompleteEvent,
NewMessageEvent, etc.) directly from evt.root.

Also:
- Update default SERVICE_ID to active dogfood service
- Add AMIGO_TEST_SERVICE_ID to CI env
- Add --no-cov to integration test run (coverage threshold is for unit tests)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@johnxing-amigo johnxing-amigo merged commit 2e7ca1c into main Mar 14, 2026
11 checks passed
@johnxing-amigo johnxing-amigo deleted the fix/unwrap-conversation-events branch March 14, 2026 23:54
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