Repository navigation
fix(discord): workspace voice and thread attachments fail to send - #117767
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 11:31 PM ET / August 2, 2026, 03:31 UTC. ClawSweeper reviewWhat this changesThe branch propagates host-approved media readers and workspace roots through Discord voice, outbound-payload, and thread-reply sends so approved workspace-relative attachments work without accepting action-supplied filesystem authority. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain This PR remains necessary: current Priority: P1 Review scores
Verification
How this fits togetherDiscord's channel plugin receives agent actions and outbound payloads, then hands media paths to voice or attachment senders. The host supplies the authorized local roots and optional reader; the Discord paths must preserve that capability until the shared media loader validates and reads the file. flowchart LR
A[Agent action or outbound payload] --> B[Discord action and outbound routes]
B --> C[Host-owned media authority]
C --> D[Voice or thread attachment sender]
D --> E[Shared media loader]
E --> F[Discord delivery]
C --> G[Root and traversal checks]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +292. Total +295 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Mantis proof suggestionMantis can supply directly relevant, redacted before/after proof for the Discord thread attachment route changed by this PR. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Land a single canonical host-media authority path: retain the shared Do we have a high-confidence way to reproduce the issue? Yes, from source: current Is this the best way to solve the issue? Yes for the code path: forwarding the existing host-owned media context into the canonical shared loader is narrower and safer than adding a Discord-local reader or trusting action parameters. Runtime proof is still required to establish that all changed delivery routes behave correctly after the fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 14322647cd6c. LabelsLabel 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
HistoryReview history (1 earlier review cycle)
|
be748c4 to
776d1d4
Compare
|
Explicit maintainer real-proof decision for exact head 776d1d4: runtime owner proof https://github.com/openclaw/openclaw/actions/runs/30729359388 passed 357 tests across seven Discord suites plus the full thirteen-path changed gate, production/test typechecks, lint, plugin boundaries, and security guards. The production voice owner test writes actual OggS trusted voice bytes into an isolated real workspace, invokes the real Discord sender with ./voice.ogg and host-issued localRoots/workspaceDir, uses the actual bounded media loader, materializes and rereads the bytes, and observes exactly one mocked Discord API delivery. It then reads an actual out-of-root fixture path ../outside.ogg, correctly rejects it as not under an allowed directory, and observes no second delivery. Separate adopted-thread tests preserve exact host capability identity and reject forged model-supplied authority. Existing Mantis cannot exercise this change: its synthetic baseline requires the old forwarding literal removed by this PR and its actual scenario uses absolute paths plus only split legacy fields; the relative Gateway scenario excludes Discord and Crabline has no Discord fake transport. No existing approved harness can provide the requested live public Discord/mock-Gateway verdict without unrelated harness changes. As authorized maintainer, I explicitly accept the real on-disk production-owner behavior, traversal rejection, 357 tests, clean security reviews, green exact-head canonical CI and required gate instead. No public Discord delivery is claimed; production delta plus three lines. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where Discord operators sending workspace-relative voice attachments or replying in threads with agent-created files would receive missing-media failures even though the host had approved the workspace.
Why This Change Was Made
Preserve the original host-owned media capability and supported legacy roots/readers across every Discord direct, payload, action voice, and thread-reply owner boundary. Normalize access once at the real voice media loader and consolidate duplicate action option types.
User Impact
Agents can send approved workspace audio and thread attachments without granting extra filesystem authority. Path traversal, forged action capabilities, rootless host readers, and reader-free Gateway boundaries remain protected.
Evidence