Commit 135d07f
feat(channels/discord): outbound attachments with SSRF-guarded Multipart batching
Squashed reroll of topic/discord-outbound-attachments onto v0.6.9 (acf2587).
Replaces the 16-commit history that landed via local-main merge 2c32102.
Reroll context:
- mime/size on ChannelContent::File and file:// in download_image_to_blocks
already landed upstream via #1143; dropped from this branch.
- source_url-on-ContentBlock::Image is provided by feat/runtime-image-cache
(PR #1151); the three compactor source_url tests live there.
- Net contribution here is the outbound Multipart feature plus its deps.
Feature scope:
- Outbound for ChannelContent::File and Image URL arms (per-block resolver
dispatch in mixed Multipart payloads).
- N-attachment batching with greedy-pack chunker and aggregate per-chunk
byte cap; parallel attachment fetch via try_join_all.
- SSRF guard + redirect revalidation + log scrubbing for URL fetch
(Fetcher trait abstraction).
- Body-aware 429 retry on the multi-file path; structured partial-send
WARN with grep-friendly event.
- Transparent decompression disabled on image download (bridge.rs).
Verification:
- cargo check --workspace: clean
- cargo test -p openfang-channels -p openfang-runtime: 1002/1002
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 70e452f commit 135d07f
3 files changed
Lines changed: 2226 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments