Repository navigation
fix(slack): retain unavailable attachments alongside downloads - #129708
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 2:45 AM ET / 06:45 UTC. ClawSweeper reviewWhat this changesThe PR preserves source Slack-file identity through media resolution so successful downloads and genuinely unavailable sibling attachments both reach the prepared agent message. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessNo blocking code finding: the branch addresses the prior identity-loss finding at the Slack media owner. Keep this maintainer-labeled PR open for explicit maintainer handling and exact-head CI completion. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Slack plugin collects direct and forwarded attachment candidates, resolves downloadable files to agent media, and renders unresolved files as fallback references in the agent-visible message body. flowchart LR
A[Slack message event] --> B[Attachment candidates]
B --> C[Slack media resolution]
C --> D{Resolved file?}
D -->|Yes| E[Agent media payload]
D -->|No| F[Fallback file reference]
E --> G[Prepared agent message]
F --> G
Decision needed
Why: The repository’s protected maintainer label requires explicit maintainer handling despite the focused repair and absence of a code finding. Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +105. Total +105 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the producer-owned resolved-file set as the single source of truth, then merge after exact-head validation confirms mixed successful and unavailable Slack attachments remain separately visible. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main renders fallback files only when no media resolves, and the branch’s mixed downloadable/unavailable fixture exercises the contrary case. Is this the best way to solve the issue? Yes. Recording exact resolved producer objects avoids reconstructing attachment identity from mutable presentation filenames and preserves the existing media limit and duplicate-ID behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0229fe7a2a90. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
|
Merged via squash.
|
…law#129708) * fix(slack): retain unavailable attachments alongside downloads * fix(slack): retain original attachment identity through download * test(slack): narrow optional attachment regression types
Summary
When Slack sends a mixture of downloadable and unavailable attachments, OpenClaw must deliver successful files while preserving useful fallback references for the failures. The initial repair tried to match successful files using rendered placeholder filenames; Slack's actual downloader gives HTTP
Content-Dispositionprecedence over the original event filename, so ID-less renamed attachments were falsely reported as unavailable.Track authoritative attachment identity at the Slack media producer instead of inferring identity from rendered output. The producer records exact successfully resolved
SlackFileobjects, reuses canonical preloaded objects across direct/forwarded duplicate IDs, and returns only genuinely unresolved files. The downstream consumer no longer parses presentation strings to reconstruct file ownership.Full production delta: +26/-26 (net 0). Tests: +118/-13.
Verification
Content-Dispositionfilename-precedence contract and ordered concurrent-download result ownership.git diff --check, changed-surface classification, and a fresh integrated complete-branch independent P1 review passed.Risk
Low: plugin-owned attachment identity and fallback presentation only; no sender-identity, authentication, channel-policy, persistent-state, or public configuration changes. Addresses ClawSweeper's renamed-attachment finding directly.