Commit graph

37 commits

Author SHA1 Message Date
Yiorgis Gozadinos
fdb5710491
Ask and analyze across several databases
Chunk 2 gave search a configured set to fan out over. ask and analyze
covered one database still: the RAG capability had no way to be told which
databases a question spanned, and the analysis sandbox mounted one
document tree.

The selection travels as sources on EvidenceState, beside the filter it
scopes with, so both capabilities read it the same way. clients_covering
is the one rule that turns a selection into clients, used by search, the
sandbox mount and the cite fallback, so a question scoped to some
databases cannot search, mount or cite another. Citations carry the
database they came from, and format_for_agent names it, so the model can
attribute evidence while it answers rather than only afterwards.

The sandbox keeps one flat /documents/{id}/ namespace and resolves each id
to the client holding it, which rests on ids being UUID4. A database
copied from another breaks that, so an id held twice is refused rather
than resolved to whichever arrived last.

On the CLI, search, ask and analyze cover the configured set and label
each result with its database. Every other command works on one, named
with --database NAME (a name reaches a database behind a URI, which --db
cannot) or --db PATH, and refuses a set it cannot choose from instead of
silently reading the default database. Cold databases open together, so a
first query costs the slowest open rather than their sum.
2026-08-24 10:03:46 +03:00
Yiorgis Gozadinos
7f54eb4dbc
Measure the CLI and its application layer
cli.py carried 40 pragmas over whole command bodies and app.py a
class-level one over all 412 statements, while tests/test_cli.py already
drove 29 commands through CliRunner. The pragmas hid lines the suite
executed, so the 100% gate understated real coverage and gave new CLI code
no scrutiny.

Both are measured now. 38 CLI tests stub HaikuRAGApp and assert the parsed
arguments reach the right method; 60 app tests stub the client and record
the console, pinning what each command asks for and what it prints. The only
pragma left in either file is cli() under __main__. The omit list is back to
the two Textual TUIs.

Three defects the coverage surfaced:

haiku-rag settings masked only top-level secret-named fields, so nested ones
printed in full — lancedb.api_key, providers.docling_serve.api_key, WebDAV
source passwords. It uses redact_secrets, which walks the dump.

chat guarded the wrong thing: haiku.rag.chat imports without Textual, and
run_chat raises when it imports ChatApp, so the missing extra escaped as an
ImportError. The guard is on the call. inspector raises at module import
instead, so inspect keeps its guard on the import; each has a test that
fails the way the real installation fails.

search --limit/--search-type and history --limit default to None so the
config resolves the default. Now pinned.

