Skip to content

Matrix CLI accepts out-of-range numeric options #92482

Description

@rohitjavvadi

Problem

The Matrix CLI currently accepts out-of-range numeric values in two places:

  • openclaw matrix verify self --timeout-ms -1 gets past CLI parsing and reaches the verification flow, where it fails later with a confusing Cannot read properties of undefined (reading 'id') error.\n- openclaw matrix account add --initial-sync-limit -1 does not fail at the CLI boundary even though negative initial sync limits are not meaningful.\n\n## Why this matters\n\nBad CLI input should fail before the command starts Matrix setup or verification work. For self-verification, a negative timeout can start the flow and then fail with an unrelated runtime error. For account setup, an explicit invalid initial sync limit can be silently treated like no setting.\n\n## Reproduction proof\n\nI reproduced this with focused Matrix CLI regression tests on current main. Before the fix, the negative --timeout-ms case reached the verification mock and failed with the unrelated id error, while the negative --initial-sync-limit case did not set a non-zero exit code.\n\n## Expected behavior\n\n- --timeout-ms should require a positive integer.\n- --initial-sync-limit should allow zero and positive integers, but reject negative values.\n

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis 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.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions