{"record":{"id":"9cd720f76f89f4f7","repo":"zeroclaw-labs/zeroclaw","slug":"transcription-max-audio-bytes-must-be-greater-than","errorCode":null,"errorMessage":"transcription.max_audio_bytes must be greater than zero","messagePattern":"transcription\\.max_audio_bytes must be greater than zero","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/transcription.rs","lineNumber":939,"sourceCode":"impl TranscriptionManager {\n    /// Empty manager with no providers. Used as a base when only typed\n    /// `[providers.transcription.<family>.<alias>]` config is present and\n    /// there is no legacy `[transcription]` block to seed from.\n    pub fn empty() -> Self {\n        Self {\n            transcription_providers: HashMap::new(),\n            max_audio_bytes: None,\n            agent_transcription_provider: String::new(),\n        }\n    }\n\n    /// Build a `TranscriptionManager` from a `TranscriptionConfig`. The\n    /// resolved agent alias starts empty; orchestrators that wire the\n    /// manager to a specific agent should call\n    /// `with_agent_transcription_provider` to set it.\n    pub fn new(config: &TranscriptionConfig) -> Result<Self> {\n        if matches!(config.max_audio_bytes, Some(0)) {\n            bail!(\"transcription.max_audio_bytes must be greater than zero\");\n        }\n\n        let mut transcription_providers: HashMap<String, Box<dyn TranscriptionProvider>> =\n            HashMap::new();\n\n        Self::register_legacy_providers(&mut transcription_providers, config);\n\n        if config.enabled && transcription_providers.is_empty() {\n            bail!(\n                \"Transcription is enabled but no transcription provider registered \\\n                 successfully. Configure at least one of: [transcription] (Groq) \\\n                 with api_key + api_url; [transcription.openai]; [transcription.deepgram]; \\\n                 [transcription.assemblyai]; [transcription.google]; [transcription.local_whisper]; \\\n                 or [providers.transcription.<type>.<alias>].\"\n            );\n        }\n\n        Ok(Self {","sourceCodeStart":921,"sourceCodeEnd":957,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/transcription.rs#L921-L957","documentation":"TranscriptionManager::new() rejects a TranscriptionConfig where max_audio_bytes is Some(0). Zero is treated as a misconfiguration, not as 'unlimited' — to have no global limit, the key must be absent (None). The check runs before any provider registration, so the manager is never constructed with this value.","triggerScenarios":"Constructing TranscriptionManager::new(&config) with zeroclaw.toml containing transcription.max_audio_bytes = 0.","commonSituations":"A user writes max_audio_bytes = 0 intending 'no limit' or 'disabled'; a templating/env substitution produces 0 when the variable is unset; copying an example config that used 0 as a placeholder.","solutions":["Remove the transcription.max_audio_bytes key entirely to disable the global limit","Or set it to the intended positive byte value, e.g. 26214400 (25 MB)"],"exampleFix":"# before\n[transcription]\nenabled = true\nmax_audio_bytes = 0\n\n# after (no global limit)\n[transcription]\nenabled = true","handlingStrategy":"validation","validationCode":"// Validate before constructing the manager\nfn transcription_config_ok(cfg: &TranscriptionConfig) -> bool {\n    !matches!(cfg.max_audio_bytes, Some(0))\n}","typeGuard":"fn transcription_config_ok(cfg: &TranscriptionConfig) -> bool {\n    !matches!(cfg.max_audio_bytes, Some(0))\n}","tryCatchPattern":null,"preventionTips":["Treat 0 as invalid everywhere in config tooling — omit the key to mean unlimited","Add a config-lint rule that rejects transcription.max_audio_bytes = 0 before deploy"],"tags":["config","validation","transcription","startup"],"backgroundTag":"config-validation-failed","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}