{"record":{"id":"aa3522dd21dfde22","repo":"Hmbown/CodeWhale","slug":"not-confirmed-nothing-was-written","errorCode":null,"errorMessage":"not confirmed; nothing was written","messagePattern":"not confirmed; nothing was written","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"crates/tui/src/integrations/cli.rs","lineNumber":59,"sourceCode":"    Ok((paths, report))\n}\n\nfn confirm(yes: bool, question: &str) -> Result<()> {\n    if yes {\n        return Ok(());\n    }\n    if !std::io::stdin().is_terminal() {\n        anyhow::bail!(\"stdin is not a terminal; pass --yes to confirm the disclosed plan\");\n    }\n    print!(\"{question} [y/N] \");\n    use std::io::Write;\n    std::io::stdout().flush().ok();\n    let mut answer = String::new();\n    std::io::stdin()\n        .read_line(&mut answer)\n        .context(\"read confirmation\")?;\n    if !matches!(answer.trim().to_ascii_lowercase().as_str(), \"y\" | \"yes\") {\n        anyhow::bail!(\"not confirmed; nothing was written\");\n    }\n    Ok(())\n}\n\nfn print_status(report: &DshStatusReport) {\n    println!(\"DeepSeek Harness (dsh) — {}\", RELATIONSHIP_LABEL);\n    println!(\"  state: {}\", report.state.label());\n    println!(\"  summary: {}\", dsh::status_line(report));\n    match report.detection.binary.as_ref() {\n        Some(bin) => println!(\"  dsh binary: {}\", bin.display()),\n        None => println!(\"  dsh binary: not on PATH\"),\n    }\n    println!(\n        \"  dsh version: {} ({})\",\n        report.detection.version.as_deref().unwrap_or(\"unknown\"),\n        report.detection.compatibility.label()\n    );\n    println!(","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/cli.rs#L41-L77","documentation":"Thrown by `confirm` in crates/tui/src/integrations/cli.rs when the user answered the y/N prompt with anything other than y/yes (case-insensitive). The command aborts and nothing is written — this is the explicit user-declined path.","triggerScenarios":"Answering the confirmation prompt with 'n', 'no', Enter (empty), or any other string during an interactive DSH connect/update command.","commonSituations":"User mistypes or presses Enter intending to decline; accidental invocation of a write operation; user changes their mind after seeing the disclosed plan.","solutions":["Re-run the command and answer `y` or `yes` at the prompt to proceed","If decline was intended, no action is needed — nothing was written","Use `--yes` to bypass the prompt entirely if the plan is already reviewed"],"exampleFix":"// before\nProceed? [y/N] n\nerror: not confirmed; nothing was written\n// after\nProceed? [y/N] y\n(ok)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = run_dsh(...) {\n    if e.to_string().contains(\"not confirmed\") {\n        println!(\"Operation declined; nothing changed.\");\n    }\n}","preventionTips":["Answer exactly `y` or `yes` to proceed; Enter means no","Use --yes when the answer is known in advance","Treat this as a no-op: state is unchanged on decline"],"tags":["cli","confirmation","user-declined"],"backgroundTag":"operation-not-supported","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}