{"record":{"id":"dd2bc764f9fb7fe5","repo":"atuinsh/atuin","slug":"nonempty-list-of-shells-must-result-in-at-least-on","errorCode":null,"errorMessage":"nonempty list of shells must result in at least one condition","messagePattern":"nonempty list of shells must result in at least one condition","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-client/src/database.rs","lineNumber":158,"sourceCode":"    let nonempty_shells = shells.iter().filter(|s| {\n        let is_empty = s.is_empty();\n        if is_empty {\n            include_null = true;\n        }\n        !is_empty\n    });\n\n    let shell_list = nonempty_shells.map(quote).join(\", \");\n    let mut cond = (!shell_list.is_empty()).then(|| format!(\"shell in ({shell_list})\"));\n\n    if include_null {\n        // `SqlBuilder::and_where` wraps the whole expression in parentheses; we don't need to add\n        // them here.\n        cond = Some(cond.map_or_else(String::new, |s| s + \" OR \") + \"shell IS NULL\");\n    }\n\n    // `OrFilter::items` is always non-empty.\n    sql.and_where(cond.expect(\"nonempty list of shells must result in at least one condition\"));\n}\n\nfn get_session_start_time(session_id: &str) -> Option<i64> {\n    if let Ok(uuid) = Uuid::parse_str(session_id)\n        && let Some(timestamp) = uuid.get_timestamp()\n    {\n        let (seconds, nanos) = timestamp.to_unix();\n        return Some(seconds as i64 * 1_000_000_000 + nanos as i64);\n    }\n    None\n}\n\n/// Controls the type of search [`Sqlite::search`] performs.\n///\n/// This is a narrower set of modes than [`SearchMode`], which also contains modes that apply only\n/// to interactive searches.\n#[derive(Clone, Copy, Debug, PartialEq, Eq)]\npub enum DbSearchMode {","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/atuinsh/atuin/blob/15fe1318f1df51de604262eb50734c9883d48e7b/crates/atuin-client/src/database.rs#L140-L176","documentation":"Error \"nonempty list of shells must result in at least one condition\" thrown in atuinsh/atuin.","triggerScenarios":"Fires when a nonempty shell filter list produces no SQL conditions, indicating an internal query-building bug.","commonSituations":"See trigger scenarios.","solutions":["This is an internal invariant failure; report the bug with the command you ran."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"15fe1318f1df51de604262eb50734c9883d48e7b","analyzedAt":"2026-08-19T08:56:57.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}