You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moved from dezren39/hatch-personal#21 on 2026-11-22 at Drewry's direction (review of hatch/hatch-personal for material that belongs in the code repo). GitHub's native transfer is unavailable (private→public, different owner), so this issue carries the original text verbatim; the original is closed with a pointer here.
Exploration opened by Drew 2026-11-04, after the Snowflake swap landed. Three threads, in the order they should be evaluated:
1. Parallel branch execution (near-term, small)
A hybrid query has independent branches (FTS branch, vector branch, plus filters) that only join at RRF fusion. Today they run effectively serially in the Python CLI. The branches can run concurrently in-process (threads against the libsql endpoint) with results collected until each branch pool is satisfied — no external store needed for the single-user CLI. Expected saving: the vector branch scan (~6 s) overlaps the FTS branch instead of adding to it. Cold-start (ST model load, most of the ~35 s cold run) is untouched by this.
2. Workers + temp result store + pull-until-satisfied (service shape)
Drews sketch: fan queries out to workers running simultaneously; workers write results into a temp store (he said temp D1; our analog is a scratch Turso/libsql DB or an in-memory/RESP-style store); the CLI pulls results until its pools are satisfied (fetch-to-fill as a streaming protocol). This is the right shape IF Atlas becomes shared infrastructure (multiple agents/clients querying constantly, warm embedders, queued deep searches). Cost: a daemon to own, a protocol, lifecycle for temp results. Decision input needed: is Atlas headed for multi-client use (e.g. OpenChamber/fork sessions querying it as a tool), or does it stay Drews personal CLI? Build the service only if the former.
3. Ship atlas-search as a nix-packaged binary
Replace the Python script + venv with a compiled binary vendored from the code flake (pkgs/atlas-search derivation, overlay pattern as elsewhere). Rationale, all observed 2026-11-03: the venv/wrapper broke twice in one evening on LD_LIBRARY_PATH (desktop pipewire path starves numpy of libstdc++/libz; fixed via probe hacks PRs #18/#19), and every cold run pays Python + ST model load. A Rust binary (rusqlite/libsql client + ort + tokenizers) can embed Snowflake natively — the fork spike proved onnxruntime + the Unigram tokenizer reproduce the Python vectors BIT-IDENTICALLY, so parity is achievable and provable. Gate any swap on the golden 311 tying the Python reference (same pattern as the embeddings bake-in). The Python stays as the eval/reference implementation (eval3.py harness).
Sequencing
Thread 1 is independent and small. Thread 3 subsumes thread 1 if it happens (write the binary concurrent from the start). Thread 2 is a product decision (multi-client?) before it is engineering. The index A/B (index-fill vs exact scan) running 2026-11-04 informs all three: whichever vector backend wins on the golden set is the one the binary/service should implement.
Activity
developing-today commentedon Nov 23, 2026
CODE-4730