Repository navigation
fix(discord): list all pinned messages - #117464
Conversation
|
Codex review: needs maintainer review before merge. What this changesThis PR retrieves every Discord pin page and switches pin/unpin requests to the supported endpoints. Example: List pins in a Discord channel containing 250 pinned messages.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current Discord pin-list truncation bug with a focused transport change; no actionable defects remain, and the exact-head CI gate passes. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDiscord message actions call the plugin’s transport helpers, which send authorized REST requests and return message arrays for normalization and presentation. flowchart LR
A[Message action] --> B[Discord action handler]
B --> C[Pin transport helpers]
C --> D[Authorized REST client]
D --> E[Discord pin endpoints]
E --> F[Normalized message results]
Technical reviewBest possible solution: Merge the focused pagination loop and supported routes through the existing Discord transport owners. Do we have a high-confidence way to reproduce the issue? Current main makes one request to the deprecated first-50 endpoint; the supplied regressions report failure on the base and success after the fix, without tests being rerun during this read-only review. Is this the best way to solve the issue? The patch is the smallest complete fix: paginate in listPinsDiscord, retain its message-array result, and update the existing shared mutation routes and affected fixtures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 74201376f97d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +22, Tests +58, Docs +2. Total +82 across 6 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (19 earlier review cycles; latest 8 shown)
Reviewed October 21, 2026, 4:47 AM ET / 08:47 UTC (Revision 20). |
Use the supported message-pin endpoints and follow has_more with the last pinned_at timestamp unchanged. Keep pagination in listPinsDiscord and preserve message-ID normalization and request authority. Release-note context: Discord pin listing now returns every page instead of silently truncating at 50 pinned messages.
ff1d62d to
e495126
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Retain main API fixture refactor and preserve the reviewed current pin endpoint as its independent expected path. Production files merge without conflicts.
|
Merged via squash auto-merge.
|
* fix(discord): list all pinned messages Use the supported message-pin endpoints and follow has_more with the last pinned_at timestamp unchanged. Keep pagination in listPinsDiscord and preserve message-ID normalization and request authority. Release-note context: Discord pin listing now returns every page instead of silently truncating at 50 pinned messages. * fix(discord): place pin response invariant beside its assertion * test(discord): update scheduled pin transport fixture
What Problem This Solves
Fixes incomplete Discord pin lists when a channel has more than 50 pinned messages.
User Impact
Pin listing returns every page, and pin/unpin use Discord's supported message-pin endpoints. Existing message-ID normalization and mutation authority remain intact.
Why This Change Was Made
Current main's
extensions/discord/src/send.messages.ts:220uses the deprecated first-page-only pin endpoint. Pagination belongs in this existing transport owner. Followhas_moreand pass the lastpinned_attimestamp verbatim, preserving its precision and offset. Use the installed API dependency's current routes for all pin operations.The earlier patch's arbitrary pin/page caps and extensive response validation are removed. A missing or nonadvancing cursor fails visibly instead of looping.
Evidence
The three transport regressions fail on current main (
f29ecf310b2c), including first-50 truncation and deprecated request paths. With the fix, both touched suites pass all 62 tests. Tests cover 250 pins, sparse pages extending beyond five requests, exact timestamp advancement, and normalized pin/unpin routes. No live Discord API was used; localhost HTTP transport proof and PR CI are the validation scope for this repair lane.Production +28/-6 (net +22); tests +62/-4 (net +58); docs +2/-0. Growth is confined to the page loop and three transport regressions. Targeted formatting passes, and isolated Codex review is scoped-clean with no actionable P0–P2 findings. Type-aware lint passes.
The first CI run (
39564575141, job119104324826) found the multiline assertion’s safety comment too far from its cast. The response is now bound before the documented cast; the failed assertion-safety ratchet passes locally. This formatting/placement repair leaves the reviewed transport behavior unchanged. Final exact-head CI39570302654is green on3d3e4be2d165b71dc0795fec53f2dde4b3e261be, including both repaired jobs. There are no inherited failures.The second CI run (
39566991244, job119112278663) caught an old/pins/URL in the scheduled-send Gateway fake. The fixture now accepts the supported/messages/pins/route. Both affected cases fail before this repair; the full 11-test file passes afterward. Core lint, formatting, and an isolated review of this one-line test change pass. No production change was needed.Fresh ClawSweeper review on
3d3e4be2d165b71dc0795fec53f2dde4b3e261bereports zero findings and ready for maintainer review.Landing conflict resolution
Merged current main into
f1d2e9280ff68ebb79f2970de4638c7f6d92e6fc. Resolvedextensions/discord/src/internal/api.test.tsby preserving main's fixture refactor and setting its independent expected pin path to the reviewed/messages/pins/endpoint. Production files merged without conflicts. All 73 tests passed across the pin/API suites (62) and scheduled-send integration suite (11), in 52.87 seconds total. Scoped type-aware lint, formatting, andgit diff --checkalso pass. Prior-head CI remains historical; current-head CI must finish separately.