@gate-forge/core 0.10.3 → 0.11.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.
Files changed (44) hide show
  1. package/dist/classifier/bind.d.ts +2 -2
  2. package/dist/classifier/bind.d.ts.map +1 -1
  3. package/dist/classifier/classify.d.ts +2 -2
  4. package/dist/classifier/classify.d.ts.map +1 -1
  5. package/dist/classifier/classify.js.map +1 -1
  6. package/dist/config/index.d.ts +294 -3
  7. package/dist/config/index.d.ts.map +1 -1
  8. package/dist/config/index.js +137 -0
  9. package/dist/config/index.js.map +1 -1
  10. package/dist/index.d.ts +51 -9
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +40 -6
  13. package/dist/index.js.map +1 -1
  14. package/dist/policy/business-rules.d.ts +143 -0
  15. package/dist/policy/business-rules.d.ts.map +1 -0
  16. package/dist/policy/business-rules.js +314 -0
  17. package/dist/policy/business-rules.js.map +1 -0
  18. package/dist/policy/evaluate.d.ts +8 -0
  19. package/dist/policy/evaluate.d.ts.map +1 -1
  20. package/dist/policy/index.d.ts +1 -0
  21. package/dist/policy/index.d.ts.map +1 -1
  22. package/dist/policy/index.js +1 -0
  23. package/dist/policy/index.js.map +1 -1
  24. package/dist/schemas/business-rules.d.ts +215 -0
  25. package/dist/schemas/business-rules.d.ts.map +1 -0
  26. package/dist/schemas/business-rules.js +227 -0
  27. package/dist/schemas/business-rules.js.map +1 -0
  28. package/dist/schemas/classification-policy.d.ts +74 -11
  29. package/dist/schemas/classification-policy.d.ts.map +1 -1
  30. package/dist/schemas/classification-policy.js +62 -28
  31. package/dist/schemas/classification-policy.js.map +1 -1
  32. package/dist/schemas/scan-config.d.ts +94 -0
  33. package/dist/schemas/scan-config.d.ts.map +1 -0
  34. package/dist/schemas/scan-config.js +101 -0
  35. package/dist/schemas/scan-config.js.map +1 -0
  36. package/dist/schemas/test-catalog.d.ts +12 -12
  37. package/dist/schemas/test-map.d.ts +4 -4
  38. package/dist/schemas/verdict.d.ts +4 -0
  39. package/dist/schemas/verdict.d.ts.map +1 -1
  40. package/dist/schemas/verdict.js +13 -0
  41. package/dist/schemas/verdict.js.map +1 -1
  42. package/dist/testing/gate-runner.d.ts +2 -2
  43. package/dist/testing/gate-runner.d.ts.map +1 -1
  44. package/package.json +1 -1
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Owner-declared BUSINESS RULES evaluator (plan 2026-10-05 §4/D4).
3
+ *
4
+ * Pure and deterministic, exactly like the closed-world coverage
5
+ * evaluator it is modelled on: given the owner rules, the type table,
6
+ * the resolver's rule bindings, the derived test catalog and (optionally)
7
+ * the SEALED facts of one run, it returns one status per rule case plus
8
+ * typed findings. It never reads a file, never reads an environment
9
+ * variable and never mutates its inputs.
10
+ *
11
+ * The four statuses, and the honesty each one carries:
12
+ *
13
+ * | status | meaning |
14
+ * |--------------|------------------------------------------------------------------|
15
+ * | `unmapped` | no gradeable binding of an accepted kind exists |
16
+ * | `wrong-type` | bindings exist, but none of an accepted kind/runner |
17
+ * | `unproven` | mapped, but no sealed run / not executed / outside the graded |
18
+ * | | slice / missing the type's proof |
19
+ * | `failing` | a mapped test of an accepted kind failed |
20
+ * | `satisfied` | EVERY mapped test of an accepted kind passed with the type's |
21
+ * | | proof; the report names the channel (`satisfied (observe)`) |
22
+ *
23
+ * Invariants this function is built to hold:
24
+ * - a DECLARATION is never proof — a mapping alone is at best `unmapped`
25
+ * resolved into `unproven` until a sealed run says otherwise;
26
+ * - no WEAKER kind satisfies a stronger type (the type table is
27
+ * closed-world; a row never inherits another row's kinds);
28
+ * - a mocked spec, a quarantined test (dropped by the resolver before
29
+ * this call) and an inferred-only binding never satisfy;
30
+ * - a GREEN sibling never forgives a RED one — one failing mapped test
31
+ * makes the whole case `failing`;
32
+ * - findings sort by rule id then case id, so the same inputs always
33
+ * produce the same output.
34
+ */
35
+ import { compareStrings } from '../graph/util.js';
36
+ import { BUSINESS_RULE_TYPE_TABLE, businessRuleClaimId, casesOf, } from '../schemas/business-rules.js';
37
+ import { CAUSE_NEXT_ACTIONS } from '../schemas/verdict.js';
38
+ /** The record kind a `browser-e2e` binding must have produced. */
39
+ const BROWSER_ANCHOR_KIND = 'ui.action';
40
+ /** The record kind an `observed-e2e` binding must have produced. */
41
+ const OBSERVED_EXCHANGE_KIND = 'http.request';
42
+ /**
43
+ * Whether the sealed run holds a record of `kind` attributable to one of
44
+ * the test's own witness sessions. This is the WP3 attribution: the run's
45
+ * session trace joins a test to its session ids, and a record carrying
46
+ * `payload.sessionId` joins the session back to the test — no obligation
47
+ * claim is involved anywhere in that join.
48
+ */
49
+ function sessionProves(facts, sessionIds, kind) {
50
+ if (sessionIds.length === 0)
51
+ return false;
52
+ const sessions = new Set(sessionIds);
53
+ return facts.records.some((record) => {
54
+ if (record.kind !== kind)
55
+ return false;
56
+ const session = sessionIdOf(record);
57
+ return session !== null && sessions.has(session);
58
+ });
59
+ }
60
+ /** Statuses ordered by how badly a case is doing (worst first). */
61
+ const STATUS_SEVERITY = Object.freeze({
62
+ unmapped: 0,
63
+ 'wrong-type': 1,
64
+ failing: 2,
65
+ unproven: 3,
66
+ satisfied: 4,
67
+ });
68
+ /** The session id a record was stamped under, when it carries one. */
69
+ function sessionIdOf(record) {
70
+ const payload = record.payload;
71
+ if (payload === null || typeof payload !== 'object' || Array.isArray(payload))
72
+ return null;
73
+ const value = payload['sessionId'];
74
+ return typeof value === 'string' && value.length > 0 ? value : null;
75
+ }
76
+ /** The record kind a binding's accepted test kind must have produced. */
77
+ function anchorKindFor(kind) {
78
+ if (kind === 'browser-e2e')
79
+ return BROWSER_ANCHOR_KIND;
80
+ if (kind === 'observed-e2e')
81
+ return OBSERVED_EXCHANGE_KIND;
82
+ return null;
83
+ }
84
+ /** Grades one accepted binding against the sealed facts. */
85
+ function gradeBinding(binding, kind, row, facts) {
86
+ if (facts === null) {
87
+ return {
88
+ failing: null,
89
+ unproven: {
90
+ logicalKey: binding.logicalKey,
91
+ detail: `test '${binding.logicalKey}' is mapped but no sealed supervised run exists yet — ` +
92
+ 'a mapping is a declaration, never a proof (`gateforge test-gates`)',
93
+ },
94
+ };
95
+ }
96
+ const fact = facts.tests.get(binding.logicalKey);
97
+ if (fact === undefined) {
98
+ return {
99
+ failing: null,
100
+ unproven: {
101
+ logicalKey: binding.logicalKey,
102
+ detail: `test '${binding.logicalKey}' is mapped but the sealed run did not execute it — ` +
103
+ 'a test that did not run proves nothing',
104
+ },
105
+ };
106
+ }
107
+ if (!fact.inGradedSlice) {
108
+ return {
109
+ failing: null,
110
+ unproven: {
111
+ logicalKey: binding.logicalKey,
112
+ detail: `test '${binding.logicalKey}' is mapped but sits outside this run's graded slice ` +
113
+ `(scope '${facts.scope}') — re-run without the narrowed scope, or let the slice select it`,
114
+ },
115
+ };
116
+ }
117
+ if (fact.status === 'failed') {
118
+ return { failing: binding.logicalKey, unproven: null };
119
+ }
120
+ if (fact.status !== 'passed') {
121
+ return {
122
+ failing: null,
123
+ unproven: {
124
+ logicalKey: binding.logicalKey,
125
+ detail: `test '${binding.logicalKey}' is mapped but the sealed run recorded it as ` +
126
+ `'${fact.status}' — only a passing run proves the rule`,
127
+ },
128
+ };
129
+ }
130
+ if (row.requiresWitnessedSuite && !facts.witnessedRunners.has(row.runner)) {
131
+ return {
132
+ failing: null,
133
+ unproven: {
134
+ logicalKey: binding.logicalKey,
135
+ detail: `test '${binding.logicalKey}' passed, but no WITNESSED ${row.runner} suite ran in the ` +
136
+ `sealed run — mark the suite witnessed (\`diagnostics.suites[].witnessed\` in .gateforge.yml); ` +
137
+ 'an unwitnessed suite is not proof',
138
+ },
139
+ };
140
+ }
141
+ const anchor = anchorKindFor(kind);
142
+ if (anchor !== null && !sessionProves(facts, fact.sessionIds, anchor)) {
143
+ return {
144
+ failing: null,
145
+ unproven: {
146
+ logicalKey: binding.logicalKey,
147
+ detail: `test '${binding.logicalKey}' passed but produced no '${anchor}' witness record ` +
148
+ 'attributable to its own session — a ' + kind + ' test must run on the Gateforge fixture ' +
149
+ "(`@gate-forge/pack-playwright/fixture`) so the witness sees the journey",
150
+ },
151
+ };
152
+ }
153
+ return { failing: null, unproven: null };
154
+ }
155
+ /**
156
+ * Grades one rule case. Pure; `bindings` are the case's gradeable
157
+ * bindings (the resolver has already dropped quarantined and stale
158
+ * ones).
159
+ */
160
+ function gradeCase(rule, caseId, describe, bindings, typeTable, facts) {
161
+ const claimId = businessRuleClaimId(rule.id, caseId);
162
+ const row = typeTable[rule.test];
163
+ const gradeable = bindings.filter((binding) => binding.origin === 'native' || binding.origin === 'sidecar');
164
+ const mappedTests = [...new Set(gradeable.map((binding) => binding.logicalKey))].sort(compareStrings);
165
+ const finding = (code, detail, tests) => ({
166
+ code,
167
+ cause: code,
168
+ ruleId: rule.id,
169
+ caseId,
170
+ claimId,
171
+ detail: `business rule '${rule.id}' case '${caseId}' (${describe}): ${detail}`,
172
+ nextAction: CAUSE_NEXT_ACTIONS[code],
173
+ tests,
174
+ });
175
+ if (gradeable.length === 0) {
176
+ return {
177
+ ruleId: rule.id,
178
+ caseId,
179
+ claimId,
180
+ status: 'unmapped',
181
+ channel: null,
182
+ mappedTests: [],
183
+ finding: finding('BUSINESS_RULE_TEST_MISSING', `no test is mapped for this case; the rule needs a '${row.label}' test ` +
184
+ `(${row.acceptedKinds.join(' or ')}) — \`gateforge next\` prints a starter and the exact mark command`, []),
185
+ };
186
+ }
187
+ const accepted = gradeable.filter((binding) => row.acceptedKinds.includes(binding.declaredKind ?? '') && binding.runner === row.runner);
188
+ if (accepted.length === 0) {
189
+ const kinds = [...new Set(gradeable.map((binding) => binding.declaredKind ?? 'undeclared'))].sort(compareStrings);
190
+ return {
191
+ ruleId: rule.id,
192
+ caseId,
193
+ claimId,
194
+ status: 'wrong-type',
195
+ channel: null,
196
+ mappedTests,
197
+ finding: finding('BUSINESS_RULE_TEST_TYPE_MISMATCH', `the ${kinds.join('/')} test(s) mapped to this case cannot prove a '${row.label}' rule: ` +
198
+ `this type accepts ${row.acceptedKinds.join(' or ')} under runner '${row.runner}' ` +
199
+ '(a weaker kind never satisfies a stronger type)', mappedTests),
200
+ };
201
+ }
202
+ const unmocked = accepted.filter((binding) => !binding.mocked);
203
+ const failing = [];
204
+ const unproven = [];
205
+ const channels = new Set();
206
+ for (const binding of unmocked) {
207
+ const kind = binding.declaredKind;
208
+ const graded = gradeBinding(binding, kind, row, facts);
209
+ if (graded.failing !== null)
210
+ failing.push(graded.failing);
211
+ if (graded.unproven !== null)
212
+ unproven.push(graded.unproven);
213
+ if (graded.failing === null && graded.unproven === null) {
214
+ channels.add(row.kindChannels[kind] ?? row.defaultChannel);
215
+ }
216
+ }
217
+ const acceptedTests = [...new Set(accepted.map((binding) => binding.logicalKey))].sort(compareStrings);
218
+ if (unmocked.length < accepted.length) {
219
+ const mockedKeys = accepted.filter((binding) => binding.mocked).map((binding) => binding.logicalKey);
220
+ unproven.push({
221
+ logicalKey: mockedKeys.sort(compareStrings)[0] ?? '',
222
+ detail: `test(s) ${mockedKeys.sort(compareStrings).join(', ')} mock the system under test — ` +
223
+ "a mocked spec never proves an end-to-end rule (the catalog observed an interception in the file)",
224
+ });
225
+ }
226
+ if (failing.length > 0) {
227
+ const failed = [...new Set(failing)].sort(compareStrings);
228
+ return {
229
+ ruleId: rule.id,
230
+ caseId,
231
+ claimId,
232
+ status: 'failing',
233
+ channel: null,
234
+ mappedTests,
235
+ finding: finding('BUSINESS_RULE_TEST_FAILING', `mapped test(s) ${failed.join(', ')} failed in the sealed run; every mapped test of a case ` +
236
+ 'must pass (a green sibling never forgives a red one)', failed),
237
+ };
238
+ }
239
+ if (unproven.length > 0) {
240
+ const sorted = [...unproven].sort((a, b) => compareStrings(a.logicalKey, b.logicalKey));
241
+ return {
242
+ ruleId: rule.id,
243
+ caseId,
244
+ claimId,
245
+ status: 'unproven',
246
+ channel: null,
247
+ mappedTests,
248
+ finding: finding('BUSINESS_RULE_TEST_UNPROVEN', sorted.map((entry) => entry.detail).join('; '), sorted.map((entry) => entry.logicalKey).filter((key) => key.length > 0)),
249
+ };
250
+ }
251
+ return {
252
+ ruleId: rule.id,
253
+ caseId,
254
+ claimId,
255
+ status: 'satisfied',
256
+ channel: [...channels].sort(compareStrings).join('+') || row.defaultChannel,
257
+ mappedTests,
258
+ finding: null,
259
+ };
260
+ }
261
+ /**
262
+ * Grades every case of every rule. A rule with no `subject` is graded
263
+ * regardless of the inventory; a rule naming a subject the inventory
264
+ * cannot see is a CONFIGURATION ERROR (the caller exits 2) because a name
265
+ * the inventory cannot see is silently uncheckable.
266
+ *
267
+ * Args:
268
+ * input: rules, resolved bindings, the run's resource inventory, and the
269
+ * sealed run's facts (`null` when no sealed run exists).
270
+ *
271
+ * Returns:
272
+ * BusinessRuleEvaluation: config errors plus every case, sorted by rule
273
+ * id then case id.
274
+ */
275
+ export function evaluateBusinessRules(input) {
276
+ const typeTable = input.typeTable ?? BUSINESS_RULE_TYPE_TABLE;
277
+ const inventory = new Set(input.inventory);
278
+ const configErrors = [];
279
+ const cases = [];
280
+ const rules = [...input.rules].sort((a, b) => compareStrings(a.id, b.id));
281
+ for (const rule of rules) {
282
+ if (rule.subject !== undefined && !inventory.has(rule.subject)) {
283
+ configErrors.push({
284
+ code: 'BUSINESS_RULE_SUBJECT_UNKNOWN',
285
+ ruleId: rule.id,
286
+ subject: rule.subject,
287
+ detail: `business rule '${rule.id}' names subject '${rule.subject}', which is not present in the ` +
288
+ 'current resource inventory; a subject the inventory cannot see is silently uncheckable, so ' +
289
+ 'the run fails as a configuration error (ranking and display only — a subject is never proof)',
290
+ });
291
+ continue;
292
+ }
293
+ for (const businessCase of casesOf(rule)) {
294
+ const claimId = businessRuleClaimId(rule.id, businessCase.id);
295
+ cases.push(gradeCase(rule, businessCase.id, businessCase.describe, input.bindings.get(claimId) ?? [], typeTable, input.runFacts));
296
+ }
297
+ }
298
+ cases.sort((a, b) => compareStrings(a.ruleId, b.ruleId) || compareStrings(a.caseId, b.caseId));
299
+ return { configErrors, cases };
300
+ }
301
+ /** Whether a case result is one of the four findings the gate reports. */
302
+ export function isBusinessRuleFinding(result) {
303
+ return result.finding !== null;
304
+ }
305
+ /** Worst status among a rule's cases (`satisfied` when it has none). */
306
+ export function worstBusinessRuleStatus(results) {
307
+ let worst = 'satisfied';
308
+ for (const result of results) {
309
+ if (STATUS_SEVERITY[result.status] < STATUS_SEVERITY[worst])
310
+ worst = result.status;
311
+ }
312
+ return worst;
313
+ }
314
+ //# sourceMappingURL=business-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-rules.js","sourceRoot":"","sources":["../../src/policy/business-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,OAAO,GAKR,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAkB,MAAM,uBAAuB,CAAC;AAG3E,kEAAkE;AAClE,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAExC,oEAAoE;AACpE,MAAM,sBAAsB,GAAG,cAAc,CAAC;AA2G9C;;;;;;GAMG;AACH,SAAS,aAAa,CACpB,KAA2B,EAC3B,UAA6B,EAC7B,IAAY;IAEZ,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IACrC,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACnC,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QACvC,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;QACpC,OAAO,OAAO,KAAK,IAAI,IAAI,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC;AAuBD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AAuB,CAAC,OAA0C;IAChF,IAAI,KAAK,GAA2B,WAAW,CAAC;IAChD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC;YAAE,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IACrF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -112,6 +112,10 @@ export declare const BlockingEntrySchema: z.ZodObject<{
112
112
  RESOURCE_SINGLETON_PER_TENANT: "RESOURCE_SINGLETON_PER_TENANT";
113
113
  RESPONSE_FIELD_MISSING_FROM_MODEL: "RESPONSE_FIELD_MISSING_FROM_MODEL";
114
114
  TWIN_PATH_DIVERGENT: "TWIN_PATH_DIVERGENT";
115
+ BUSINESS_RULE_TEST_MISSING: "BUSINESS_RULE_TEST_MISSING";
116
+ BUSINESS_RULE_TEST_TYPE_MISMATCH: "BUSINESS_RULE_TEST_TYPE_MISMATCH";
117
+ BUSINESS_RULE_TEST_UNPROVEN: "BUSINESS_RULE_TEST_UNPROVEN";
118
+ BUSINESS_RULE_TEST_FAILING: "BUSINESS_RULE_TEST_FAILING";
115
119
  }>>>;
