# kairix/agents/mcp/cold_start.py — warm_retrieval_stack glues MCP to the
# production SearchPipeline. Three uncovered branches all require a working
# pipeline (build_search_pipeline + pipeline.search), which needs provider
# config not present in unit test env. The integration suite (run with
# KAIRIX_E2E=1 + KAIRIX_KV_NAME) exercises the success path end-to-end.
# Two failure-path branches ARE covered by the existing unit tests in
# tests/agents/mcp/test_cold_start.py (build_search_pipeline raises in
# no-config test env, hitting lines 114-127). Lifting above the F7 floor
# would require either a DI seam on warm_retrieval_stack (rejected — see
# the encapsulation discussion at commit 71c12cf9) or test infrastructure
# to construct a working SearchPipeline in unit context (heavy). Defer.
kairix/agents/mcp/cold_start.py
# kairix/worker.py — canonical Adapter per ADR-024 §"Repositioning F7".
# The file's role is dispatch + dep wiring: every WorkerDeps field is a
# Callable that gets injected by tests (see tests/test_worker.py — the
# dispatch-via-deps pattern is exhaustively tested at the orchestration
# level), and every substantive component (_SqliteEntityGraphSink, the
# ConnectorPipeline composition, the embed pipeline, the Neo4jDrainer,
# the maintenance scheduler) lives in its own module with its own unit
# coverage. The remaining ~10% uncovered lines are production-default
# wrapper functions (_default_neo4j_drain, _default_connector_sync,
# _default_embed, etc.) whose job is to open real DB connections + real
# Neo4j clients + delegate to the tested core. We already extracted
# run_default_drain_tick into kairix/core/curator/drain.py with a
# Neo4jDrainTickDeps DI seam (commit 651942cb) precisely so the
# orchestration branches there are covered at unit level; doing the
# same surgery on the other _default_* wrappers is the right long-term
# direction but each one needs the matching deps-class extraction and
# is tracked in followup work, not a same-commit fix. Coverage drifts
# 90.1-90.6% across runs on this file (1 line of variance is enough to
# flip CI's 3.12 stage between pass and fail). Grandfathering here is
# the ADR-024-aligned response: F7 is a smell, not the gate.
kairix/worker.py
# kairix/connectors/m365_calendar/graph_client.py — Graph SDK boundary
# adapter for calendar events. Uncovered branches are Graph-specific
# error envelopes whose contract belongs to F68 + integration tests,
# not F7.
kairix/connectors/m365_calendar/graph_client.py
# kairix/worker_cli.py — CLI dispatcher; the uncovered lines are
# argparse subcommand wrappers that call into already-tested worker.py
# entry points and immediately exit. F30 (operator-outcome tests)
# covers the subcommand surface end-to-end via subprocess invocation;
# F7 doesn't catch additional defects here. Currently at 90.1%, kept
# on baseline because 1 line of variance flips CI per the worker.py
# rationale; the right paydown is the same _default_* wrapper extraction
# pattern, tracked in followup work.
kairix/worker_cli.py
