atuinsh/atuin · error
bug in search query. please report
Error message
bug in search query. please report
What it means
Error "bug in search query. please report" thrown in atuinsh/atuin.
Solutions
- This is an internal search query bug; report it with the query you used.
When it happens
Trigger: Fires when the search query path hits an inconsistent internal state, indicating an internal bug to report.
Common situations: See trigger scenarios.
AI-assisted analysis of atuinsh/atuin@15fe1318f1 (2026-08-19).
Data as JSON: /api/errors/2acb5356f80c99f2.
Report an issue: GitHub.
Appendix: source
Thrown at crates/atuin-client/src/database.rs:702
}
if let Some(after) = filter_options.after {
let parsed =
interim::parse_date_string(after, OffsetDateTime::now_utc(), interim::Dialect::Uk)
.map_err(|e| {
sqlx::Error::Decode(format!("invalid `after` filter {after:?}: {e}").into())
})?;
sql.and_where_gt("timestamp", quote(parsed.unix_timestamp_nanos() as i64));
}
apply_author_filter(&mut sql, filter_options.authors);
apply_shell_filter(&mut sql, filter_options.shells);
sql.and_where_is_null("deleted_at");
// sql_builder inlines every bound value, so the inner query carries no
// positional parameters and is safe to embed (twice) as a derived table.
let inner = sql.sql().expect("bug in search query. please report");
let inner = inner.trim().trim_end_matches(';');
let order = if filter_options.reverse {
"ASC"
} else {
"DESC"
};
let tail = match (filter_options.limit, filter_options.offset) {
(Some(limit), Some(offset)) => format!(" LIMIT {limit} OFFSET {offset}"),
(Some(limit), None) => format!(" LIMIT {limit}"),
// SQLite requires a LIMIT before OFFSET; -1 means "no limit".
(None, Some(offset)) => format!(" LIMIT -1 OFFSET {offset}"),
(None, None) => String::new(),
};
// Deduplicate by keeping, for each command, only its most recent entry
// within the filtered set. Expressed as a correlated NOT EXISTS ratherView on GitHub (pinned to 15fe1318f1)