Add OnAuthenticate to ITwilioSessionHook,ITwilioCallStatusHook#1379
Conversation
PR Summary by QodoAdd synchronous OnAuthenticate hook for Twilio session and call status flows
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1. Breaking hook interface change
|
| /// <summary> | ||
| /// Runs synchronously before any session hook, so identity writes (AsyncLocal) | ||
| /// set here survive into the subsequent async hooks. | ||
| /// </summary> | ||
| /// <param name="request"></param> | ||
| void OnAuthenticate(ConversationalVoiceRequest request); | ||
|
|
There was a problem hiding this comment.
2. Breaking hook interface change 🐞 Bug ⚙ Maintainability
ITwilioSessionHook/ITwilioCallStatusHook add a new non-default OnAuthenticate method, which is a source-breaking API change for any external hook implementations. Because the new method is synchronous and mandatory, any auth work needing async I/O will be forced into blocking patterns.
Agent Prompt
### Issue description
Adding `void OnAuthenticate(...)` as a required interface member breaks compilation for all existing implementations of `ITwilioSessionHook` / `ITwilioCallStatusHook`.
### Issue Context
These are extension-point interfaces; even if this repo has no implementers, downstream projects will.
### Fix Focus Areas
- src/Plugins/BotSharp.Plugin.Twilio/Interfaces/ITwilioSessionHook.cs[10-16]
- src/Plugins/BotSharp.Plugin.Twilio/Interfaces/ITwilioCallStatusHook.cs[9-10]
### Suggested fix
- Prefer backward-compatible default interface implementations:
- `void OnAuthenticate(ConversationalVoiceRequest request) { }`
- Or introduce a new optional interface (e.g., `ITwilioSessionAuthHook`) and have emitters call it when present.
- If you intend a hard break, bump major version and document the migration.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
reviewed |
No description provided.