Intelligent Chargeback Agent · CIRI
There are 1235, and what sets them apart is not the count: 132 of them do not verify code. They verify the deliverable — that the n8n workflow is wired up, that the README's numbers are the real ones, that the reports that travel open without internet. Things that break no import and break the delivery.
1082 unit · 119 integration · 34 E2E
the CI's number, on a clean checkout. It fails below 85
one per piece; none mixes domains
lint, tests with a coverage floor, n8n wiring
Each layer tests something the previous one cannot. Keeping them apart matters because they cost different amounts: the top ones run in a couple of minutes and on every push; the bottom one calls the model and the deployed API, so it is run by hand.
The logic, in isolationon every push
Guardrails, SLA evaluation, parsing what the model returns, building the vector-store query. No network and no model; the disk is only read —the workflow, the docs, the reports that travel— and the only thing written is SQLite in memory. They test decisions, not integrations.
The pieces togetheron every push
The whole pipeline with the model mocked, the routes with their real dependencies, startup with Qdrant down. They test that the internal wiring exists — that one service receives what the other sends, not that each works on its own.
Against the deployed APIby hand
They call Render and the real model. They stay out of CI on purpose: they depend on Render being awake and on there being credit, and a test that fails for something outside the code tells you nothing.
Measured over api/app. The CI floor is 85%: it is not there to show off a number but so that a drop shows up in the diff that caused it.
The three lowest are low for different reasons, and only one of them is the usual one.
In rag it is indeed depending on something external answering: the calls to the embedder and the creation of Qdrant collections, which covering fully would mean mocking the world until the test stops meaning anything. In data the gap is a different one: reading the Excel file, plus the DDL and the migration seed, which run once when the database is created. At the package root, the app's startup and the dependency wiring. None of the three falls below the floor.
This is the part that usually does not exist. Every line is a concrete way to break the delivery without breaking a single import: defects that do not show up in the call tree but in what comes out — the HTTP response, the workflow, the documentation, the HTML that travels.
stopAndError aborts before any node answers
A malformed transaction_id would return 200 with an empty body: identical to a success
test_workflows_n8n
$0.1050 for something that costs zero
test_langfuse_stats_fetch
BLOCKED/FAILED verdicts would give APPROVE, with no HITL and no alerts
test_guardrails
v1_ —the module's name— for prompts that are on v3.2
test_report_generator
A coverage number does not say whether the tests are any good. You can reach 90% by executing code without asserting anything about it. What does say something is which concrete defect cannot come back, and that is only visible by reading why each test was written.
The sixteen above have something in common: none of them broke an import. The workflow imported, the report generated, the panel returned HTML. They failed where nobody was looking — in the HTTP response, in the banner, in the file that travels inside the ZIP. That is why the suite watches the deliverable and not only the code.
pytest tests/unit tests/integration -q
With coverage: --cov=api/app --cov-fail-under=85
CI: .github/workflows/tests.yml