Skip to main content

Testing

Unit suites

Each of these needs only its toolchain, and each finishes in under a minute:

proto go test ./... # semdiff, validate
priompt go test ./... # cmd/priompt, internal/{auth,pubsub,server}
auth go test ./... # minting, client_credentials, OIDC vs a fake IdP
cli go test ./... # promptctl
db-adapters go test ./... # store (SQLite live), crypt
python-sdk pytest -q
js-sdk node --check client.js

The end-to-end runbook

priompt/RUNBOOK.md is the full-system verification: 22 suites, all copy-pasteable, with real captured output. All 22 pass.

#Suite#Suite
T1validation gate on writesT12JavaScript SDK
T2AES-256-GCM at restT13priompt-auth lifecycle incl. TTL expiry
T3backup/restore roundtripT14promptctl authoring loop
T4schema migrationsT15stress: writes, parallel reads, cache
T5static tokens: scoping, rw, expiryT16per-repo unit suites
T6pub/sub with diff verdictT17TLS + mTLS
T7semantic diff: tweak and structuralT18PostgreSQL + SQLite migration
T8per-org rate limitingT19Redis L2 + invalidation
T9Prometheus metricsT20the shipped Docker image
T10Python SDKT21real embeddings (TEI)
T11branch / merge / history / rollback / pinT22SSO against a live Keycloak

T1–T4 need no server. T5–T12 need one priompt serve. T13 adds priompt-auth serve, and T17 needs openssl. T18–T22 need Docker (postgres:16-alpine, redis:7-alpine, text-embeddings-inference:cpu-1.6, keycloak:26.0).

The only thing the runbook doesn't exercise is registry publishing, which is blocked on the placeholder names.

Stress numbers (single SQLite node, laptop)

LoadResult
100 sequential publishes0.52 s, 192 writes/s
200 parallel gets, 32 threads0.03 s, ~6,350 reads/s
1,000 gets with the client L1 cache vs the networkunder 1 ms vs 173 ms