fix(discord): inherit forum default_auto_archive_duration for thread creation#103033
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 2:49 PM ET / 18:49 UTC. Summary PR surface: Source +28. Total +28 across 1 file. Reproducibility: yes. at source level: Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Apply the inherit-default logic in Do we have a high-confidence way to reproduce the issue? Yes at source level: Is this the best way to solve the issue? No as submitted: inheriting the forum default is the right fix shape, but the implementation must cover the actual forum-parent send path rather than only Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8656c3b357f6. Label changesLabel justifications:
Evidence reviewedPR surface: Source +28. Total +28 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (2 earlier review cycles)
|
Carry typed forum/media parent metadata through the message-send path so implicit thread creation uses the configured default archive duration. Co-authored-by: 唐梓夷0668001293 <[email protected]>
0e7cbe9 to
fcb7c05
Compare
|
Land-ready review completed on exact head What changed:
Proof:
Known proof gap: no authorized Discord smoke credential or configured Discord account was available in the dedicated Testbox or maintainer checkout, so I could not run a live create/read-back. The linked issue supplies the shipped live 4320-minute symptom; the focused production-path test proves the corrected request carries 1440. |
|
Merged via squash.
|
Carry typed forum/media parent metadata through the message-send path so implicit thread creation uses the configured default archive duration. Co-authored-by: Peter Steinberger <[email protected]>
…scord When createThreadForBinding hardcoded autoArchiveMinutes: 60, the parent channel's default_auto_archive_duration (configured by operators at 1440, 4320, or 10080) was silently overridden. This is the same pattern fixed in openclaw#103033 for sendMessageDiscord's implicit forum thread creation. - Move the auto_archive_duration set after the channel fetch in createThreadDiscord so channel.default_auto_archive_duration can serve as a fallback when autoArchiveMinutes is not provided. - Remove the hardcoded autoArchiveMinutes: 60 from createThreadForBinding so it inherits the channel default for forum/media channels and omits the field for text channels (preserving Discord's server-side default). - Explicit autoArchiveMinutes from callers (thread-create action, auto-thread config) still take priority via the ?? operator. Co-Authored-By: Claude <[email protected]>
…scord (#103413) * fix(discord): inherit default_auto_archive_duration in createThreadDiscord When createThreadForBinding hardcoded autoArchiveMinutes: 60, the parent channel's default_auto_archive_duration (configured by operators at 1440, 4320, or 10080) was silently overridden. This is the same pattern fixed in #103033 for sendMessageDiscord's implicit forum thread creation. - Move the auto_archive_duration set after the channel fetch in createThreadDiscord so channel.default_auto_archive_duration can serve as a fallback when autoArchiveMinutes is not provided. - Remove the hardcoded autoArchiveMinutes: 60 from createThreadForBinding so it inherits the channel default for forum/media channels and omits the field for text channels (preserving Discord's server-side default). - Explicit autoArchiveMinutes from callers (thread-create action, auto-thread config) still take priority via the ?? operator. Co-Authored-By: Claude <[email protected]> * refactor(discord): preserve parent thread archive defaults Co-authored-by: 陈志强0668000989 <[email protected]> * docs(changelog): credit Discord archive default fix Co-authored-by: 陈志强0668000989 <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…scord (openclaw#103413) * fix(discord): inherit default_auto_archive_duration in createThreadDiscord When createThreadForBinding hardcoded autoArchiveMinutes: 60, the parent channel's default_auto_archive_duration (configured by operators at 1440, 4320, or 10080) was silently overridden. This is the same pattern fixed in openclaw#103033 for sendMessageDiscord's implicit forum thread creation. - Move the auto_archive_duration set after the channel fetch in createThreadDiscord so channel.default_auto_archive_duration can serve as a fallback when autoArchiveMinutes is not provided. - Remove the hardcoded autoArchiveMinutes: 60 from createThreadForBinding so it inherits the channel default for forum/media channels and omits the field for text channels (preserving Discord's server-side default). - Explicit autoArchiveMinutes from callers (thread-create action, auto-thread config) still take priority via the ?? operator. Co-Authored-By: Claude <[email protected]> * refactor(discord): preserve parent thread archive defaults Co-authored-by: 陈志强0668000989 <[email protected]> * docs(changelog): credit Discord archive default fix Co-authored-by: 陈志强0668000989 <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…scord (openclaw#103413) * fix(discord): inherit default_auto_archive_duration in createThreadDiscord When createThreadForBinding hardcoded autoArchiveMinutes: 60, the parent channel's default_auto_archive_duration (configured by operators at 1440, 4320, or 10080) was silently overridden. This is the same pattern fixed in openclaw#103033 for sendMessageDiscord's implicit forum thread creation. - Move the auto_archive_duration set after the channel fetch in createThreadDiscord so channel.default_auto_archive_duration can serve as a fallback when autoArchiveMinutes is not provided. - Remove the hardcoded autoArchiveMinutes: 60 from createThreadForBinding so it inherits the channel default for forum/media channels and omits the field for text channels (preserving Discord's server-side default). - Explicit autoArchiveMinutes from callers (thread-create action, auto-thread config) still take priority via the ?? operator. Co-Authored-By: Claude <[email protected]> * refactor(discord): preserve parent thread archive defaults Co-authored-by: 陈志强0668000989 <[email protected]> * docs(changelog): credit Discord archive default fix Co-authored-by: 陈志强0668000989 <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes #103021: Discord forum/media threads created by
message action=sendignored the parent channel'sdefault_auto_archive_duration. When the field was omitted from the thread-create request, Discord used 4320 minutes instead of the operator's configured value such as 1440 minutes.Why This Change Was Made
The reported send path does not call
createThreadDiscord; it callssendMessageDiscord, which fetched the target channel only to classify its numeric type and then built the forum thread request directly insend.outbound.ts.The revised fix carries that existing lookup forward as a typed Discord channel. Once narrowed to a forum/media parent, the send path copies its
default_auto_archive_durationinto the same thread-create request. This avoids another API request, preserves the field-absent fallback, and leaves the explicitthread-createaction and itsautoArchiveMinutesoverride unchanged.User Impact
thread-createaction remains unchanged.Evidence
fcb7c056d7b8bd4489e6565eef3a8c83abd889d2.tbx_01kx4hyrjn05y5r8ttcn8sykfh: 206/206 focused Discord tests passed across the production send, explicit thread-create, component, and action-runtime surfaces.pnpm check:changed: extension production/test typechecks, lint, dependency/architecture guards, and runtime import-cycle checks passed.default_auto_archive_durationand acceptsauto_archive_durationon forum/media thread creation; the pinned[email protected]types match that contract.Thanks @tzy-17 for the report-linked fix and contribution.