116
120
  nextAction: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
121
  }, z.core.$strict>;
@@ -249,6 +253,10 @@ export declare const PolicyEvaluationResultSchema: z.ZodObject<{
249
253
  RESOURCE_SINGLETON_PER_TENANT: "RESOURCE_SINGLETON_PER_TENANT";
250
254
  RESPONSE_FIELD_MISSING_FROM_MODEL: "RESPONSE_FIELD_MISSING_FROM_MODEL";
251
255
  TWIN_PATH_DIVERGENT: "TWIN_PATH_DIVERGENT";
256
+ BUSINESS_RULE_TEST_MISSING: "BUSINESS_RULE_TEST_MISSING";
257
+ BUSINESS_RULE_TEST_TYPE_MISMATCH: "BUSINESS_RULE_TEST_TYPE_MISMATCH";
258
+ BUSINESS_RULE_TEST_UNPROVEN: "BUSINESS_RULE_TEST_UNPROVEN";
259
+ BUSINESS_RULE_TEST_FAILING: "BUSINESS_RULE_TEST_FAILING";
252
260
  }>>>;
253
261
  nextAction: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
262
  }, z.core.$strict>>;
@@ -1 +1 @@
1
- {"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../src/policy/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAsC,KAAK,YAAY,EAAiB,MAAM,sBAAsB,CAAC;AAG5G,OAAO,EAAiC,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAmD,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGzG,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAK1D;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,yDAAyD;AACzD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsC5B,CAAC;AAEL,qCAAqC;AACrC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAKjF;AAED,yEAAyE;AACzE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;kBAM9B,CAAC;AAEL,uCAAuC;AACvC,MAAM,MAAM,eAAe,GAA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E,YAAY,EACtB,SAAS,EAAE;IACT,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CAC3D,GACA,OAAO,CAaT;AAED,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,KAAK,EAAE,aAAa,CAAC;IACrB,iEAAiE;IACjE,QAAQ,EAAE,UAAU,CAAC;IACrB,qEAAqE;IACrE,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,sBAAsB,CAwErF"}
@@ -11,6 +11,7 @@
11
11
  export { CRUD_CONTRACT_PREFIX, PERSISTENCE_CONTRACT_PREFIX, BlockingEntrySchema, ClaimAssessmentSchema, PolicyEvaluationError, PolicyEvaluationResultSchema, classificationBlockedIdentity, evaluatePolicies, lifecycleAllowsContract, } from './evaluate.js';
