gate-contract 0.1.1
gate-contract models the gates of a staged build pipeline as a contract that fails closed. A pipeline that only knows PASS and FAIL has a third state hiding inside it: the gate that could not be evaluated, because a credential was missing, an API timed out, or the value it needed was never produced. Treating that as a pass is how a run reaches its last stage having checked nothing. The rule this library enforces is that a blocking gate halts the run when it fails and when it cannot be evaluated. Outcome is Pass, Fail or Unevaluable, each carrying a reason. Known<T> propagates Unknown through map and zip_with instead of decaying to a default, so an unknown input cannot slip past a threshold check. Severity separates blocking gates from advisory ones, whose failures become warnings in the report. Stage::evaluate visits every gate, so one run reports every problem and still names the first that halts, and Pipeline::run reports how many stages never ran. No dependencies, #![forbid(unsafe_code)], MSRV 1.63, 14 unit tests. Dual licensed MIT OR Apache-2.0. Source at github.com/theluckystrike/gate-contract-rs, API documentation on docs.rs.
| Tags | rust library pipeline validation build-tool |
|---|---|
| License | MITL |
| State | initial |