Open source · DevOps & Release

Deployment Health Gate

Gate deployment on health signals with a readable reason for each decision.

v1.0.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Offline, read-only rollout health decision from a versioned policy and captured metric samples. It never deploys.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

node bin/deployment-health-gate.mjs --root examples/pass --policy policy.json --capture capture.json
node bin/deployment-health-gate.mjs --root examples/fail --policy policy.json --capture capture.json
npm run check

Read the result

One JSON report goes to stdout. Exit 0=pass/allow, 1=fail/block, 2=incomplete/unknown or invalid configuration. Invalid options, root, or policy leave stdout empty. Unreadable or invalid capture emits an incomplete report. Both input paths are realpath-confined within --root, strict UTF-8 and duplicate decoded JSON keys are enforced, and no files are written.

Scope

Policy ≤65,536 bytes; capture ≤1,048,576 bytes; at most 100 required metrics, 10,000 samples, JSON depth 16, and 5,000 ms evaluation with an injected monotonic clock. Policy window is 1,000–86,400,000 ms, and minSamples 1–10,000. Boundary N passes validation; N+1 is invalid or incomplete as appropriate.