{"record":{"id":"978bac8c13b89460","repo":"Hmbown/CodeWhale","slug":"external-credential-consent-cancelled-no-configur","errorCode":null,"errorMessage":"external credential consent cancelled; no configuration was changed","messagePattern":"external credential consent cancelled; no configuration was changed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/cli/src/lib.rs","lineNumber":3977,"sourceCode":"        bail!(\n            \"external credential consent was not saved: non-interactive use requires explicit --yes after reviewing the preview\"\n        );\n    }\n    confirm_external_consent_answer(&mut std::io::stdin().lock(), &mut std::io::stdout().lock())\n}\n\nfn confirm_external_consent_answer(\n    reader: &mut impl std::io::BufRead,\n    writer: &mut impl std::io::Write,\n) -> Result<()> {\n    write!(writer, \"Type 'yes' to grant this exact read-only access: \")?;\n    writer.flush()?;\n    let mut answer = String::new();\n    reader\n        .read_line(&mut answer)\n        .context(\"reading external credential consent confirmation\")?;\n    if answer.trim() != \"yes\" {\n        bail!(\"external credential consent cancelled; no configuration was changed\");\n    }\n    Ok(())\n}\n\nfn yes_no(b: bool) -> &'static str {\n    if b { \"yes\" } else { \"no \" }\n}\n\nfn keyring_status_short(state: Option<bool>) -> &'static str {\n    match state {\n        Some(true) => \"yes\",\n        Some(false) => \"no \",\n        None => \"n/a\",\n    }\n}\n\nfn prompt_api_key(slot: &str) -> Result<String> {\n    use std::io::{IsTerminal, Write};","sourceCodeStart":3959,"sourceCodeEnd":3995,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/cli/src/lib.rs#L3959-L3995","documentation":"The interactive half of the consent flow: `confirm_external_consent_answer` prompts `Type 'yes' to grant this exact read-only access:` and requires the exact string `yes` (after trimming). Any other answer — `y`, `Y`, `no`, Enter, EOF-drained input — cancels the operation before any configuration is changed, and this error reports the clean abort.","triggerScenarios":"Answering the consent prompt with anything other than exactly `yes`; accidental Enter; a terminal that sends the answer without a trailing newline handling; answering `y` out of habit from other confirmation prompts.","commonSituations":"Users used to `y`-style confirmations; scripted expect-like drivers typing the wrong token; changing your mind at the prompt (the intended, safe behavior).","solutions":["Re-run the command and type exactly `yes` at the prompt","Use `--yes` to skip the interactive prompt entirely in trusted contexts","For automation, drive the prompt with the literal string: `printf 'yes\\n' | codewhale ...` only when stdin-interactive is desired — prefer `--yes`"],"exampleFix":"# before\nType 'yes' to grant this exact read-only access: y\n# external credential consent cancelled; no configuration was changed\n\n# after\nType 'yes' to grant this exact read-only access: yes","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\n# skip the fragile interactive token entirely when the grant is intentional\nexec codewhale external-credentials --provider grok --mode read-only --yes","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Answer with the exact string `yes` (not `y`, not `YES`)","In expect-style drivers, assert on the 'Type 'yes'' prompt and send exactly `yes\\n`"],"tags":["consent","interactive-prompt","cancelled","cli"],"backgroundTag":"user-confirmation-declined","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}