-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Canvas CLI accepts invalid numeric options #92487
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:current-main-reproClawSweeper found a high-confidence current-main issue reproduction.ClawSweeper found a high-confidence current-main issue reproduction.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.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: 🦀 challenger crabExceptional issue quality: high-confidence current-main reproduction and actionable evidence.Exceptional issue quality: high-confidence current-main reproduction and actionable evidence.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:current-main-reproClawSweeper found a high-confidence current-main issue reproduction.ClawSweeper found a high-confidence current-main issue reproduction.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.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: 🦀 challenger crabExceptional issue quality: high-confidence current-main reproduction and actionable evidence.Exceptional issue quality: high-confidence current-main reproduction and actionable evidence.
Type
Fields
Priority
None yet
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 5is accepted even though the option is documented as0-1and the Canvas tool schema boundsqualityto0..1.--invoke-timeout 20mson Canvas commands is parsed as invalid by the default parser, but the CLI treats that asundefined, 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:
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-timeoutas a positive integer before node resolution, bound snapshot--qualityto0..1, and add regression coverage proving invalid values do not reach the node/gateway path.