Repository navigation
fix(discord): retain attachment-only reply context - #126204
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 6:44 PM ET / 22:44 UTC. ClawSweeper reviewWhat this changesThe PR retains Discord reply identity and referenced attachment or sticker media when the replied-to message has no text body. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessNo blocking correctness finding: the patch repairs the reply-context producer and preserves existing visibility and self-quote gates. This maintainer-owned, protected PR should remain open for explicit maintainer review after exact-head CI completes. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherDiscord inbound processing hydrates a referenced message, applies reply visibility and self-quote policy, then passes reply metadata and media through the shared inbound-context builder to the agent prompt. The change preserves context for media-only referenced messages. flowchart LR
A[Discord reply event] --> B[Hydrated referenced message]
B --> C[Reply context eligibility]
C --> D[Visibility and self-quote gates]
D --> E[Shared inbound context builder]
E --> F[Agent prompt metadata]
E --> G[Referenced media facts]
Decision needed
Why: The Before merge
Agent review detailsSecurityNone. PR surfaceSource +9, Tests +75. Total +84 across 5 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused owner-boundary repair after exact-head CI is green; no separate core or plugin API path is needed. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main drops an empty-body referenced message at extensions/discord/src/monitor/reply-context.ts:29, and the added dispatch fixture supplies that exact attachment-only shape. Is this the best way to solve the issue? Yes. Extending the existing Discord reply-context producer and shared metadata projection is narrower and more maintainable than adding a parallel channel or core path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 841f25eae629. 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 (2 earlier review cycles)
|
1917005 to
391d185
Compare
391d185 to
dc817b0
Compare
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where replying to an attachment-only Discord message omitted the referenced message context, so the model received the media without a useful quoted-message identity.
Why This Change Was Made
Keep hydrated attachment/sticker-only references as typed reply context and project message ID/sender metadata even when the referenced text body is empty. Visibility and self-quote gates remain unchanged.
User Impact
Discord replies to images or other attachment-only messages now preserve the referenced sender/message context and media association.
Evidence
node scripts/check-changed.mjspassed.