Skip to content

odc-cli instruments list --kind rejects FILE and SERIES #1783

Open

Description

@joshunrau

odc-cli instruments list --kind rejects FILE and SERIES, so an administrator cannot list file or series instruments by kind. The argparse option hard-codes choices=('FORM', 'INTERACTIVE'), but InstrumentKind has four members, and GET /v1/instruments/list?kind= accepts any of them. argparse exits before a request is sent. cli/AGENTS.md already notes the drift as an example of how this hand-written client goes stale. This issue tracks fixing it.

Where

cli/odc-cli:601:

get_parser.add_argument('--kind', choices=('FORM', 'INTERACTIVE'), help='filter instruments by kind')

packages/runtime-core/src/types/instrument.base.ts:13:

type InstrumentKind = 'FILE' | 'FORM' | 'INTERACTIVE' | 'SERIES';

Reproduce

  1. Log in with odc-cli auth login.
  2. Run odc-cli instruments list --kind SERIES.

Actual: error: argument --kind: invalid choice: 'SERIES' (choose from 'FORM', 'INTERACTIVE'), with exit status 2 and no request sent. The same happens for FILE.
Expected: the CLI calls GET /v1/instruments/list?kind=SERIES and prints the series instruments.

Tests

cli/ has no test harness (cli/AGENTS.md). Verify the fix by running instruments list --kind FILE and --kind SERIES against a demo instance, which seeds both kinds.

Suggested fix

Change the choices to ('FILE', 'FORM', 'INTERACTIVE', 'SERIES') in the order of the InstrumentKind union. Then remove the drift example from cli/AGENTS.md, or replace it, in the same commit.

Activity

  1. added
    BugType: existing behavior is wrong
    Priority: LowNice to have, cosmetic or speculative
    Difficulty: LowIsolated change, about 2 hours or less
    Area: InfrastructureDeployment, Docker, CI, logging, CLIs, build and test tooling
    Good First IssueWell-scoped, low-risk and self-contained; a good entry point for a new contributor
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: InfrastructureDeployment, Docker, CI, logging, CLIs, build and test toolingBugType: existing behavior is wrongDifficulty: LowIsolated change, about 2 hours or lessGood First IssueWell-scoped, low-risk and self-contained; a good entry point for a new contributorPriority: LowNice to have, cosmetic or speculative

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions