@suss/checker
v0.3.2
Published
Cross-boundary compatibility checker for suss behavioral summaries — pairs providers with consumers and reports findings.
Maintainers
Readme
@suss/checker
Pairwise cross-boundary checker. Given two BehavioralSummary objects (one provider, one consumer) produces a list of Findings describing mismatches.
What this package is
@suss/checker implements the algorithm specified in docs/cross-boundary-checking.md. Two entry points:
import { checkPair, checkAll } from "@suss/checker";
// Pairwise: compare one provider against one consumer
const findings = checkPair(provider, consumer);
// Automatic pairing: match all summaries by (method, path), check each pair
const result = checkAll(summaries);
// result.findings, result.pairs, result.unmatchedNo I/O, no persistence, no opinions about where the summaries came from. Hand-authored JSON, extractor output, or pinned baselines: they're all the same shape.
Where it sits in suss
Depends only on @suss/behavioral-ir. The extractor, adapters, and framework packs produce the summaries it consumes, but the checker has no runtime dependency on them; it operates on the serialized IR rather than AST or compiler state. See docs/architecture.md.
Status
Six checks: provider coverage (with sub-case analysis), consumer satisfaction, contract consistency (status + body shapes), body compatibility (field presence), semantic condition bridging (Level 5). Automatic boundary pairing via checkAll / pairSummaries with path normalization (:id ↔ {id}). See docs/status.md.
Coverage
License
Licensed under Apache 2.0. See LICENSE.
For the checker's algorithm and finding semantics, see docs/cross-boundary-checking.md.
