-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add terminate command to terminate a dataset
#307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: add terminate command to terminate a dataset
#307
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a new terminate command to the data-set CLI that allows users to terminate a dataset and its associated payment rails. This addresses issue #189 which requested a convenient way to cleanup and stop paying utility for datasets.
Changes:
- Added a new
terminatesubcommand to the data-set command that terminates both the dataset and its payment rails - Implemented ownership validation to ensure only the dataset owner can terminate
- Added idempotent handling for already-terminated datasets
- Enhanced piece display to show terminated datasets' pieces as "onchain orphaned"
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/commands/data-set.ts | Adds the new terminate subcommand registration with argument parsing and error handling |
| src/data-set/run.ts | Implements runTerminateDataSetCommand with owner validation, confirmation prompt, transaction submission, and result display |
| src/data-set/display.ts | Updates renderPieces to mark pieces as ONCHAIN_ORPHANED when dataset's payment rail is terminated |
| src/test/unit/data-set.test.ts | Adds comprehensive test coverage for successful termination, permission denial, and already-terminated scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #189