fix: accept metadata in gateway helper signatures#851
Closed
kshitijk4poor wants to merge 2 commits intoNousResearch:mainfrom
Closed
fix: accept metadata in gateway helper signatures#851kshitijk4poor wants to merge 2 commits intoNousResearch:mainfrom
kshitijk4poor wants to merge 2 commits intoNousResearch:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the gateway crash reported in #849.
Commit
a630ca1started passingmetadata=_thread_metadatainto_keep_typing(...), but the shared gateway helper signatures still rejectedmetadata. That caused an immediateTypeErrorwhen the gateway received a message.This PR:
_keep_typing,send_typing, and the base media fallback helpers all accept optionalmetadatametadatathrough the shared fallback paths so thread/topic routing data is preserved instead of droppedTelegram,Discord,Slack,WhatsApp,Signal) with that shared contract_keep_typing(..., metadata=...), base fallback helper forwarding, and the gateway adapter signature contractWhy This Matters
unexpected keyword argument 'metadata'failure from surfacing on adjacent typing/media helper pathsa630ca1Test Plan
source .venv/bin/activate && python -m pytest tests/gateway/test_platform_base.py -qsource .venv/bin/activate && python -m pytest tests/gateway -qsource .venv/bin/activate && python -m pytest tests/ -qFixes #849