{"record":{"id":"74eda9fff16a163c","repo":"block/buzz","slug":"invalid-channel-uuid-e","errorCode":null,"errorMessage":"invalid --channel UUID: {e}","messagePattern":"invalid --channel UUID: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/buzz-admin/src/main.rs","lineNumber":662,"sourceCode":"        }\n        None => {\n            let k = Keys::generate();\n            eprintln!(\n                \"Warning: no relay key provided — using ephemeral key {}\",\n                k.public_key().to_hex()\n            );\n            eprintln!(\"Events signed with this key won't be verifiable after this run.\");\n            eprintln!(\"Pass --relay-key or set BUZZ_RELAY_PRIVATE_KEY for production use.\");\n            k\n        }\n    };\n\n    let tenant = resolve_admin_tenant(&db).await?;\n    let target_channel = channel_arg\n        .as_deref()\n        .map(uuid::Uuid::parse_str)\n        .transpose()\n        .map_err(|e| anyhow::anyhow!(\"invalid --channel UUID: {e}\"))?;\n    let channels = if let Some(target) = target_channel {\n        vec![db\n            .get_channel(tenant.community(), target)\n            .await\n            .map_err(|_| {\n                anyhow::anyhow!(\"channel {target} not found in community {}\", tenant.host())\n            })?]\n    } else {\n        db.list_channels(tenant.community(), None).await?\n    };\n    if channels.is_empty() {\n        println!(\"No channels in database.\");\n        return Ok(());\n    }\n\n    let mut reconciled = 0u32;\n    let mut skipped = 0u32;\n","sourceCodeStart":644,"sourceCodeEnd":680,"githubUrl":"https://github.com/block/buzz/blob/ef2aa1ae38fadcc0bc22b8bf6ed96b35933146be/crates/buzz-admin/src/main.rs#L644-L680","documentation":"reconcile-channels parses its --channel argument with uuid::Uuid::parse_str, which accepts only the canonical 8-4-4-4-12 lowercase-or-uppercase hexadecimal form. Braces, a 'urn:uuid:' prefix, a '0x' prefix, missing hyphens, or a non-hex character all fail and are wrapped as 'invalid --channel UUID'. The value expected is the channel's database UUID (the same string used in the events' d tags), not the channel name.","triggerScenarios":"Passing --channel general (a name), --channel {6f1c...} (braces), --channel 6f1c... without hyphens, or an id copied with a leading/trailing space.","commonSituations":"Confusing channel names with channel ids; ids pasted from JSON with quotes; UUIDs reformatted by spreadsheets (hyphens stripped).","solutions":["Get the exact id: SELECT id, name FROM channels; or use the channels list command output.","Pass the hyphenated 36-char form: --channel 6f1c2e34-....","Strip surrounding quotes/braces/whitespace from the copied value.","If you meant a whole-community reconcile, omit --channel entirely."],"exampleFix":"# before\nbuzz-admin reconcile-channels --channel general\nbuzz-admin reconcile-channels --channel \"{6f1c2e34-...}\"\n# after\nbuzz-admin reconcile-channels --channel 6f1c2e34-9ab1-4c2e-8d3f-000000000000","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"fn is_canonical_uuid(s: &str) -> bool {\n    let h = s.trim().trim_matches(|c| c == '{' || c == '}');\n    h.len() == 36\n        && h.as_bytes().iter().enumerate().all(|(i, b)| match i {\n            8 | 13 | 18 | 23 => *b == b'-',\n            _ => b.is_ascii_hexdigit(),\n        })\n}","tryCatchPattern":null,"preventionTips":["Always copy channel ids from `SELECT id, name FROM channels` or the channels list output, never by hand.","In scripts, reject channel arguments that fail the canonical-UUID shape check before calling the CLI.","Remember --channel takes the DB UUID, not the channel name and not an event id."],"tags":["buzz-admin","uuid","cli-usage","validation","reconcile-channels"],"backgroundTag":"invalid-uuid","analyzedSha":"ef2aa1ae38fadcc0bc22b8bf6ed96b35933146be","analyzedAt":"2026-08-20T04:38:24.874Z","contentChangedAt":"2026-08-20T04:38:24.874Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}