12
12
  export type { BlockingEntry, ClaimAssessment, PolicyEvaluationInput, PolicyEvaluationResult, } from './evaluate.js';
13
13
  export { evaluateCoveragePolicy, type CoverageInventoryTable, type MappedCoverage, type CoverageConfigError, type CoverageBlockingFinding, type CoveragePolicyResult, } from './coverage.js';
14
+ export { evaluateBusinessRules, isBusinessRuleFinding, worstBusinessRuleStatus, type BusinessRuleBinding, type BusinessRuleRunFacts, type BusinessRuleTestFact, type BusinessRuleConfigError, type BusinessRuleFinding, type BusinessRuleCaseResult, type BusinessRuleEvaluation, type EvaluateBusinessRulesInput, } from './business-rules.js';
14
15
  export { TRUSTED_POLICY_DOMAIN, trustedPolicyDigest, policyWeakenedCandidate, type TrustedPolicyInput, type PolicyWeakeningCheck, } from './trusted.js';
15
16
  export { BEHAVIOR_POLICY_ID, EMPTY_BEHAVIOR_CATALOG_DIGEST, compileBehaviorPolicy, parseBehaviorPolicy, type CompileBehaviorPolicyInput, type CompileBehaviorPolicyResult, } from './behavior.js';
16
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/policy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,GACjC,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/policy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,GAChC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,GACjC,MAAM,eAAe,CAAC"}
@@ -10,6 +10,7 @@
10
10
  */
