Skip to content

fix(signal): preserve document attachments - #46387

Closed
lkz-de wants to merge 1 commit into
NousResearch:mainfrom
lkz-de:pr/signal-document-attachments
Closed

fix(signal): preserve document attachments#46387
lkz-de wants to merge 1 commit into
NousResearch:mainfrom
lkz-de:pr/signal-document-attachments

Conversation

@lkz-de

@lkz-de lkz-de commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Classify non-audio/image/video Signal attachments as documents so they are cached and surfaced to the agent.

Why

Signal documents can otherwise be dropped or under-classified because they are not one of the media categories handled specially by the gateway.

Scope

  • Signal attachment classification/cache behavior
  • does not change audio/image/video handling

Test plan

  • 111 focused Signal attachment tests passed locally

Classify non-audio/image/video Signal attachments as documents so cached files are surfaced to the agent for document-context handling.
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/signal Signal CLI adapter P2 Medium — degraded but workaround exists labels Jun 15, 2026
@lkz-de

lkz-de commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #20347, which covers the same fix (classifying non-image/audio/video Signal attachments as documents and preserving the original filename) more completely — it also keeps the image/ → PHOTO classification, which this PR inadvertently dropped. One small thing worth carrying over: stripping path components from the attachment filename (Path(name).name) before caching, as a defense against ../-style names. Happy to open that as a small follow-up on #20347 if useful. (See also earlier prior art in #7445 and the broader #36817.) Thanks!

@lkz-de lkz-de closed this Jun 15, 2026

@tonydwb tonydwb 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 Summary

Verdict: Approved

Ensures Signal document attachments are properly preserved when forwarding received messages. Previously, some document types (those without a text field) were being dropped.

What was changed

  • gateway/platforms/signal.py: attachment forwarding logic for Signal messages

Looks Good

  • Fixes an edge case where documents without inline text were being dropped from the message stream
  • Small, targeted fix with no security concerns

Reviewed by Hermes Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/signal Signal CLI adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants