Problem
The langstar dataset delete command displays a confirmation message but doesn't actually wait for user input. It immediately returns without deleting OR waiting for confirmation:
// cli/src/commands/dataset.rs:488-493
if !args.yes {
eprintln!("Are you sure you want to delete dataset {}?", args.dataset_id);
eprintln!("Use --yes (-y) to skip this confirmation.");
return Ok(()); // ❌ Returns without deleting OR waiting
}
This makes the confirmation prompt misleading - it appears to protect the user but provides no protection at all.
Expected Behavior
The command should wait for user input and only proceed if they type "yes", following the same pattern as deployment delete:
// cli/src/commands/deployment.rs:602-611
use std::io::{self, Write};
print!("Type 'yes' to confirm: ");
io::stdout().flush()?;
let mut confirmation = String::new();
io::stdin().read_line(&mut confirmation)?;
if confirmation.trim().to_lowercase() != "yes" {
println!("Deletion cancelled.");
return Ok(());
}
// If we get here, proceed with deletion
Related
Discovered during code review in PR #701 (project commands). The project command has been implemented correctly with proper stdin confirmation.
Same issue exists in queue command - see related issue.
Acceptance Criteria
Problem
The
langstar dataset deletecommand displays a confirmation message but doesn't actually wait for user input. It immediately returns without deleting OR waiting for confirmation:This makes the confirmation prompt misleading - it appears to protect the user but provides no protection at all.
Expected Behavior
The command should wait for user input and only proceed if they type "yes", following the same pattern as
deployment delete:Related
Discovered during code review in PR #701 (project commands). The project command has been implemented correctly with proper stdin confirmation.
Same issue exists in queue command - see related issue.
Acceptance Criteria