CI passed --cov=haiku while pyproject declares source = ["haiku_rag_slim"];
pass --cov and let the config decide. build-docs.yml only ran on push to
main, so a broken docs build merged and failed at deploy: build on pull
requests, with configure-pages, upload-pages-artifact and deploy gated to
push, and a per-ref concurrency group.
2026-08-20 13:23:00 +03:00
Yiorgis Gozadinos
6186dae83f
Move ingester telemetry setup behind argument parsing 2026-08-13 11:37:36 +03:00
Lawrence Akka
d4d6414bc4 Similar fix for haiku.rag.ingester, and formatting
- Add regression tests
- Update Changelog
2026-08-12 15:20:11 +01:00
Yiorgis Gozadinos
c62fd78c7a
Accept images on CLI ask/analyze and MCP tools 2026-07-25 10:35:25 +03:00
Yiorgis Gozadinos
f02cde5ddf
Fix same-tick cancellation losing recovery results in _wait_protected 2026-07-16 13:11:35 +03:00
Yiorgis Gozadinos
4522fbdf1b
Add tag restore CLI 2026-07-16 13:11:34 +03:00
Yiorgis Gozadinos
0e271eaf4b
Remove --before/--at time travel 2026-07-16 13:11:33 +03:00
Yiorgis Gozadinos
0813a1c980
Add tag CLI commands and history tag annotations 2026-07-16 13:11:27 +03:00
Yiorgis Gozadinos
7ea61a7b10
drop the old monitor, rename serve→mcp, add e2e tests 2026-05-26 11:42:41 +03:00
Yiorgis Gozadinos
b64d9721bb
Mark with pragma no cover areas that are just wiring. Consolidate tests and bring coverage to 100% 2026-02-13 11:56:37 +02:00
Yiorgis Gozadinos
5aabae4d06
Remove background_context & simplify 2026-01-26 16:42:39 +02:00
Yiorgis Gozadinos
f582552f6a
Add tests for migration scenarios 2026-01-19 14:12:51 +02:00
Yiorgis Gozadinos
1316c89135
docs 2026-01-19 13:30:17 +02:00
Yiorgis Gozadinos
bdfc6b87e7
Rename initial_context to background_context 2026-01-16 15:03:42 +02:00
Yiorgis Gozadinos
2054450142
ChatDeps implements StateHandler protocol for proper AG-UI state management 2026-01-16 15:03:41 +02:00
Yiorgis Gozadinos
bb61e8fab6
Remove custom AG-UI infrastructure in favor of pydantic-ai native support 2026-01-12 12:37:07 +02:00
Yiorgis Gozadinos
f25a949758
Fix tests 2025-12-11 16:05:49 +02:00
Yiorgis Gozadinos
4da50873bd
Make search limit configurable 2025-12-09 11:46:43 +02:00
Yiorgis Gozadinos
33b254ae3d
Always upgrade database on access. Explicitly create db by running init or HaikuRAG(path, create=True) 2025-12-02 16:49:55 +02:00
Yiorgis Gozadinos
9ee64a33e0
Remove A2A from haiku.rag, turn it into an example 2025-11-07 13:31:51 +02:00
Yiorgis Gozadinos
5d88e3b87f
Fix CLI test mocks 2025-11-07 11:52:15 +02:00
Yiorgis Gozadinos
d19d2b7f00
Fix tests 2025-10-31 12:50:08 +02:00
Yiorgis Gozadinos
1cab0339ad
add-src in cli & create_document_from_source will recursively add directories 2025-10-16 09:55:50 +03:00
Yiorgis Gozadinos
1f2552bd6a
Make serve cli command run monitor, mcp or a2a independently 2025-10-13 18:01:24 +03:00
Yiorgis Gozadinos
49eac86259
Add verbose flag to ask 2025-09-30 16:59:36 +03:00
Yiorgis Gozadinos
2dfb1882dd
Deep QA multi-agent 2025-09-30 16:59:36 +03:00
Yiorgis Gozadinos
8f3055d37d
Parse non-strings 2025-09-23 16:42:40 +03:00
Yiorgis Gozadinos
45d0b47a02
Meta in CLI add-src, add 2025-09-23 16:39:27 +03:00
Yiorgis Gozadinos
52ea1ebb70
info command in CLI 2025-09-23 12:20:25 +03:00
Yiorgis Gozadinos
20993b48a7
Fix test after rebase 2025-09-22 12:53:52 +03:00
Yiorgis Gozadinos
4077e3ecb2
Handle title in client & CLI 2025-09-22 12:45:32 +03:00
Yiorgis Gozadinos
dce60fa461
Remove SSE transport, fix cli tests 2025-09-20 10:58:28 +03:00
Yiorgis Gozadinos
0592a7d122
Adapt search to lancedb 2025-09-01 14:56:14 +03:00
Yiorgis Gozadinos
b83596ff07
Basic moving to lancedb. 2025-09-01 14:56:14 +03:00
Yiorgis Gozadinos
842e4a882d
Make citations optional, through cite parameter 2025-08-12 13:19:11 +02:00
Russ Ferriday
94ff11ad25 feat(tests): Add tests for app and cli modules 2025-06-24 23:00:18 +01:00