From b3c8a60ce45ef67d721677259a13986bb3ca3b0c Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Mon, 23 Nov 2026 07:25:34 -0600 Subject: [PATCH] docs(atlas): name the intentional Python divergences in the parity claims The atlas-core crate header claimed a semantics-exact port and the filters header claimed byte-for-byte fixture parity without naming the exceptions the book survey recorded in #13280. The headers and the fts_match_expr doc now name them: the topics/projects LIKE escaping (#5375), the FTS digit-token retention, index_depths at pool 0, and the CLI surface's two divergences (search --context default, get-chunk without --max-sensitivity). Comment-only; no behaviour changes. --- pkgs/atlas-search/crates/atlas-core/src/filters.rs | 6 +++++- pkgs/atlas-search/crates/atlas-core/src/fusion.rs | 4 +++- pkgs/atlas-search/crates/atlas-core/src/lib.rs | 6 +++++- pkgs/atlas-search/crates/atlas-search/src/main.rs | 6 ++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pkgs/atlas-search/crates/atlas-core/src/filters.rs b/pkgs/atlas-search/crates/atlas-core/src/filters.rs index 7601d8c075..9cf549ac59 100644 --- a/pkgs/atlas-search/crates/atlas-core/src/filters.rs +++ b/pkgs/atlas-search/crates/atlas-core/src/filters.rs @@ -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}; diff --git a/pkgs/atlas-search/crates/atlas-core/src/fusion.rs b/pkgs/atlas-search/crates/atlas-core/src/fusion.rs index c30178b0a5..28265dbdd4 100644 --- a/pkgs/atlas-search/crates/atlas-core/src/fusion.rs +++ b/pkgs/atlas-search/crates/atlas-core/src/fusion.rs @@ -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 { let lower = query.to_lowercase(); let mut words: Vec = Vec::new(); diff --git a/pkgs/atlas-search/crates/atlas-core/src/lib.rs b/pkgs/atlas-search/crates/atlas-core/src/lib.rs index 7c25098ccf..97e4448341 100644 --- a/pkgs/atlas-search/crates/atlas-core/src/lib.rs +++ b/pkgs/atlas-search/crates/atlas-core/src/lib.rs @@ -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 diff --git a/pkgs/atlas-search/crates/atlas-search/src/main.rs b/pkgs/atlas-search/crates/atlas-search/src/main.rs index d81c26edcd..e84dc4696d 100644 --- a/pkgs/atlas-search/crates/atlas-search/src/main.rs +++ b/pkgs/atlas-search/crates/atlas-search/src/main.rs @@ -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