Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkgs/atlas-search/crates/atlas-core/src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
//! concatenation the Python's f-strings use (including the double
//! space the empty Turso `sens_join` leaves in two statements): the
//! strings are the contract with the database, and the parity
//! fixtures record them byte-for-byte.
//! fixtures record them byte-for-byte. One named exception to
//! the byte-for-byte claim: the topics/projects LIKE clauses
//! escape `%`, `_`, `\` and carry `ESCAPE '\'` where the Python
//! emits a bare `LIKE ?` (#5375) — see the fixtures README's
//! "Intentional parity deviation" section and #13280.

use serde_json::{Map, Value as Json};

Expand Down
4 changes: 3 additions & 1 deletion pkgs/atlas-search/crates/atlas-core/src/fusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use crate::types::BranchHit;
/// The Python's `fts_match_expr` (the eval3.py hybrid-branch
/// construction): content words OR-joined as quoted phrases. Words
/// >3 chars, plus short tokens containing a digit (r2, s3, b2) which
/// > the >3 rule would otherwise silently drop.
/// > the >3 rule would otherwise silently drop. Retaining those
/// digit-bearing tokens diverges from the Python hybrid
/// construction, which keeps only words >3 chars (#13280).
pub fn fts_match_expr(query: &str) -> Option<String> {
let lower = query.to_lowercase();
let mut words: Vec<String> = Vec::new();
Expand Down
6 changes: 5 additions & 1 deletion pkgs/atlas-search/crates/atlas-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
//! atlas-core — the Atlas corpus-search pipeline as a library
//! (developing-today/code#5352), a semantics-exact port of the
//! production Python `atlas_search.py`.
//! production Python `atlas_search.py` — exact except for the
//! intentional divergences named in #13280 (the topics/projects
//! LIKE escaping, #5375; the FTS digit-token retention in
//! `fusion::fts_match_expr`; and `index_depths` at pool 0), each
//! recorded in the Atlas book's python-implementation reference.
//!
//! Shape: a [`SearchBackend`] (Turso over the HTTPS pipeline
//! API, or a local SQLite publish file) gathers an FTS pool and
Expand Down
6 changes: 6 additions & 0 deletions pkgs/atlas-search/crates/atlas-search/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
//! The one-shot CLI (epic developing-today/code#5350, step 3,
//! #5353): a surface-parity port of the Python `atlas_search.py`'s
//! front-end over atlas-core (step 2) and atlas-embed (step 1).
//! Two surface divergences from the Python are intentional
//! (#13280): search's `--context` defaults to `fleet-internal`
//! (the Python defaults both verbs to `local-owner`), and
//! get-chunk has no `--max-sensitivity` — its ceiling arrives
//! via `--context` (the Python get-chunk takes
//! `--max-sensitivity`, default `secret-bearing`).
//! Standalone is the default and is complete — embed the query
//! in-process, talk to Turso or a local publish file directly.
//! `--via-service` prefers a running service (the step-4 job
Expand Down