-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: CLI rejects --duration-min 0 for clearing Discord timeouts #93327
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
The Discord timeout CLI rejects
--duration-min 0before dispatch, even though the Discord moderation runtime treats zero minutes as the supported way to clear an existing timeout.Steps to reproduce
mainatc1219d161d.--duration-min 0, for example:Expected behavior
The CLI should accept
0and pass it to the Discord timeout action so the lower Discord path can clear the timeout by sendingcommunication_disabled_until: null.Actual behavior
The shared message CLI validator treats
durationMinas strictly positive and fails early with--duration-min must be a positive integer.Evidence
src/cli/program/message/helpers.tscurrently validatesdurationMinwith the positive-integer option bucket.extensions/discord/src/actions/handle-action.guild-admin.tsreadsdurationMinwithreadNonNegativeIntegerParam.extensions/discord/src/actions/runtime.test.tsalready covers preservingdurationMinutes: 0for clearing existing timeouts.extensions/discord/src/send.guild.tsmaps zero/absent duration tocommunication_disabled_until: null.Impact
Users cannot clear a Discord timeout through the CLI using the explicit zero-duration form, even though the runtime and agent-tool schema already allow it.
Environment
mainatc1219d161dValidation target
A fix should allow
--duration-min 0through the CLI boundary while keeping malformed values such as5m, empty strings, and fractional values rejected before dispatch.