Repository navigation
fix(discord): classify announcement threads consistently - #128568
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
f22dce2 to
dccef04
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 3:17 AM ET / 07:17 UTC. ClawSweeper reviewWhat this changesThe PR centralizes Discord thread-type recognition so announcement, public, and private threads are handled consistently when resolving channels and related Discord operations. Merge readinessKeep open. This maintainer-authored, maintainer-labeled PR has no blocking source finding, but it remains behind current main and this environment could not independently inspect current-main or the pinned Discord enum source. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherThe bundled Discord plugin turns Discord channel metadata into channel selection, permission, binding, and delivery decisions. A shared thread classifier feeds those decisions so threads are treated consistently across the plugin. flowchart LR
A[Discord API channel data] --> B[Discord thread classifier]
B --> C[Channel-name resolution]
B --> D[Permission and binding logic]
C --> E[Selected Discord channel]
D --> E
Before merge
Agent review detailsSecurityNone. PR surfaceSource -39, Tests +6. Total -33 across 13 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the plugin-private classifier, refresh it against current main, and confirm the pinned Discord enum alias contract before merge. Do we have a high-confidence way to reproduce the issue? Yes, from source: an announcement thread preceding an identically named normal channel takes the old equal-score path, while the added table test specifies the corrected selection. Is this the best way to solve the issue? Yes, subject to direct enum-contract confirmation: one plugin-private classifier removes the inconsistent duplicate predicates rather than patching only resolver ranking. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 538791a34c17. 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)
|
|
Merged via squash.
|
…8568) * refactor(discord): deduplicate thread channel classification * fix(discord): classify announcement threads during channel resolution
What Problem This Solves
Discord thread recognition was independently implemented across message delivery, authorization, permission checks, thread bindings, incoming-message handling, interactive components, and channel-name resolution. One inconsistent copy omitted announcement threads, causing setup and allowlist resolution to choose an identically named announcement thread over the actual channel.
Why This Change Was Made
Use one lightweight, Discord-plugin-private thread classifier for announcement, public, and private threads. Move every existing caller to that owner, including read authorization and channel-match ranking; delete duplicate predicates and replace deprecated Discord enum aliases with their identical current values. No public plugin or SDK contract changes, and authorization retains the existing closed numeric-channel-type boundary.
User Impact
Discord setup and allowlist resolution now consistently prefer an actual channel over an announcement, public, or private thread with the same name. Existing thread routing, bindings, interactive context, guild actions, and private-thread authorization retain their behavior with less production code and cleaner ownership.
Evidence
c1, receivedthread-1. The repaired owner now passes all three cases.