Skip to content

chore: remove dead *ActivityInput classes for inbound-only types#341

Closed
rajan-chari wants to merge 1 commit intofix/338-remove-unsendable-input-typesfrom
fix/338-remove-dead-input-classes
Closed

chore: remove dead *ActivityInput classes for inbound-only types#341
rajan-chari wants to merge 1 commit intofix/338-remove-unsendable-input-typesfrom
fix/338-remove-dead-input-classes

Conversation

@rajan-chari
Copy link
Copy Markdown
Contributor

@rajan-chari rajan-chari commented Mar 31, 2026

Summary

Follow-up to #340. Deletes 7 *ActivityInput classes that were removed from the ActivityParams union and have zero references anywhere in the codebase.

Deleted classes:

  • MessageDeleteActivityInput
  • MessageUpdateActivityInput
  • ConversationUpdateActivityInput
  • HandoffActivityInput
  • TraceActivityInput
  • CommandSendActivityInput
  • CommandResultActivityInput

The corresponding *Activity classes (used as handler type hints for incoming events) are preserved.

Why

These classes existed for model symmetry (every Activity type had an Input counterpart) but represented inbound-only event types. They had no valid outbound send path and no references outside their own definitions and __init__.py exports. Removing them eliminates the suggestion that these types are constructible for any purpose.

Test plan

Automated

  • CI passes: build, lint (ruff + pyright), and unit tests on Python 3.12/3.13/3.14
  • Local: 552 tests pass on Python 3.13

Verification

  • from microsoft_teams.api.activities import MessageDeleteActivityInput raises ImportError
  • from microsoft_teams.api.activities import MessageDeleteActivity still works
  • All handler decorators (@app.on_message_delete, @app.on_message_update, etc.) still work with incoming Activity types

🤖 Generated with Claude Code

Delete 7 *ActivityInput classes that were removed from the
ActivityParams union in the previous commit and have zero references:

- MessageDeleteActivityInput
- MessageUpdateActivityInput
- ConversationUpdateActivityInput
- HandoffActivityInput
- TraceActivityInput
- CommandSendActivityInput
- CommandResultActivityInput

These represented inbound-only event types (server→bot) and had no
valid outbound send path. The corresponding *Activity classes (used
as handler type hints) are preserved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rajan-chari
Copy link
Copy Markdown
Contributor Author

Manual Test Results — Echo Bot (Python)

Tested on branch fix/338-rename-activity-params (PR #342, which stacks on this PR), commit bf62a5c. Python echo bot deployed to BAMI1 tenant via DevTunnel.

# Test Result Details
1 Send a message → bot replies PASS MessageActivityInput via ctx.send(str) works after dead class removal
2 Bot shows typing indicator before reply PASS TypingActivityInput still works
3 Edit a sent message → @app.on_message_update fires PASS Incoming MessageUpdateActivity handler unaffected by removed *ActivityInput classes
4 Delete a message → @app.on_message_delete fires PASS Incoming MessageDeleteActivity handler unaffected by removed *ActivityInput classes
5 No regression in send/typing PASS Removed input classes were inbound-only — no impact on send path

All 5 test steps passed. Removing the dead *ActivityInput classes for inbound-only types causes no regressions.

@lilyydu
Copy link
Copy Markdown
Collaborator

lilyydu commented Apr 1, 2026

added comment here #340 (comment)

@lilyydu
Copy link
Copy Markdown
Collaborator

lilyydu commented Apr 3, 2026

closing to handle all changes in #340

@lilyydu lilyydu closed this Apr 3, 2026
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