11
11
  export { CRUD_CONTRACT_PREFIX, PERSISTENCE_CONTRACT_PREFIX, BlockingEntrySchema, ClaimAssessmentSchema, PolicyEvaluationError, PolicyEvaluationResultSchema, classificationBlockedIdentity, evaluatePolicies, lifecycleAllowsContract, } from './evaluate.js';
12
12
  export { evaluateCoveragePolicy, } from './coverage.js';
13
+ export { evaluateBusinessRules, isBusinessRuleFinding, worstBusinessRuleStatus, } from './business-rules.js';
13
14
  export { TRUSTED_POLICY_DOMAIN, trustedPolicyDigest, policyWeakenedCandidate, } from './trusted.js';
14
15
  export { BEHAVIOR_POLICY_ID, EMPTY_BEHAVIOR_CATALOG_DIGEST, compileBehaviorPolicy, parseBehaviorPolicy, } from './behavior.js';
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/policy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAOvB,OAAO,EACL,sBAAsB,GAMvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,GAGxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,GAGpB,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/policy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAOvB,OAAO,EACL,sBAAsB,GAMvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,GASxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,GAGxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,GAGpB,MAAM,eAAe,CAAC"}
@@ -0,0 +1,215 @@
1
+ /**
2
+ * Owner-declared BUSINESS RULES (plan 2026-10-05 §4 D1/D2) and the test
3
+ * type table that decides what proof each rule's declared test type
4
+ * requires.
5
+ *
6
+ * Two deliberate separations:
7
+ * - A RULE is a DECLARATION, never an obligation. It has no detector
8
+ * resource, no contract namespace and no verifier; it is graded by a
9
+ * pure evaluator over the run's SEALED facts (see `policy/business-rules.ts`).
10
+ * Nothing here mints an obligation id.
11
+ * - The TYPE TABLE is DATA, one row per supported `test:` value. Proof
12
+ * strength follows the type, and a weaker kind never satisfies a
13
+ * stronger one. Adding a type later is one row plus its honest proof
14
+ * level, never a change to the evaluator.
15
+ *
16
+ * The claim id per case is `business-rule:<ruleId>/<caseId>`, which
17
+ * satisfies the existing `<resourceId>:<contract>` shape so the sidecar
18
+ * schema is unchanged — the sidecar stores it under the SAME `claims`
19
+ * list it already uses for obligations.
20
+ *
21
+ * YAML parsing stays in the CLI (the existing core/CLI split); this
22
+ * module speaks validated plain data only.
23
+ */
24
+ import { z } from 'zod';
25
+ /** The claim namespace every business-rule case id lives in. */
26
+ export declare const BUSINESS_RULE_NAMESPACE = "business-rule";
27
+ /**
28
+ * The claim id one case is mapped by: `business-rule:<ruleId>/<caseId>`.
29
+ * Deterministic and stable, so a sidecar entry survives a re-order of
30
+ * `cases:` and the evaluator can join bindings to cases by string.
31
+ */
32
+ export declare function businessRuleClaimId(ruleId: string, caseId: string): string;
33
+ /** Whether one claim id belongs to the business-rule namespace. */
34
+ export declare function isBusinessRuleClaimId(claimId: string): boolean;
35
+ /**
36
+ * The `<ruleId>/<caseId>` pair a business-rule claim id carries, or null
37
+ * when the id is not a business-rule claim or carries no case part.
38
+ */
39
+ export declare function parseBusinessRuleClaimId(claimId: string): {
40
+ ruleId: string;
41
+ caseId: string;
42
+ } | null;
43
+ /** The test types this release ships. More are one table row each. */
44
+ export declare const BUSINESS_RULE_TEST_TYPES: readonly ["e2e", "pytest"];
45
+ /** Union of the supported rule test types. */
46
+ export type BusinessRuleTestType = (typeof BUSINESS_RULE_TEST_TYPES)[number];
47
+ /** One declared observable consequence of a rule (typically both sides). */
48
+ export declare const BusinessRuleCaseSchema: z.ZodObject<{
49
+ id: z.ZodString;
50
+ describe: z.ZodString;
51
+ }, z.core.$strict>;
52
+ /** Inferred business-rule-case shape. */
53
+ export type BusinessRuleCase = z.infer<typeof BusinessRuleCaseSchema>;
54
+ /**
55
+ * Ranking-only hints for `tests suggest`. They NEVER grade: a hint can
56
+ * promote a candidate, never prove anything, and a rule with no hints
57
+ * behaves exactly like a rule with them.
58
+ */
59
+ export declare const BusinessRuleHintsSchema: z.ZodObject<{
60
+ routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
+ globs: z.ZodOptional<z.ZodArray<z.ZodString>>;
62
+ }, z.core.$strict>;
63
+ /** Inferred business-rule-hints shape. */
64
+ export type BusinessRuleHints = z.infer<typeof BusinessRuleHintsSchema>;
65
+ /**
66
+ * One owner-declared business rule. Every field is a DECLARATION: it
67
+ * changes the trusted policy digest (the rule lives in the owner-answers
68
+ * document) and therefore can never be self-approved by an agent.
69
+ */
70
+ export declare const BusinessRuleSchema: z.ZodObject<{
71
+ id: z.ZodString;
72
+ title: z.ZodString;
73
+ describe: z.ZodOptional<z.ZodString>;
74
+ subject: z.ZodOptional<z.ZodString>;
75
+ test: z.ZodDefault<z.ZodEnum<{
76
+ e2e: "e2e";
77
+ pytest: "pytest";
78
+ }>>;
79
+ enforcement: z.ZodDefault<z.ZodEnum<{
80
+ block: "block";
81
+ advisory: "advisory";
82
+ }>>;
83
+ advisoryReason: z.ZodOptional<z.ZodString>;
84
+ cases: z.ZodOptional<z.ZodArray<z.ZodObject<{
85
+ id: z.ZodString;
86
+ describe: z.ZodString;
87
+ }, z.core.$strict>>>;
88
+ hints: z.ZodOptional<z.ZodObject<{
89
+ routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
+ globs: z.ZodOptional<z.ZodArray<z.ZodString>>;
91
+ }, z.core.$strict>>;
92
+ }, z.core.$strict>;
93
+ /** Inferred business-rule shape. */
94
+ export type BusinessRule = z.infer<typeof BusinessRuleSchema>;
95
+ /**
96
+ * The `rules:` section. Duplicate rule ids are an ambiguity, not a
97
+ * last-one-wins: two rules with one id cannot be graded deterministically.
98
+ */
99
+ export declare const BusinessRulesSchema: z.ZodArray<z.ZodObject<{
100
+ id: z.ZodString;
101
+ title: z.ZodString;
102
+ describe: z.ZodOptional<z.ZodString>;
103
+ subject: z.ZodOptional<z.ZodString>;
104
+ test: z.ZodDefault<z.ZodEnum<{
105
+ e2e: "e2e";
106
+ pytest: "pytest";
107
+ }>>;
108
+ enforcement: z.ZodDefault<z.ZodEnum<{
109
+ block: "block";
110
+ advisory: "advisory";
111
+ }>>;
112
+ advisoryReason: z.ZodOptional<z.ZodString>;
113
+ cases: z.ZodOptional<z.ZodArray<z.ZodObject<{
114
+ id: z.ZodString;
115
+ describe: z.ZodString;
116
+ }, z.core.$strict>>>;
117
+ hints: z.ZodOptional<z.ZodObject<{
118
+ routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
119
+ globs: z.ZodOptional<z.ZodArray<z.ZodString>>;
120
+ }, z.core.$strict>>;
121
+ }, z.core.$strict>>;
122
+ /** Inferred business-rules section shape. */
123
+ export type BusinessRules = z.infer<typeof BusinessRulesSchema>;
124
+ /** The case id a rule without `cases:` uses. */
125
+ export declare const IMPLICIT_CASE_ID = "default";
126
+ /**
127
+ * The rule's cases with the implicit `default` case materialized. Pure:
128
+ * a rule that declares cases returns exactly those, in order.
129
+ */
130
+ export declare function casesOf(rule: BusinessRule): BusinessRuleCase[];
131
+ /**
132
+ * The owners-answers document's RULE section: `rules:` is optional and
133
+ * an ABSENT section means the feature is off — byte-identical findings,
134
+ * report and digests to a release without it (plan invariant 1).
135
+ */
136
+ export declare const BusinessRulePolicySchema: z.ZodObject<{
137
+ rules: z.ZodArray<z.ZodObject<{
138
+ id: z.ZodString;
139
+ title: z.ZodString;
140
+ describe: z.ZodOptional<z.ZodString>;
141
+ subject: z.ZodOptional<z.ZodString>;
142
+ test: z.ZodDefault<z.ZodEnum<{
143
+ e2e: "e2e";
144
+ pytest: "pytest";
145
+ }>>;
146
+ enforcement: z.ZodDefault<z.ZodEnum<{
147
+ block: "block";
148
+ advisory: "advisory";
149
+ }>>;
150
+ advisoryReason: z.ZodOptional<z.ZodString>;
151
+ cases: z.ZodOptional<z.ZodArray<z.ZodObject<{
152
+ id: z.ZodString;
153
+ describe: z.ZodString;
154
+ }, z.core.$strict>>>;
155
+ hints: z.ZodOptional<z.ZodObject<{
156
+ routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
157
+ globs: z.ZodOptional<z.ZodArray<z.ZodString>>;
158
+ }, z.core.$strict>>;
159
+ }, z.core.$strict>>;
160
+ }, z.core.$strict>;
161
+ /** Inferred business-rule-policy section shape. */
162
+ export type BusinessRulePolicy = z.infer<typeof BusinessRulePolicySchema>;
163
+ /**
164
+ * One row of the TYPE TABLE (plan D2). `acceptedKinds` is closed-world:
165
+ * a binding of any other kind is `wrong-type`, never quietly accepted,
166
+ * and a no-weaker-kind rule means a row never inherits another row's
167
+ * kinds.
168
+ */
169
+ export interface BusinessRuleTypeRow {
170
+ /** The `test:` value this row answers to. */
171
+ readonly id: BusinessRuleTestType;
172
+ /** Human label used in every message and starter test. */
173
+ readonly label: string;
174
+ /** The runner every accepted test must execute under. */
175
+ readonly runner: string;
176
+ /** Test kinds that may satisfy this type (closed-world). */
177
+ readonly acceptedKinds: readonly string[];
178
+ /** Proof channel per accepted kind, named in the report. */
179
+ readonly kindChannels: Readonly<Record<string, string>>;
180
+ /** The channel named when the row's tests all carry the same one. */
181
+ readonly defaultChannel: string;
182
+ /**
183
+ * True when the proof additionally requires the run's WITNESSED suite
184
+ * for the type's runner (`diagnostics.suites[].witnessed`). A pytest
185
+ * rule without one stays `unproven` — no weaker labelled proof.
186
+ */
187
+ readonly requiresWitnessedSuite: boolean;
188
+ /** What `next` prints as the starter test for this type. */
189
+ readonly starter: 'playwright' | 'pytest';
190
+ }
191
+ /**
192
+ * THE type table: one row per supported `test:` value. Proof strength
193
+ * follows the type, and a weaker kind is never accepted by a stronger
194
+ * row — `e2e` is never satisfied by `api-e2e`, `server-e2e`, `unit`, a
195
+ * mocked spec, or a test that did not run.
196
+ */
197
+ export declare const BUSINESS_RULE_TYPE_TABLE: Readonly<Record<BusinessRuleTestType, BusinessRuleTypeRow>>;
198
+ /** The type table as a deterministic list (sorted by type id). */
199
+ export declare function businessRuleTypeRows(): BusinessRuleTypeRow[];
200
+ /**
201
+ * The per-case status the evaluator reports. `satisfied` carries the
202
+ * proof channel in its label (`satisfied (observe)`), because "satisfied"
203
+ * read as "the rule holds" is exactly the overclaim invariant 6 forbids.
204
+ */
205
+ export declare const BUSINESS_RULE_CASE_STATUSES: readonly ["unmapped", "wrong-type", "unproven", "failing", "satisfied"];
206
+ /** Union of the per-case statuses. */
207
+ export type BusinessRuleCaseStatus = (typeof BUSINESS_RULE_CASE_STATUSES)[number];
208
+ /**
209
+ * The `rules:` key as it appears in the owner-answers document, named
210
+ * once so the loader, the migrator and the init template cannot drift.
211
+ */
212
+ export declare const BUSINESS_RULES_KEY = "rules";
213
+ /** The `schemaVersion` every engine document carries. */
214
+ export declare const BusinessRuleSchemaVersionField: z.ZodLiteral<1>;
215
+ //# sourceMappingURL=business-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-rules.d.ts","sourceRoot":"","sources":["../../src/schemas/business-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,gEAAgE;AAChE,eAAO,MAAM,uBAAuB,kBAAkB,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,mEAAmE;AACnE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAM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