How to validate the parts of this platform that cannot be verified with mocks, and what each one needs before it can run.
This document owns the opt-in live-test runbook. The mocked suite and
its rules are CLAUDE.md §7; what state each capability is
in is docs/architecture/feature-inventory.md.
Live tests live in tests/live/, are marked live, and
are deselected by default:
# pyproject.toml
addopts = "-m 'not live'"
So pytest — and CI — stays fully mocked: no real database, no Ollama, no
network. Opt in explicitly:
pytest -m live tests/live/ # everything configured
pytest -m live tests/live/ -k WebSearch # one provider
pytest -m live tests/live/ -rs # show why things skipped
Each test skips by name when its configuration is absent:
SKIPPED tests/live/conftest.py:40: live test needs WEB_SEARCH_API_KEY
-- see docs/LIVE_INTEGRATION_TESTING.md
That matters more than it looks: the failure mode to avoid is a live test that passes because the thing it was checking silently degraded to a no-op.
Every live test is read-only. No test here writes to, sends from, or modifies anything in an external system. A live test that mutated a tenant’s data would be one nobody could safely run.
tests/conftest.py strips every env var a
Settings field could read, so a mocked test never inherits a developer’s
real .env. That is right for the mocked suite and wrong here, so
tests/live/conftest.py snapshots the real environment at import and
reads from that snapshot.
| Area | Needs | What it proves |
|---|---|---|
| Web search | WEB_SEARCH_API_KEY |
Tavily returns well-formed results and honours WEB_SEARCH_MAX_RESULTS — a provider ignoring the cap is a cost surprise only a live call reveals |
| Document / policy RAG | RAG_STORE_CONNECTION_STRING |
the store is reachable and the server supports the VECTOR type — the one thing that cannot be mocked, and the reason these are “blocked” rather than merely “off” |
| REST connector | REST_ALLOWED_HOSTS, LIVE_REST_TEST_URL |
a declared endpoint is reachable, and the SSRF guard refuses an internal host against real DNS |
| MCP client | LIVE_MCP_COMMAND (± LIVE_MCP_ARGS) |
the handshake completes against a real server, and an un-allowlisted tool is still refused |
| Ollama | OLLAMA_HOST |
the configured model is actually installed |
The MCP handshake test is the highest-value one here. The protocol revision that client implements is spec-verified but never exercised against a real server — a live run either agrees or raises a clear version error.
There are no SharePoint, OneDrive, Dataverse, Outlook or Teams
connectors in this repository. A keyword sweep returns zero
implementation files; see
feature-inventory.md §4. So there is
nothing to integration-test yet, and this document does not pretend
otherwise.
What this section is for: making the work config-shaped rather than design-shaped when credentials arrive.
data-source-matrix.md §5.Every scope below was cited to Microsoft Learn on 2026-10-14 and is marked
VERIFY AT IMPLEMENTATION — permission tables change, and several
findings came from pages of mixed age.
| Source | Candidate scopes | Note |
|---|---|---|
| SharePoint / OneDrive | Files.Read.All, Sites.Read.All (delegated) |
Sites.* is unsupported for personal Microsoft accounts |
| Dataverse | {environmentUrl}/user_impersonation |
the scope must target the specific environment URL; a generic admin host returns 401 |
| Outlook | Mail.Read (delegated only) |
app-only grants every mailbox in the tenant |
| Teams | ChannelMessage.Read.All, Chat.Read.All |
⚠ see below |
Not scheduled, and not merely deprioritised:
chatMessage reference shows a 402 when an E5 or Communications
service plan requirement is unmet.Revisit only if an owner accepts re-implementing membership checks and completes the approval process.
When a connector is built, it gets a class in
tests/live/test_live_connectors.py
following the existing pattern:
@pytest.mark.live
class TestLiveSharePoint:
def test_connection_is_healthy(self): ...
def test_search_returns_evidence_with_provenance(self): ...
def test_a_document_the_caller_cannot_see_is_not_returned(self): ...
The third is the one that matters, and it is the one that cannot be faked: it needs the two identities from §3.1. Everything else — request shape, pagination, throttling, token refresh — is verifiable with mocked Graph responses and belongs in the ordinary suite, not here.
A connector is not “production ready” until that third test passes against a real tenant. Until then its status is “configuration and adapter seam only”, and it should be reported that way.
Put live-test variables in your real .env (never in .env.example,
which carries placeholders only):
# Web search
WEB_SEARCH_API_KEY=tvly-...
# Document/policy RAG
RAG_STORE_CONNECTION_STRING=mssql+pyodbc:///?odbc_connect=...
# REST connector
ENABLE_REST_CONNECTOR=true
REST_ALLOWED_HOSTS=api.example.com
LIVE_REST_TEST_URL=https://api.example.com/health
# MCP client
LIVE_MCP_COMMAND=mcp-server-filesystem
LIVE_MCP_ARGS=--root,/tmp/mcp-sandbox
Then:
pytest -m live tests/live/ -rs
-rs prints a skip reason for everything not configured, which doubles as
a checklist of what is still unverified.
Does: the credentialed path works end to end against the real provider, today, from this host.
Does not: anything about ACL fidelity for a source whose access-control test is not written yet (§3.4), performance under load, or behaviour against a provider’s future API version.
Report a live-verified capability as verified for the specific tests that ran, and name the ones that skipped. A capability with every live test skipped is unverified, however green the run looks.