Skip to content

feat(datasets): add fs subcommand to inspect and download task files (#1104)#1106

Open
xdlkc wants to merge 1 commit into
perf/datasets-oss-paginationfrom
feat/datasets-fs-command
Open

feat(datasets): add fs subcommand to inspect and download task files (#1104)#1106
xdlkc wants to merge 1 commit into
perf/datasets-oss-paginationfrom
feat/datasets-fs-command

Conversation

@xdlkc

@xdlkc xdlkc commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Split out from #1064. Adds the datasets fs file-access subcommand.

Depends on #1105. Currently based on the perf/datasets-oss-pagination branch so the diff shows only the fs increment. Once #1105 is merged, this PR's base will be retargeted to master and it becomes fully independent.

Changes

  • datasets fs ls/get/download (alias files) to inspect and fetch files inside a single task.
  • New registry methods list_task_files / get_task_file and a TaskFile model, supporting both directory-style and single-file task layouts.
  • JSON output for all three; relative-path safety via a TaskPath value object (rejects absolute paths and .. traversal).
  • upload additionally accepts a single task file.

Note: the CLI OO refactor (TaskPath / OutputWriter / staticmethods, per @StephenRi's review on #1064) now lands in #1105; this PR builds directly on the refactored module, so datasets fs is written in the same OO style.

Testing

uv run pytest tests/unit/datasets/ -q
# 102 passed
uv run ruff check rock/cli/command/datasets.py rock/sdk/envhub/datasets/ tests/unit/datasets/
# All checks passed!

Related

Refs #1104

@xdlkc xdlkc force-pushed the feat/datasets-fs-command branch from 3adca50 to cbc8085 Compare June 15, 2026 06:39
@xdlkc xdlkc changed the title feat(datasets): add fs subcommand + OO refactor of CLI module (#1104) feat(datasets): add fs subcommand to inspect and download task files (#1104) Jun 15, 2026
@xdlkc xdlkc force-pushed the feat/datasets-fs-command branch 2 times, most recently from 0b7f566 to 386672e Compare June 15, 2026 08:58
…task files

Add a `datasets fs` group (alias `files`) with ls/get/download, backed by
new registry methods `list_task_files` and `get_task_file` and a `TaskFile`
model. Supports both directory-style and single-file task layouts, JSON
output, and relative-path safety validation via a TaskPath value object
(rejects absolute paths and `..` traversal). Also extends `upload` to accept
a single task file.

Refs #1104

Co-Authored-By: Claude Code <noreply@anthropic.com>
AI-Model: claude-opus-4-8
AI-Contributed/Feature: 321/321
AI-Contributed/UT: 354/354
@xdlkc xdlkc force-pushed the feat/datasets-fs-command branch from 386672e to e053127 Compare June 15, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant