arborist/tests
russell@unturf.com 5fdd573c0a
qa/corpus_query: multi-route retrieval when policy.multi_route=True (6c)
When the caller passes policy={"multi_route": True}, run_query now
fans out across four retrieval routes in parallel and merges:

  1. fts_body          — body BM25 (the only route in pre-6c)
  2. fts_title         — title-only BM25 via documents_fts
  3. fts_phrase        — verbatim 4-gram phrase MATCH; closes the
                         allusion gap ("always been at war" → 1984)
  4. core_keyword_match — TF-IDF core route for neologisms

Each route is fail-open: NotSupportedError → []. core_keyword
returns [] on SidecarBucketCorpus (no derivations in slim sidecar);
phrase / title / body all work cloud-side via the slim FTS5 sidecar.

Merge by MIN bm25 per document_root (FTS5 returns negative; lower
wins). core_keyword's positive match_count scores are kept only as
a tiebreaker when no FTS5 route surfaced that doc — handled
explicitly via score-sign discrimination since the scales are
incomparable.

Lifted helper: question_phrases(question, n=4) from query.py's
_question_phrases into arborist.qa.retrieval_routes — pure-stdlib
n-token window extractor, no stopword stripping (the diagnostic
signal IS the stopword).

policy=None / policy={} (no multi_route flag) keep the existing
body-only path — byte-identity gate from step 5 still green. 263
existing tests + 1 new multi-route test pass.

Still missing for full legacy parity: filter_by_title_relevance
integration in run_query (the 5-accept-path filter is available in
retrieval_routes.py since step 3 but isn't wired into the
orchestrator yet). That's the next sub-step — without it, the
multi-route merge over-recalls on noisy title overlaps.
2026-05-31 12:48:35 -04:00
..
crawler fix+perf: fast-mode ignores crawl-delay; shared session; drop HEAD 2026-05-22 06:55:32 -04:00
fixtures tests/byte_identity: pin cache_key inputs as Phase 2 safety gate 2026-05-31 12:27:03 -04:00
__init__.py phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00
test_accent_fold.py feat(retrieval): accent-fold (+30pp recall@1) + fold-search factory hardening 2026-05-18 19:23:22 -04:00
test_aliases.py tests/aliases: gap-fill list_term_aliases + tokenizer helpers (10 new tests) 2026-05-10 12:35:33 -04:00
test_anchor_prg.py ticket #000035: flip φ_PRG counter big-endian → little-endian to match v7 TLV 2026-05-11 07:47:35 -04:00
test_audit_chain_concurrency.py store: append_audit atomic head-read+insert — no audit-chain forks 2026-05-11 08:29:57 -04:00
test_bench_batteries.py #000048 step 2.4 — parse_pointer_claims clause segmentation 2026-05-11 17:09:06 -04:00
test_bench_qa_sweep.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_burn.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_burn_doc.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_canonical_cache.py #000027 + #000028: canonical projections persist; STRICT-WITNESSED reachable 2026-05-09 11:37:06 -04:00
test_canonical_projection.py ticket #000030 Phases 1+2: algebra-symbolic@v1 + calculus-derivative@v1 2026-05-09 12:35:18 -04:00
test_capital.py capital: land ticket #000020 (8-capital-form cost ledger) 2026-05-07 16:41:48 -04:00
test_claim_lattice.py #000048 step 2.4 — parse_pointer_claims clause segmentation 2026-05-11 17:09:06 -04:00
test_claim_pack.py ticket #000029: claim-pack source for axiom/theorem JSON bundles 2026-05-09 11:44:08 -04:00
test_cli_render.py crawl central-db + query auto-include + read-seam provenance 2026-05-29 13:45:47 -04:00
test_cli_session.py tests: unit + integration + functional coverage for this session's surface 2026-05-07 21:15:14 -04:00
test_cli_smoke.py arborist controller-events: read-only inspector for #000037 Phase 2 rows 2026-05-10 19:25:54 -04:00
test_cold_object.py #000061: fold 3 gaps from Dav1d review (manifest/latest, license_class, cold_pending) 2026-05-26 10:50:57 -04:00
test_cold_object_boto3.py feat: #000061 cold-pack distribution tier (boto3 S3-compat + DVD-R safe-fit) 2026-05-25 20:23:44 -04:00
test_cold_unpack_routed.py cold pack: --jit-blobs mode for online JIT consumer flow 2026-05-30 07:19:01 -04:00
test_compress.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_concepts.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_concepts_extract.py #000054: acronym-parens concept extractor (closes abbreviation→expansion retrieval gap) 2026-05-13 07:00:25 -04:00
test_content_tokens.py #000053: acronym-aware verifier content tokens 2026-05-12 19:41:47 -04:00
test_corpus_shard_count_meta.py #000065 step 1: routing helper + meta field + pre-migration snapshot 2026-05-26 13:13:44 -04:00
test_crosslang_guard.py feat: cross-language Q&A (Operation Sandwich) + Windows quickstart — all default-OFF 2026-05-18 12:12:23 -04:00
test_dag.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_demo_plot.py fan-out: witness audit + 5F extractor + function-sampled demo + docs 2026-05-09 13:19:30 -04:00
test_directives.py #000027 + #000028: canonical projections persist; STRICT-WITNESSED reachable 2026-05-09 11:37:06 -04:00
test_distill.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_distill_recursive.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_doc_counts.py test_doc_counts: AUTOCOUNT db-where supports *: glob for corpus-wide claims 2026-05-31 11:37:39 -04:00
test_embed.py feat: arborist.embed — supported library-embedding surface 2026-05-22 13:03:15 -04:00
test_entity_mask.py feat: cross-language Q&A (Operation Sandwich) + Windows quickstart — all default-OFF 2026-05-18 12:12:23 -04:00
test_evict.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_fivef_threshold_calibration.py #000047 — close: delta_aggregator knob on ForkScore (Option D) 2026-05-11 08:27:38 -04:00
test_fork_score.py #000047 — close: delta_aggregator knob on ForkScore (Option D) 2026-05-11 08:27:38 -04:00
test_frame.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_grok_source.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_honorific_brit_fold.py feat(retrieval): honorific-fold + brit-fold — fold-search batch 3 (both measured wins) 2026-05-18 19:32:03 -04:00
test_html_source.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_ingest.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_inspect.py test: fix the new acronym sub-cases — DNA-stands-for-DNA doesn't use a recognized copula (drop bogus sub-assertion); add FBI-acronym variant to demonstrate all-caps coverage 2026-05-13 13:10:54 -04:00
test_journal.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_judge_code.py feat(#000057): stronger code judge — resolve HYBRID with verified quote + on-topic 2026-05-21 13:10:01 -04:00
test_keys.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_llm_context_base.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_loss_report.py loss_report: land ticket #000022 (adapter LossReport sidecar) 2026-05-07 17:58:50 -04:00
test_memory_root.py memory: land ticket #000017 (memory-root lifelong learning summary) 2026-05-07 16:46:41 -04:00
test_merkle.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_mesh.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_mesh_aead.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_mesh_chain.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_mesh_cli.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_mesh_cli_pull.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_mesh_wire.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_mesh_wire_e2e.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_metacognition.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_migrate_executor.py #000065 follow-up #48: WAL checkpoint between executor phases 2026-05-26 15:34:40 -04:00
test_migrate_planner.py #000065 step 2: hydration planner (pure compute, no execution yet) 2026-05-26 13:21:18 -04:00
test_migration_audit_mode.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_missed_answer_guard.py #000068 Phase 2+3: bench + opt-in demote flag for missed-answer guard 2026-05-27 10:40:35 -04:00
test_nli_shadow.py #000049 §7 #22: speedup (batch + cuda auto-detect + ONNX-int8 export) + the gate-item-4 verdict at proper n 2026-05-12 17:21:32 -04:00
test_numeral_fold.py feat(retrieval): numeral-fold (ordinal-word <-> Roman) + mined ground-truth eval instrument 2026-05-18 15:16:10 -04:00
test_operation_sandwich.py feat: cross-language Q&A (Operation Sandwich) + Windows quickstart — all default-OFF 2026-05-18 12:12:23 -04:00
test_phi_alignment_probe.py tests: rename v8 → substrate + close 9-item checklist gaps across 3 files 2026-05-10 13:35:52 -04:00
test_pi_star.py fan-out: 5 π* graduations close the registry chapter 2026-05-09 13:04:43 -04:00
test_pi_star_algebra_symbolic.py ticket #000030 Phases 1+2: algebra-symbolic@v1 + calculus-derivative@v1 2026-05-09 12:35:18 -04:00
test_pi_star_algebra_symbolic_simplified.py ticket #000030 Phases 1b+3 + open #000031 2026-05-09 12:50:46 -04:00
test_pi_star_arithmetic.py tests/pi_star_arithmetic: 56 KATs for exact-rational arithmetic kernel 2026-05-10 15:54:37 -04:00
test_pi_star_calculus_derivative.py ticket #000030 Phases 1+2: algebra-symbolic@v1 + calculus-derivative@v1 2026-05-09 12:35:18 -04:00
test_pi_star_calculus_integral.py ticket #000030 Phases 1b+3 + open #000031 2026-05-09 12:50:46 -04:00
test_pi_star_code.py tests/pi_star_code: 32 KATs for Python-AST kernel 2026-05-10 15:54:49 -04:00
test_pi_star_combinatorics.py ticket #000032: combinatorics@v1 π* (pure-integer counting kernel) 2026-05-09 13:20:29 -04:00
test_pi_star_compositions.py fan-out: close #000030 · composition fixtures · witness end-to-end 2026-05-09 13:29:59 -04:00
test_pi_star_logic.py tests/pi_star_logic: 53 KATs for propositional CNF kernel 2026-05-10 15:54:43 -04:00
test_pi_star_phase_3_to_7.py fan-out: 5 π* graduations close the registry chapter 2026-05-09 13:04:43 -04:00
test_pi_star_protocol_and_registry.py tests/pi_star: 21 tests for protocol + registry (foundation, was untested) 2026-05-10 12:44:13 -04:00
test_pi_star_tabular.py fan-out: 5 π* graduations close the registry chapter 2026-05-09 13:04:43 -04:00
test_pi_star_time_series.py tests/pi_star_time_series: 35 KATs for temporal-signal kernel 2026-05-10 15:54:55 -04:00
test_prometheus.py #000037 Phase 1.c: kernel_cost/llm_cost split + sweep_weights profile 2026-05-10 18:29:37 -04:00
test_prometheus_audit.py #000037 follow-through: persist falsification proposals + harvest live stream 2026-05-10 19:40:00 -04:00
test_prometheus_trigger_probe.py #000012 Phase 1c follow-through: wire #000037 §12 Trigger 1 probe to fork_score_branches 2026-05-11 06:56:09 -04:00
test_providence_source.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_qa.py qa: providence_cache INSERT — ON CONFLICT(cache_key) DO NOTHING 2026-05-11 17:29:12 -04:00
test_qa_corpus.py qa/corpus: wire fts_title (documents_fts) + fts_phrase (FTS5 phrase MATCH) 2026-05-31 11:21:57 -04:00
test_qa_corpus_functional.py wallet/fts-sidecar: real FTS5 in the cloud sidecar; delete custom BM25 2026-05-31 10:43:03 -04:00
test_qa_corpus_integration.py wallet/fts-sidecar: real FTS5 in the cloud sidecar; delete custom BM25 2026-05-31 10:43:03 -04:00
test_qa_corpus_query.py qa/corpus_query: multi-route retrieval when policy.multi_route=True (6c) 2026-05-31 12:48:35 -04:00
test_qa_progress.py tests/qa/progress: 31 tests for Progress emitter (was zero coverage) 2026-05-10 12:45:32 -04:00
test_qa_prompts.py tests/qa/prompts: 20 tests pinning load-bearing system prompts (was zero coverage) 2026-05-10 12:50:20 -04:00
test_qa_quality_live.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_quantifier_caps.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_quantifier_classifier.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_quantifier_phase4.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_quantifier_reminder.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_query.py crawl central-db + query auto-include + read-seam provenance 2026-05-29 13:45:47 -04:00
test_qwen_thinking_default.py fix: Qwen3 defaults to enable_thinking=False — was returning empty answers 2026-05-21 12:50:05 -04:00
test_read.py crawl central-db + query auto-include + read-seam provenance 2026-05-29 13:45:47 -04:00
test_reclassify.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_relevance_shadow.py #000052: more tests for §3.1 + §3.2 — bench-max the detectors against real data 2026-05-13 12:38:09 -04:00
test_repair.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_resume.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_run_query_byte_identity.py tests/byte_identity: pin cache_key inputs as Phase 2 safety gate 2026-05-31 12:27:03 -04:00
test_search_fts5.py search/fts5: progressive-AND fallback + DF filter at OR-pool 2026-05-09 18:31:24 -04:00
test_search_vec.py ticket #000039: --quant {float32,int8} + int8 head-to-head 2026-05-11 13:16:51 -04:00
test_selfmodel.py selfmodel: land ticket #000014 (identity record + falsification) 2026-05-07 16:36:34 -04:00
test_selfmodel_chain.py #000025 §10.11 + §10.13 + §10.14 — close the 5F battery 2026-05-11 07:41:37 -04:00
test_session_integration.py #000025 Phase 1e: 5F falsification motif coverage (§10.12 closed) 2026-05-10 16:04:34 -04:00
test_session_migrations.py tests: unit + integration + functional coverage for this session's surface 2026-05-07 21:15:14 -04:00
test_shard_routing.py #000065 step 1: routing helper + meta field + pre-migration snapshot 2026-05-26 13:13:44 -04:00
test_snapshot.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_soft_preflight.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_store_migration_concurrency.py store: idempotent forward migrations — survive concurrent connect() 2026-05-11 07:28:35 -04:00
test_store_migration_memoization.py store: idempotent forward migrations — survive concurrent connect() 2026-05-11 07:28:35 -04:00
test_substrate_fork_score.py tests: rename v8 → substrate + close 9-item checklist gaps across 3 files 2026-05-10 13:35:52 -04:00
test_t3_bound_calculator.py ticket #000036: add KAT-regen tooling + close 2026-05-11 08:02:25 -04:00
test_tasks_runner.py feat: cross-language Q&A (Operation Sandwich) + Windows quickstart — all default-OFF 2026-05-18 12:12:23 -04:00
test_textbook_tex.py textbooks: TeX-source ingest closes pillars I + IV (Hilbert + Boole) 2026-05-09 16:06:53 -04:00
test_textbooks_manifest.py tests/textbooks_manifest: 43 tests for license-discipline gate (was zero coverage) 2026-05-10 13:02:17 -04:00
test_tfidf.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_title_token_provenance.py fix(provenance): bind title-token fold set into run-DAG retrieval plan (Dav1d review 2026-05-19) 2026-05-19 07:34:16 -04:00
test_vcs_source.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_verify.py #000048 step 2.1 — verify_quotes entity salient-token-disagreement gate 2026-05-11 13:57:45 -04:00
test_verify_json.py feat(#000057): arborist+qwen enablement — multi-engine JSON-schema + per-model extras pass-through 2026-05-19 19:53:00 -04:00
test_version_lineage.py feat: version-lineage report in the crawler ingestion pipeline 2026-05-21 18:22:45 -04:00
test_versioned_ingest.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_wallet_bucket.py cloud ask: unified multi-shard via bucket manifest + read-ahead tuning 2026-05-30 13:33:58 -04:00
test_wallet_spv.py wallet: client-side quote verification on cryptographically authenticated chunks 2026-05-30 07:47:24 -04:00
test_warrant.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_warrant_authorship.py fan-out: warrant ladder wiring · witness follow-ups · 5F Phase 1d 2026-05-09 12:42:56 -04:00
test_warrant_chain.py ticket #000031 Phase 3: warrant-chain-aware verifier suppresses WARRANT_MISSING 2026-05-10 09:17:48 -04:00
test_warrant_resolver.py ticket #000031 follow-ups B-1 + B-2: alias attribution + source-side title author 2026-05-10 09:35:49 -04:00
test_watt_cogs.py feat(#000057): bench/watt_calibrate.py — separate prefill vs decode energy 2026-05-21 11:48:36 -04:00
test_weights.py #000047 — close: delta_aggregator knob on ForkScore (Option D) 2026-05-11 08:27:38 -04:00
test_wikipedia_old.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_wikipedia_xml.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_wikitext.py aborist/arborist 2026-05-07 09:31:49 -04:00
test_witness.py fan-out: warrant ladder wiring · witness follow-ups · 5F Phase 1d 2026-05-09 12:42:56 -04:00
test_witness_to_5f.py fan-out: witness audit + 5F extractor + function-sampled demo + docs 2026-05-09 13:19:30 -04:00
test_world_namespace.py #000013 closed: v7-W spatial-temporal substrate paper + namespace 2026-05-09 15:00:05 -04:00