Repository navigation
fix(outbound): blank media lists silently drop valid channel attachments - #128372
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 5:18 PM ET / 21:18 UTC. ClawSweeper reviewWhat this changesThe PR makes an all-blank Merge readinessKeep open for normal maintainer handling. Current main still gives any non-empty plural list precedence over a valid singular attachment; the branch repairs that shared owner and its focused tests cover the SDK and Discord/Feishu paths without introducing a blocking defect. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe shared outbound reply helper selects media from agent reply payloads before Plugin SDK channel adapters normalize and send them. Discord, Feishu, LINE, Slack, and other channel paths consume that selected media list for their transport-specific delivery. flowchart LR
A[Agent reply payload] --> B[Shared media selector]
B --> C{Plural list has a usable URL}
C -->|Yes| D[Keep plural attachment list]
C -->|No| E[Use legacy single attachment]
D --> F[Channel delivery adapters]
E --> F
F --> G[Visible channel attachment]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -3, Tests +40. Total +37 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the shared-selector fix after exact-head checks complete, retaining the raw valid plural-array contract and the focused channel regressions. Do we have a high-confidence way to reproduce the issue? Yes from source: current main returns Is this the best way to solve the issue? Yes. Repairing the shared media selector is the canonical fix because Discord and Feishu consume its normalized result; channel-specific fallbacks would duplicate policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 901b62262e81. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where channel replies containing a valid attachment in
mediaUrlwould silently lose that attachment whenmediaUrlsexisted but contained only whitespace. Discord skipped the file upload, Feishu sent text without its attachment, and attachment-only replies could disappear on other channels sharing the same outbound owner.Why This Change Was Made
Select the plural attachment array only when it contains an actual nonblank media reference; otherwise use the existing singular attachment field. The shared owner preserves the public SDK’s original array identity, raw strings, whitespace, duplicates, ordering, precedence, and unchanged type/signature for every valid plural input.
User Impact
Discord, Feishu, Slack, LINE, and other shared-owner channel paths now retain a valid attachment instead of silently discarding it when stale plural metadata is blank. Existing multi-attachment and WhatsApp delivery behavior remain unchanged.
Evidence