@suss/checker-intent 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,9 +6,9 @@ fails to satisfy what the team declared.
6
6
  ## What this package is
7
7
 
8
8
  The intent half of suss's checking, separate from `@suss/checker` (the
9
- behavioural peer checker) by design. The inputs differ — `IntentSummary`
9
+ behavioral peer checker) by design. The inputs differ (`IntentSummary`
10
10
  (from `@suss/contract-intent`) on one side, `BehavioralSummary` on the
11
- other — and so does the output: an `IntentFinding` is one-sided coverage
11
+ other), and so does the output: an `IntentFinding` is one-sided coverage
12
12
  ("the team declared X; does the code do it?"), not a symmetric
13
13
  provider↔consumer mismatch.
14
14
 
@@ -21,20 +21,20 @@ const findings = checkIntentAgreement(intentSummaries, codeSummaries);
21
21
  For each boundary intent, it pairs against the code summaries sharing the
22
22
  same boundary key and emits:
23
23
 
24
- - `unimplementedBoundary` — the intent declares a boundary no code produces.
25
- - `uncoveredOutcome` — a declared outcome (response / return / throw) the code never produces.
26
- - `outcomeShapeMismatch` — a matched outcome whose body shape disagrees with intent.
27
- - `undeclaredOutcome` — code produces a REST status the intent doesn't declare (info; intent under-specifies).
24
+ - `unimplementedBoundary`: the intent declares a boundary no code produces.
25
+ - `uncoveredOutcome`: a declared outcome (response / return / throw) the code never produces.
26
+ - `outcomeShapeMismatch`: a matched outcome whose body shape disagrees with intent.
27
+ - `undeclaredOutcome`: code produces a REST status the intent doesn't declare (info; intent under-specifies).
28
28
 
29
29
  v0 checks system intent (`kind: boundary`). PRD outcome intent
30
- (`kind: prd`) — scenario / link coverage — is a separate pass.
30
+ (`kind: prd`), scenario and link coverage, is a separate pass.
31
31
 
32
32
  ## Where it sits in suss
33
33
 
34
34
  Depends on `@suss/intent-ir` (intent shapes + `IntentFinding`),
35
35
  `@suss/behavioral-ir` (code summaries), and `@suss/ir-core` for the
36
36
  shared comparison primitives (`boundaryKey`, `bodyShapesMatch`) it must
37
- agree on with the behavioural checker. It does **not** depend on
37
+ agree on with the behavioral checker. It does **not** depend on
38
38
  `@suss/checker`. The full design is in
39
39
  [`docs/internal/proposals/intent-specs.md`](../../docs/internal/proposals/intent-specs.md).
40
40
 
package/dist/index.cjs CHANGED
@@ -245,7 +245,7 @@ function applyIntentSuppressions(findings, rules, opts = {}) {
245
245
  findings,
246
246
  rules,
247
247
  (rule, finding) => {
248
- if (rule.consumer !== void 0) {
248
+ if (rule.consumer !== void 0 || rule.provider !== void 0) {
249
249
  return false;
250
250
  }
251
251
  return rule.boundary === void 0 || (0, import_ir_core.ruleBoundaryMatchesKey)(rule.boundary, finding.boundary);
package/dist/index.d.cts CHANGED
@@ -75,8 +75,8 @@ declare function checkIntentAgreement(intents: IntentSummary[], code: Behavioral
75
75
  * behavioural checker's `applySuppressions`). Rule discriminators map
76
76
  * as: `kind` → the intent finding kind; `boundary` → the finding's
77
77
  * boundary key (exact for `fn:` / `gql:` keys, path-normalized for
78
- * REST). A rule that specifies `consumer` never matches an intent
79
- * finding — there is no consumer side.
78
+ * REST). A rule that specifies `consumer` or `provider` never matches
79
+ * an intent finding — it has neither side.
80
80
  */
81
81
  declare function applyIntentSuppressions(findings: IntentFinding[], rules: SuppressionRule[], opts?: {
82
82
  keepHidden?: boolean;
package/dist/index.d.ts CHANGED
@@ -75,8 +75,8 @@ declare function checkIntentAgreement(intents: IntentSummary[], code: Behavioral
75
75
  * behavioural checker's `applySuppressions`). Rule discriminators map
76
76
  * as: `kind` → the intent finding kind; `boundary` → the finding's
77
77
  * boundary key (exact for `fn:` / `gql:` keys, path-normalized for
78
- * REST). A rule that specifies `consumer` never matches an intent
79
- * finding — there is no consumer side.
78
+ * REST). A rule that specifies `consumer` or `provider` never matches
79
+ * an intent finding — it has neither side.
80
80
  */
81
81
  declare function applyIntentSuppressions(findings: IntentFinding[], rules: SuppressionRule[], opts?: {
82
82
  keepHidden?: boolean;
package/dist/index.js CHANGED
@@ -225,7 +225,7 @@ function applyIntentSuppressions(findings, rules, opts = {}) {
225
225
  findings,
226
226
  rules,
227
227
  (rule, finding) => {
228
- if (rule.consumer !== void 0) {
228
+ if (rule.consumer !== void 0 || rule.provider !== void 0) {
229
229
  return false;
230
230
  }
231
231
  return rule.boundary === void 0 || ruleBoundaryMatchesKey(rule.boundary, finding.boundary);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suss/checker-intent",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "description": "Pair team-authored intent (IntentSummary) against derived code (BehavioralSummary) and report where they diverge.",
6
6
  "keywords": [
@@ -47,9 +47,9 @@
47
47
  "zod": "^4.0.0"
48
48
  },
49
49
  "dependencies": {
50
- "@suss/behavioral-ir": "0.0.1",
51
- "@suss/intent-ir": "0.0.1",
52
- "@suss/ir-core": "0.0.1"
50
+ "@suss/behavioral-ir": "0.1.0",
51
+ "@suss/intent-ir": "0.1.0",
52
+ "@suss/ir-core": "0.1.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "tsup": "*",