Skip to content

Commit 135d07f

Browse files
benhoverterclaude
andcommitted
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

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/openfang-channels/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ sha1 = { workspace = true }
2929
aes = "0.8"
3030
cbc = "0.1"
3131
base64 = { workspace = true }
32+
bytes = { workspace = true }
3233
hex = { workspace = true }
3334
html-escape = { workspace = true }
3435
regex-lite = "0.1"

0 commit comments

Comments
 (0)