flat-test-entrypointlisted
Install: claude install-skill wntic/pyhouse
# Flat-Layered Test — what a trigger runs
Consult `test-principles` for the testing constitution. Where this skill contradicts `test-principles`, the constitution wins.
The function a trigger calls is where a flat-layered service composes everything, so its test is the one that catches
wiring: what the run reads actually fits what it writes, and the aggregate counts what happened. **This skill covers the levels of wrapping around that one
call, tested at each.** They are one subject because they are layers of the same invocation.
The work — the body every trigger calls — is tested end to end against whatever it really reads and
writes, only a remote transport stubbed; with no store and no local output nothing is running, and it
is a unit test under `tests/unit/`. A process that outlives one run adds the containment test (rule 6),
a framework wrapper adds the wrapper test (rule 4), and an earned durable-execution engine adds the
orchestration level under `## Rules`' last subsection (`flat-entrypoint` rule 1 decides whether it is
earned).
## When to use vs. neighbours
- The HTTP client the body calls → `flat-test-service-client`; this level substitutes that client's
transport, never the client object itself.
- The tables and repository class the body writes through → `flat-test-persistence`.
- The container and isolation fixtures → `flat-test-integration-setup`; the code here owns its
transactions, so it takes the whole-schema wipe.
- Writing the work, its containment