Test inventory — snapshot 2026-05-06
Pre-step input for Session 6 / Epic 5 (CI tiering). Captures what tests
exist and what currently passes, so the merge-blocking / nightly / manual
split is grounded in reality.
Snapshot
TypeScript packages (herald-protocol/)
| Package | npm test status | Notes |
|---|---|---|
lib/cbor-det | PASS | vitest |
lib/herald-core-ts | PASS | node --test --experimental-strip-types test/*.test.ts |
lib/herald-ct-log | PASS | same node-test pattern |
lib/manthan-ledger | PASS | same |
lib/manthan-mwp | PASS | same |
lib/manthan-agent-ts | PASS | same |
services/reference-herald | PASS | same |
services/testnet | no-test-script | only bootstrap / start / certs / typecheck; effectively integration-tested by booting the ring |
7 of 8 TS packages have a test script and all 7 pass on the genesis host.
Root Python (services/)
pytest -q fails at collection: ModuleNotFoundError: No module named 'manthan_api'
(same for manthan_runtime, manthan_substrate).
Root cause: Python sources aren't installed (pip install -e services/api
etc.) so test imports can't resolve. Tests themselves exist:
services/api/tests/test_health.pyservices/runtime/tests/test_health.pyservices/substrate/tests/test_health.py
Each is a single health-endpoint smoke test based on what's been read so far.
Implications for CI tiering (Session 6)
Blocks merge (proposed)
- TS packages: run all 7
npm tests. Currently green; blocking-class quality. - Python: decide whether to make these blocking. Two options:
1. Add a make test-python target that does pip install -e ... first, then runs pytest. Block on that.
2. Keep Python out of merge-blocking until the runtime / API actually do something; revisit at Session 4–5.
- Terraform:
terraform validate(already verified clean). - Docker:
docker build -f infra/docker/Dockerfile .(already verified clean).
Nightly (proposed)
- Full 3-node testnet boot (
cd herald-protocol/services/testnet && npm start). - Genesis-envelope verification — currently embedded in the npm-start script
(auto-stops after 30s with seen=0 verified=1 per node).
/canarysigned-output check on each node.- Compose stack smoke:
docker-compose up -d, scrape/healthz,down.
Manual / on-demand
- The 12 procedures in
services/testnet/incident-response/runbook.md(D-007). - Restore-from-backup drill (D-005).
- Production AWS apply (no automation; explicit operator action).
Caveats
- ~~
services/testnet/package.jsoncould grow atestscript…~~
Done in Session 6. services/testnet now ships
test/integration.test.ts (node:test) that runs in ~31s. Lives in nightly
rather than merge-blocking because it boots a real ring.
- ~~The Python ImportError is fixable in one make target…~~
Done in Session 6. CI does pip install -e ./services/<name>[dev]
before pytest, so the import error is gone in CI. Locally still requires
Python 3.12 (host has 3.11).
- TS packages mix
vitest(cbor-det only) andnode:test(all others); CI
matrix runs each in its own job to avoid runner conflict.
Session 6 outcome
CI now lives at:
- Merge-blocking —
.github/workflows/ci.yml: python × 3, ts-libs × 7, viewer typecheck+build, terraform validate × 2, docker build × 2, compose config × 2. Target: ~10 min. - Nightly (03:00 UTC) —
.github/workflows/nightly.yml: testnet integration, compose-stack smoke, backup drill. Target: ~15 min. - Manual / on-demand — runbook drills (D-007 territory), production AWS apply, ad-hoc restore drills.