Skip to content

Canvas CLI accepts invalid numeric options #92487

Description

@rohitjavvadi

Problem

The Canvas node CLI validates some numeric options before invoking the gateway, but two options can still cross the CLI boundary incorrectly:

  • nodes canvas snapshot --quality 5 is accepted even though the option is documented as 0-1 and the Canvas tool schema bounds quality to 0..1.
  • --invoke-timeout 20ms on Canvas commands is parsed as invalid by the default parser, but the CLI treats that as undefined, so the command continues instead of failing before node resolution/invocation.

Why it matters

Bad Canvas CLI input can reach the node/gateway path or silently drop the requested invoke timeout. That makes failures harder to diagnose and leaves CLI behavior out of sync with the Canvas tool schema.

Reproduction idea

Register the Canvas CLI with its default parser and a stubbed node/gateway path, then run:

nodes canvas snapshot --node ios-node --quality 5
nodes canvas snapshot --node ios-node --invoke-timeout 20ms

Expected: both fail at the Canvas CLI boundary before node resolution or gateway invocation.

Actual: out-of-range quality is accepted, and invalid invoke timeout is ignored as if no invoke timeout was supplied.

Proposed fix

Validate --invoke-timeout as a positive integer before node resolution, bound snapshot --quality to 0..1, and add regression coverage proving invalid values do not reach the node/gateway path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:current-main-reproClawSweeper found a high-confidence current-main issue reproduction.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.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦀 challenger crabExceptional issue quality: high-confidence current-main reproduction and actionable evidence.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions