{"record":{"id":"24e2b0238c76a96c","repo":"tinyhumansai/openhuman","slug":"delivery-channel-is-required-for-announce-mode","errorCode":null,"errorMessage":"delivery.channel is required for announce mode","messagePattern":"delivery\\.channel is required for announce mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/cron/scheduler.rs","lineNumber":1345,"sourceCode":"                    job_id = %job.id,\n                    source = %source,\n                    \"[cron] publishing ProactiveMessageRequested event\"\n                );\n                BUS.publish(DomainEvent::ProactiveMessageRequested {\n                    source,\n                    message: output.to_string(),\n                    job_name: job.name.clone(),\n                });\n            }\n        }\n\n        // Announce delivery — the cron job specifies the exact channel\n        // and target. Used for explicit channel-targeted output.\n        \"announce\" if deliver_to_chat => {\n            let channel = delivery\n                .channel\n                .as_deref()\n                .ok_or_else(|| anyhow::anyhow!(\"delivery.channel is required for announce mode\"))?;\n            let target = delivery\n                .to\n                .as_deref()\n                .ok_or_else(|| anyhow::anyhow!(\"delivery.to is required for announce mode\"))?;\n\n            tracing::debug!(\n                job_id = %job.id,\n                channel = %channel,\n                target = %target,\n                \"[cron] publishing CronDeliveryRequested event\"\n            );\n            BUS.publish(DomainEvent::CronDeliveryRequested {\n                job_id: job.id.clone(),\n                channel: channel.to_string(),\n                target: target.to_string(),\n                output: output.to_string(),\n            });\n        }","sourceCodeStart":1327,"sourceCodeEnd":1363,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/cron/scheduler.rs#L1327-L1363","documentation":"A cron job configured with delivery mode `announce` (explicit channel-targeted output) has no `delivery.channel` value. The scheduler refuses to guess where to announce; the guard fires at dispatch time before the job output is delivered anywhere.","triggerScenarios":"Thrown at src/openhuman/cron/scheduler.rs:1345 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a channel identifier to the job's delivery.channel field","Or switch the delivery mode to one that does not require an explicit channel"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}