Compatibility: Pactmark 0.1.x on Node 22.14+ and 24.x. The reference OCI image is locally
build-compatible; it is neither published nor production-certified.
The HTTP bridge
@pactmark/node bridges a Web-standard handler to node:http, streams responses without buffering,
and propagates client disconnects as an AbortSignal.
server.ts
installGracefulShutdown returns a disposer. On SIGTERM it stops accepting connections, gives
in-flight requests up to timeoutMs, then closes remaining connections. Because run truth is in
the store, a closed connection is not lost work.Health and readiness
readyz to your orchestrator’s readiness probe and healthz to liveness. Do not wire
readiness to liveness — a runtime that honestly reports not-ready should be taken out of rotation,
not killed and restarted into the same state.
Running the worker separately
Figure 1. The worker is a different process with a different lifecycle. Fenced leases are what make “different process” safe.worker.ts
The reference container fixture
The OCI conformance fixture is a test artefact with a deliberately hostile configuration:
It exercises traversal, symlink, secret, socket, loopback, metadata, fork, loop and output probes.
Deployment shape
docker-compose.yml
Termination and recovery
1
Stop accepting work
Readiness goes false; the load balancer drains.
2
Release or expire leases
Either release cleanly on shutdown or let the lease expire. Both are safe because of fencing.
3
Resume from persisted events
A later process rebuilds from the store. Nothing depends on the old process’s memory.
4
Never repeat an uncertain effect
Unless its registered strategy proves retry is safe. Restarting a process is not new information
about an external system.
PostgreSQL profile
Migrations, TLS, protected context and backups.
Reliability and recovery
RPO/RTO and monitoring parked work.