fix(cli): allow zero Discord timeout duration#93329
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 11:28 AM ET / 15:28 UTC. Summary PR surface: Source +2, Tests +23. Total +25 across 2 files. Reproducibility: yes. source-reproducible: current main validates Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land this narrow validator/test alignment after ordinary maintainer and check gates, and let the merge close #93327. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main validates Is this the best way to solve the issue? Yes. The best fix is to align the shared CLI validator with the existing Discord runtime contract instead of changing downstream runtime behavior or adding a command-specific special case. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against da92615816b6. Label changesLabel justifications:
Evidence reviewedPR surface: Source +2, Tests +23. Total +25 across 2 files. 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
|
faf4bb1 to
e18ca11
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
openclaw message timeout --duration-min 0should be accepted because the Discord runtime treats zero minutes as clearing the timeout.durationMinas non-negative, matchingdeleteDaysand the Discord moderation path.Linked context
Closes #93327
Related #92483, #92490
Was this requested by a maintainer or owner?
No. This is a focused bug fix from source-level behavior evidence.
Real behavior proof (required for external PRs)
--duration-min 0before dispatch, even though Discord timeout clearing is represented downstream bydurationMinutes: 0andcommunication_disabled_until: null.fix/discord-timeout-zero, rebuilt locally withnode scripts/build-all.mjs cliStartupfrom PR SHAe18ca11d.--duration-min 0and reaches the dry-run dispatch path instead of failing with--duration-min must be a positive integer.The helper regression test also provesdurationMin: "0"reachesmessageCommandfor the timeout action without a CLI validation error, while malformed values still fail before plugin loading or dispatch.durationMininSTRICT_POSITIVE_INTEGER_OPTIONS, causing--duration-min 0to fail with--duration-min must be a positive integer.Tests and validation
Commands run are listed above.
Regression coverage added:
src/cli/program/message/helpers.test.tsnow verifiesdurationMin: "0"is allowed through the CLI helper for the timeout action.--duration-min.What failed before this fix:
--duration-min 0was rejected by the CLI validator before reaching the Discord timeout path.Risk checklist
Did user-visible behavior change? (
Yes/No)Yes. The CLI now accepts an explicit zero-minute Discord timeout duration.
Did config, environment, or migration behavior change? (
Yes/No)No.
Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)No.
What is the highest-risk area?
Discord moderation command validation.
How is that risk mitigated?
The change only widens
durationMinfrom positive integer to non-negative integer, matching the Discord runtime validator and existing agent tool schema. Malformed and fractional values remain rejected before dispatch. The real CLI dry-run output proves--duration-min 0now passes the validation boundary without sending a live Discord moderation request.Current review state
What is the next action?
Ready for automated checks and maintainer review.
What is still waiting on author, maintainer, CI, or external proof?
Waiting on CI and maintainer/automation review.
Which bot or reviewer comments were addressed?
ClawSweeper asked for real CLI behavior proof. The PR body now includes the exact after-fix dry-run command and output.