{"record":{"id":"14cac830012beaa1","repo":"Hmbown/CodeWhale","slug":"fire-at-must-be-in-the-future-got-now-is","errorCode":null,"errorMessage":"fire_at must be in the future (got {}, now is {})","messagePattern":"fire_at must be in the future \\(got (.+?), now is (.+?)\\)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/automation_manager.rs","lineNumber":1860,"sourceCode":"                if matches!(\n                    run.status,\n                    AutomationRunStatus::Queued | AutomationRunStatus::Running\n                ) && run.task_id.is_some()\n                {\n                    pending.push(run);\n                }\n            }\n        }\n        Ok(pending)\n    }\n\n    // ── Delayed-trigger storage methods ──────────────────────────────────\n\n    /// Persist a new delayed trigger and return the record.\n    pub fn create_trigger(&self, req: CreateDelayedTriggerRequest) -> Result<DelayedTriggerRecord> {\n        let now = Utc::now();\n        if req.fire_at <= now {\n            bail!(\n                \"fire_at must be in the future (got {}, now is {})\",\n                req.fire_at.to_rfc3339(),\n                now.to_rfc3339()\n            );\n        }\n        if req.message.trim().is_empty() {\n            bail!(\"Trigger message must not be empty\");\n        }\n        let record = DelayedTriggerRecord {\n            schema_version: CURRENT_TRIGGER_SCHEMA_VERSION,\n            execution_scope: self.execution_scope.clone(),\n            trigger_id: format!(\"trig_{}\", Uuid::new_v4().simple()),\n            fire_at: req.fire_at,\n            message: req.message.trim().to_string(),\n            workspace: req.workspace,\n            owner_session_id: req.owner_session_id,\n            status: DelayedTriggerStatus::Pending,\n            created_at: now,","sourceCodeStart":1842,"sourceCodeEnd":1878,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/automation_manager.rs#L1842-L1878","documentation":"create_trigger validation: the requested fire_at is not strictly in the future; delayed triggers that would fire immediately or in the past are rejected, and the message carries both the requested and current RFC3339 times for diagnosis.","triggerScenarios":"Thrown at crates/tui/src/automation_manager.rs:1860 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Compute fire_at from a future instant (e.g. Utc::now() + duration) at submission time, accounting for clock skew.","Retry submission with a fresh timestamp if the reject came from a slow path between computing fire_at and calling create_trigger."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}