← Back to Pull requests

feat(cli): add dataset-versions list command #17758

Closed
unknown closed this pull request without merging on Nov 10, 2026 02:49 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 06:38 UTC
Author

resolves #12016

What


Add px dataset-versions list <dataset-identifier> to list a dataset's versions. It follows the scope agreed for prompt-versions list in #12019 (#17189).

  • New top-level dataset-versions noun with a list verb, keeping the two-level px <noun> <verb> shape (the issue title's px dataset versions --dataset <id> form predates that convention).

  • Accepts a dataset name or ID through the existing resolveDatasetId, because GET /v1/datasets/{id}/versions only accepts an ID.

  • Follows next_cursor in pages of 100 (the endpoint's default page size is 10). --limit caps the total, and --format pretty|json|raw is supported.

  • The pretty table shows version_id, description and created_at (local time). JSON and raw output return the full objects, including metadata, with the original timestamp string.

  • Empty dataset: unlike prompts, a dataset can exist with zero versions (for example, one created in the UI before any examples are added; see #17662). An empty list prints No dataset versions found (or []) and exits 0. An unknown dataset name exits FAILURE with a px dataset list hint.

  • Errors use writeStructuredError with semantic exit codes, the same way prompt-versions list does.

  • px dataset get --version help now points at px dataset-versions list.

  • No server changes are needed, since the REST DatasetVersion response already includes created_at.
  • Docs: the CLI README, the phoenix-cli skill (both copies) and a changeset.

    Example


    $ px dataset-versions list my-dataset
    ┌──────────────────────────┬──────────────────┬────────────────────────┐
    │ version_id               │ description      │ created_at             │
    ├──────────────────────────┼──────────────────┼────────────────────────┤
    │ RGF0YXNldFZlcnNpb246Mw== │ Added edge cases │ 11/7/2026, 6:22:10 PM  │
    │ RGF0YXNldFZlcnNpb246Mg== │                  │ 11/2/2026, 9:05:44 AM  │
    │ RGF0YXNldFZlcnNpb246MQ== │ Initial upload   │ 10/28/2026, 3:40:00 PM │
    └──────────────────────────┴──────────────────┴────────────────────────┘
    
    $ px dataset-versions list my-dataset --format raw --no-progress | jq '.[].version_id'
    

    Validation


  • 37 new tests in test/datasetVersionsCommand.test.ts, modeled on promptVersionsCommand.test.ts. They cover ID passthrough, name resolution, an unknown name, cursor pagination, --limit (including oversized pages), an empty dataset in every format, an empty final page, HTTP 404/422/500, network errors, invalid limits, missing config, a run against the generated handlers alone, help examples, and formatter output.

  • Full CLI suite: 73 files, 1023 tests pass.

  • oxfmt --check and oxlint are clean on the package.

  • tsc --noEmit reports no errors in the changed files. Six existing errors (annotator kind AGENT, in session.ts, span.ts, trace.ts and the *Annotations.ts files) appear on clean main in my local checkout too, so they are unrelated to this change.

  • Not yet done: a live smoke test against a running Phoenix server. The example table above is real formatter output with sample data.
  • 🤖 Generated with Claude Code

    Diff: 396 lines (+297 / -99) across 4 files Reviewer: chrikrah Review duration: 1210m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 396 lines diff across 4 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.358
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #17758"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 48.2% (MEDIUM) · Higher = larger blast radius
    48.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19% · Safe to merge
    19%