@intentset/verification 0.6.1 → 0.7.1

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 (51) hide show
  1. package/README.md +50 -0
  2. package/dist/adapters/common.d.ts +16 -6
  3. package/dist/adapters/common.d.ts.map +1 -1
  4. package/dist/adapters/common.js +13 -8
  5. package/dist/adapters/common.js.map +1 -1
  6. package/dist/adapters/playwright.d.ts +3 -0
  7. package/dist/adapters/playwright.d.ts.map +1 -0
  8. package/dist/adapters/playwright.js +78 -0
  9. package/dist/adapters/playwright.js.map +1 -0
  10. package/dist/binding.d.ts +31 -0
  11. package/dist/binding.d.ts.map +1 -0
  12. package/dist/binding.js +46 -0
  13. package/dist/binding.js.map +1 -0
  14. package/dist/classify.d.ts +39 -7
  15. package/dist/classify.d.ts.map +1 -1
  16. package/dist/classify.js +208 -14
  17. package/dist/classify.js.map +1 -1
  18. package/dist/fixture.d.ts +18 -2
  19. package/dist/fixture.d.ts.map +1 -1
  20. package/dist/fixture.js +23 -3
  21. package/dist/fixture.js.map +1 -1
  22. package/dist/index.d.ts +4 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +4 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/records.d.ts +8 -1
  27. package/dist/records.d.ts.map +1 -1
  28. package/dist/records.js +24 -1
  29. package/dist/records.js.map +1 -1
  30. package/dist/report.d.ts.map +1 -1
  31. package/dist/report.js +4 -0
  32. package/dist/report.js.map +1 -1
  33. package/dist/stale.d.ts +65 -0
  34. package/dist/stale.d.ts.map +1 -0
  35. package/dist/stale.js +95 -0
  36. package/dist/stale.js.map +1 -0
  37. package/dist/subject.d.ts +130 -0
  38. package/dist/subject.d.ts.map +1 -0
  39. package/dist/subject.js +329 -0
  40. package/dist/subject.js.map +1 -0
  41. package/package.json +9 -2
  42. package/src/adapters/common.ts +26 -11
  43. package/src/adapters/playwright.ts +94 -0
  44. package/src/binding.ts +68 -0
  45. package/src/classify.ts +288 -14
  46. package/src/fixture.ts +36 -3
  47. package/src/index.ts +4 -0
  48. package/src/records.ts +40 -2
  49. package/src/report.ts +4 -0
  50. package/src/stale.ts +160 -0
  51. package/src/subject.ts +383 -0
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @intentset/verification
2
+
3
+ Run records and what they prove (Core §8): reading and checking records, classifying each as current, stale or
4
+ missing against the snapshot it ran at, coverage that counts links and current passes separately, and adapters that
5
+ turn a Vitest JSON report or node's TAP output into records.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @intentset/verification
11
+ pnpm add @intentset/verification
12
+ ```
13
+
14
+ ## Example
15
+
16
+ In CI, after the tests, turn the report into run records bound to this commit and graph, through the CLI,
17
+ `@intentset/cli`:
18
+
19
+ ```sh
20
+ npx -p @intentset/cli intentset evidence import --from vitest reports/vitest.json \
21
+ --out .intentset/evidence/ci.json --product PRD-X --release <label>
22
+ npx -p @intentset/cli intentset validate --level L3 --product PRD-X --release <label>
23
+ ```
24
+
25
+ With pnpm, `pnpm dlx --package=@intentset/cli intentset …`, or `pnpm exec intentset …` once `@intentset/cli` is
26
+ installed. The command is always `@intentset/cli`'s: this package has no `intentset` binary, and npx asked
27
+ for `intentset` alone would fetch an unrelated unscoped package from the registry.
28
+
29
+ From code:
30
+
31
+ ```ts
32
+ import { readFile } from "node:fs/promises";
33
+ import { readRunRecords } from "@intentset/verification";
34
+
35
+ const path = ".intentset/evidence/ci.json";
36
+ const { records, diagnostics } = readRunRecords(JSON.parse(await readFile(path, "utf8")), path);
37
+ // a record with any problem is reported as EVID001 and left out, so it never counts as evidence
38
+ ```
39
+
40
+ Only a `pass` whose binding holds is current. Under subject binding, the default where slices claim files, a record carries the hash of its verification's subject (`computeSubject`) and stays current while that is unchanged (a resource's files count only where the verification exercises it or an implementing slice owns it, `evidence.resources: exercised`; EVID006 reports what that cannot see; a slice reached only through `dependsOn` counts by every file it claims, or, with `evidence.dependencies: entrypoint`, by its binding fields, entrypoint files and contract records, and EVID007 reports what that cannot see); under commit binding, which a repository or a gate asks for, it is current only at the assessed commit and graph hash. Keep run records out of the commit they assess.
41
+
42
+ ## Learn more
43
+
44
+ Part of [Intentset](https://intentset.org/), which keeps product intent connected to the code that delivers it and the
45
+ checks that verify it, as readable Markdown files in a repository. The specifications are at
46
+ https://intentset.org/specifications/ and the source at https://github.com/intentset/intentset.
47
+
48
+ ## Licence
49
+
50
+ MIT
@@ -11,8 +11,12 @@ export interface ParsedRun {
11
11
  problems: string[];
12
12
  }
13
13
  export interface ToRunRecordsOptions {
14
- /** Selector -> verification ID, from the graph's automated verifications. */
15
- verifications: ReadonlyMap<string, string>;
14
+ /**
15
+ * Selector -> the verification ID, or every verification ID, that names it, from the graph's automated
16
+ * verifications. A selector two verifications share (one test verifying two behaviors) gives each of them its own
17
+ * record from the same tests.
18
+ */
19
+ verifications: ReadonlyMap<string, string | readonly string[]>;
16
20
  commit: string;
17
21
  graphHash: string;
18
22
  environment: string;
@@ -23,11 +27,17 @@ export interface ToRunRecordsOptions {
23
27
  finishedAt: string;
24
28
  /** Where the run's report lives; each record's uri is this plus `#` and the verification ID. */
25
29
  uriBase: string;
30
+ /**
31
+ * Verification ID -> the hash of its subject, when the effective binding is subject (Core §8): a record is then
32
+ * written with `binding: "subject"` and that hash, and the commit and graph hash stay as provenance. A
33
+ * verification with no entry, or no map at all, gets a commit-binding record.
34
+ */
35
+ subjects?: ReadonlyMap<string, string>;
26
36
  }
27
37
  export interface ConvertedRun {
28
- /** One record per verification at least one test matched, by verification ID. */
38
+ /** One record per verification whose selector at least one test matched, by verification ID. */
29
39
  records: RunRecord[];
30
- /** Selectors no test matched, sorted: their verifications get no record from this run, and read as missing. */
40
+ /** Selectors no test matched, sorted and listed once however many verifications name them: those verifications get no record from this run, and read as missing. */
31
41
  unmatched: string[];
32
42
  }
33
43
  /**
@@ -42,8 +52,8 @@ export declare function deriveEvidenceId(verificationId: string, commit: string,
42
52
  /** The worse of two results: fail, then error, then skip, then pass. */
43
53
  export declare function worst(a: RunResult, b: RunResult): RunResult;
44
54
  /**
45
- * One run record per verification whose selector matched at least one test.
46
- * Several matching tests make one record with the worst result and a
55
+ * One run record per verification whose selector matched at least one test,
56
+ * so a selector two verifications share gives each its own record. Several matching tests make one record with the worst result and a
47
57
  * rationale that counts them. Throws when the options would make a malformed
48
58
  * record, since that is a caller's mistake rather than evidence.
49
59
  */
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/adapters/common.ts"],"names":[],"mappings":"AAQA,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAE5G,MAAM,WAAW,UAAU;IACzB,yGAAyG;IACzG,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,iGAAiG;IACjG,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,iFAAiF;IACjF,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,+GAA+G;IAC/G,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAKD;;;;;GAK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AE,MAAM,CAAC;IACnB,gGAAgG;IAChG,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IAC3B,gGAAgG;IAChG,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,oKAAoK;IACpK,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAKD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAYxE;AAED,8HAA8H;AAC9H,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACjB,MAAM,CAER;AAED,wEAAwE;AACxE,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,SAAS,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAsD1F"}
@@ -38,8 +38,8 @@ export function worst(a, b) {
38
38
  return SEVERITY[a] >= SEVERITY[b] ? a : b;
39
39
  }
40
40
  /**
41
- * One run record per verification whose selector matched at least one test.
42
- * Several matching tests make one record with the worst result and a
41
+ * One run record per verification whose selector matched at least one test,
42
+ * so a selector two verifications share gives each its own record. Several matching tests make one record with the worst result and a
43
43
  * rationale that counts them. Throws when the options would make a malformed
44
44
  * record, since that is a caller's mistake rather than evidence.
45
45
  */
@@ -47,17 +47,20 @@ export function toRunRecords(parsed, options) {
47
47
  const matched = new Map();
48
48
  const unmatched = [];
49
49
  for (const selector of [...options.verifications.keys()].sort(compareStrings)) {
50
- const verificationId = options.verifications.get(selector);
50
+ const named = options.verifications.get(selector);
51
+ const verificationIds = [...new Set(typeof named === "string" ? [named] : named)].sort(compareStrings);
51
52
  const hits = parsed.tests.flatMap((test, index) => (selectorMatches(selector, test.fullName) ? [index] : []));
52
53
  if (hits.length === 0) {
53
54
  unmatched.push(selector);
54
55
  continue;
55
56
  }
56
- const entry = matched.get(verificationId) ?? { selectors: new Set(), tests: new Set() };
57
- entry.selectors.add(selector);
58
- for (const hit of hits)
59
- entry.tests.add(hit);
60
- matched.set(verificationId, entry);
57
+ for (const verificationId of verificationIds) {
58
+ const entry = matched.get(verificationId) ?? { selectors: new Set(), tests: new Set() };
59
+ entry.selectors.add(selector);
60
+ for (const hit of hits)
61
+ entry.tests.add(hit);
62
+ matched.set(verificationId, entry);
63
+ }
61
64
  }
62
65
  const records = [];
63
66
  for (const verificationId of [...matched.keys()].sort(compareStrings)) {
@@ -70,6 +73,7 @@ export function toRunRecords(parsed, options) {
70
73
  .map(([r, n]) => `${n} ${r}`)
71
74
  .join(", ");
72
75
  const names = [...selectors].sort(compareStrings).join(", ");
76
+ const subjectHash = options.subjects?.get(verificationId);
73
77
  records.push({
74
78
  evidenceId: deriveEvidenceId(verificationId, options.commit, options.graphHash, options.finishedAt),
75
79
  verificationId,
@@ -83,6 +87,7 @@ export function toRunRecords(parsed, options) {
83
87
  finishedAt: options.finishedAt,
84
88
  result,
85
89
  uri: `${options.uriBase}#${encodeURIComponent(verificationId)}`,
90
+ ...(subjectHash === undefined ? {} : { binding: "subject", subjectHash }),
86
91
  rationale: `${results.length} test${results.length === 1 ? "" : "s"} matched ${names}: ${counts}.`,
87
92
  });
88
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/adapters/common.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAA+D,MAAM,eAAe,CAAC;AAqC5G,MAAM,QAAQ,GAA8B,EAAE,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 +1 @@
1
+ {"version":3,"file":"playwright.d.ts","sourceRoot":"","sources":["../../src/adapters/playwright.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,CAgB5D"}
@@ -0,0 +1,78 @@
1
+ export function parsePlaywrightJson(json) {
2
+ if (!isRecord(json) || !Array.isArray(json.suites)) {
3
+ throw new TypeError("This is not Playwright JSON reporter output: expected an object with a suites array.");
4
+ }
5
+ const tests = [];
6
+ const problems = [];
7
+ if (Array.isArray(json.errors)) {
8
+ for (const error of json.errors) {
9
+ problems.push(`The run reported an error: ${firstLine(isRecord(error) ? error.message : error) || "no message"}`);
10
+ }
11
+ }
12
+ json.suites.forEach((file, index) => {
13
+ if (!isRecord(file))
14
+ throw new TypeError(`suites[${index}] is not an object.`);
15
+ walk(file, [], tests, problems);
16
+ });
17
+ return { tests, problems };
18
+ }
19
+ function walk(suite, ancestors, tests, problems) {
20
+ for (const spec of Array.isArray(suite.specs) ? suite.specs : []) {
21
+ if (!isRecord(spec))
22
+ throw new TypeError("A spec in the report is not an object.");
23
+ const title = typeof spec.title === "string" ? spec.title : "";
24
+ const fullName = [...ancestors, title].join(" > ");
25
+ for (const test of Array.isArray(spec.tests) ? spec.tests : []) {
26
+ if (!isRecord(test))
27
+ throw new TypeError(`${fullName} has a test entry that is not an object.`);
28
+ const result = resultOf(test, fullName, problems);
29
+ tests.push({ fullName, result, durationMs: durationOf(test) });
30
+ }
31
+ }
32
+ for (const child of Array.isArray(suite.suites) ? suite.suites : []) {
33
+ if (!isRecord(child))
34
+ throw new TypeError("A suite in the report is not an object.");
35
+ const title = typeof child.title === "string" ? child.title : "";
36
+ walk(child, title === "" ? ancestors : [...ancestors, title], tests, problems);
37
+ }
38
+ }
39
+ function resultOf(test, fullName, problems) {
40
+ switch (test.status) {
41
+ case "expected":
42
+ case "flaky":
43
+ return "pass";
44
+ case "skipped":
45
+ return "skip";
46
+ case "unexpected":
47
+ return failureKind(lastResult(test));
48
+ default:
49
+ problems.push(`${fullName} has the unknown status ${JSON.stringify(test.status)}, read as error`);
50
+ return "error";
51
+ }
52
+ }
53
+ /** A timeout or an interrupted run is an error; an assertion that did not hold is a fail; anything else thrown is an error. */
54
+ function failureKind(last) {
55
+ if (last === undefined)
56
+ return "fail";
57
+ if (last.status === "timedOut" || last.status === "interrupted")
58
+ return "error";
59
+ const error = isRecord(last.error) ? last.error : undefined;
60
+ const message = typeof error?.message === "string" ? error.message : "";
61
+ return /\bexpect\(|AssertionError/.test(message) || message === "" ? "fail" : "error";
62
+ }
63
+ function lastResult(test) {
64
+ const results = Array.isArray(test.results) ? test.results : [];
65
+ const last = results[results.length - 1];
66
+ return isRecord(last) ? last : undefined;
67
+ }
68
+ function durationOf(test) {
69
+ const duration = lastResult(test)?.duration;
70
+ return typeof duration === "number" && Number.isFinite(duration) ? duration : null;
71
+ }
72
+ function firstLine(value) {
73
+ return typeof value === "string" ? (value.trim().split("\n")[0] ?? "") : "";
74
+ }
75
+ function isRecord(value) {
76
+ return typeof value === "object" && value !== null && !Array.isArray(value);
77
+ }
78
+ //# sourceMappingURL=playwright.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright.js","sourceRoot":"","sources":["../../src/adapters/playwright.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,mBAAmB,CAAC,IAAa;IAC/C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,SAAS,CAAC,sFAAsF,CAAC,CAAC;IAC9G,CAAC;IACD,MAAM,KAAK,GAAiB,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,KAAK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QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AACrF,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Which binding judges run evidence (Core §8, ADR 0013) and the subjects it
3
+ * needs. The decision is pure: the repository's configuration and whether it
4
+ * has slice claims. Computing a subject needs what the architecture package
5
+ * resolves (claimed files, import closures), which this package does not
6
+ * depend on, so a caller hands it in as a `SubjectSource`.
7
+ */
8
+ import type { EvidenceBinding, EvidenceBindingReason, Graph } from "@intentset/core";
9
+ import { type Subject, type SubjectInput } from "./subject.ts";
10
+ export interface BindingDecision {
11
+ binding: EvidenceBinding;
12
+ /** `configured`, `default` (subject, since slices exist) or `no-slices` (commit, since there is nothing to hash). */
13
+ reason: EvidenceBindingReason;
14
+ }
15
+ /**
16
+ * Core §8: `binding: subject` is the default wherever the repository has slice
17
+ * claims; `binding: commit` is the stricter mode a repository or gate asks
18
+ * for; a repository with no slice claims is judged by commit binding unless it
19
+ * asked for that, and says so (EVID004), whatever it asked for.
20
+ */
21
+ export declare function resolveBinding(configured: EvidenceBinding | null, hasSlices: boolean): BindingDecision;
22
+ /** True when some slice that is not retired claims files: the repository has a subject to hash. */
23
+ export declare function hasSliceClaims(graph: Graph): boolean;
24
+ /** What a caller resolves for the subject hash: the architecture package's claims and imports, over one tree. */
25
+ export type SubjectSource = Omit<SubjectInput, "graph" | "verificationId"> & {
26
+ /** True for a file that can move some subject: a slice's, a used resource's, a global input, a test, a record. */
27
+ covers: (path: string) => boolean;
28
+ };
29
+ /** The subject of every verification in the graph, by ID, with each file hashed once. */
30
+ export declare function subjectsFor(graph: Graph, source: SubjectSource): Map<string, Subject>;
31
+ //# sourceMappingURL=binding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErF,OAAO,EAA0B,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAGvF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,eAAe,CAAC;IACzB,qHAAqH;IACrH,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,eAAe,CAItG;AAED,mGAAmG;AACnG,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAUpD;AAED,iHAAiH;AACjH,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,gBAAgB,CAAC,GAAG;IAC3E,kHAAkH;IAClH,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACnC,CAAC;AAEF,yFAAyF;AACzF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAiBrF"}
@@ -0,0 +1,46 @@
1
+ import { compareStrings } from "./diagnostic.js";
2
+ import { ABSENT, computeSubject } from "./subject.js";
3
+ import { sha256Hex } from "@intentset/core";
4
+ /**
5
+ * Core §8: `binding: subject` is the default wherever the repository has slice
6
+ * claims; `binding: commit` is the stricter mode a repository or gate asks
7
+ * for; a repository with no slice claims is judged by commit binding unless it
8
+ * asked for that, and says so (EVID004), whatever it asked for.
9
+ */
10
+ export function resolveBinding(configured, hasSlices) {
11
+ if (configured === "commit")
12
+ return { binding: "commit", reason: "configured" };
13
+ if (!hasSlices)
14
+ return { binding: "commit", reason: "no-slices" };
15
+ return { binding: "subject", reason: configured === "subject" ? "configured" : "default" };
16
+ }
17
+ /** True when some slice that is not retired claims files: the repository has a subject to hash. */
18
+ export function hasSliceClaims(graph) {
19
+ for (const artifact of graph.artifacts.values()) {
20
+ if (artifact.meta.type === "slice" &&
21
+ artifact.meta.status !== "retired" &&
22
+ (artifact.meta.slice?.claims.length ?? 0) > 0)
23
+ return true;
24
+ }
25
+ return false;
26
+ }
27
+ /** The subject of every verification in the graph, by ID, with each file hashed once. */
28
+ export function subjectsFor(graph, source) {
29
+ const hashes = new Map();
30
+ const fileHash = (path) => {
31
+ let hash = hashes.get(path);
32
+ if (hash === undefined) {
33
+ const bytes = source.readFile(path);
34
+ hash = bytes === undefined ? ABSENT : sha256Hex(bytes);
35
+ hashes.set(path, hash);
36
+ }
37
+ return hash;
38
+ };
39
+ const subjects = new Map();
40
+ const ids = [...graph.artifacts.keys()].filter((id) => graph.artifacts.get(id)?.meta.type === "verification");
41
+ for (const id of ids.sort(compareStrings)) {
42
+ subjects.set(id, computeSubject({ ...source, graph, verificationId: id, fileHash }));
43
+ }
44
+ return subjects;
45
+ }
46
+ //# sourceMappingURL=binding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binding.js","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAmC,MAAM,cAAc,CAAC;AACvF,OAA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AS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACvD,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACzB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IACF,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC5C,MAAM,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;IAC9G,KAAK,MAAM,EAAE,IAAI,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;QAC1C,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,cAAc,CAAC,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IACvF,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,12 +1,14 @@
1
1
  /**
2
- * Evidence freshness (Core §8, invariant 3). Only a `pass` at the assessed
3
- * commit and graph hash is current; everything else is something else, and
4
- * says which. A failing run at the snapshot stays visible however many older
5
- * passes there are, because the status is decided by the latest run at the
6
- * snapshot and every run is kept in the history.
2
+ * Evidence freshness (Core §8, invariant 3). Only a `pass` whose binding holds
3
+ * is current: under commit binding, at the assessed commit and graph hash;
4
+ * under subject binding, while the subject it checked is unchanged. Everything
5
+ * else is something else, and says which. A failing current run stays visible
6
+ * however many older passes there are, because the status is decided by the
7
+ * latest current run and every run is kept in the history.
7
8
  */
8
- import { type Diagnostic, type Graph } from "@intentset/core";
9
+ import { type Diagnostic, type EvidenceBinding, type EvidenceBindingReason, type Graph } from "@intentset/core";
9
10
  import { type RunRecord, type RunResult, type RunScope } from "./records.ts";
11
+ import { type Subject } from "./subject.ts";
10
12
  export declare const EVIDENCE_STATUSES: readonly ["current-pass", "current-fail", "stale", "skip", "error", "missing", "unresolved"];
11
13
  export type EvidenceStatus = (typeof EVIDENCE_STATUSES)[number];
12
14
  /** What evidence is assessed against: a commit and graph hash, and the product and release it is for. */
@@ -17,12 +19,33 @@ export interface EvidenceSnapshot {
17
19
  graphHash: string;
18
20
  /** The exact product and release under assessment. Absent or null considers records of every scope, and reports that it did. */
19
21
  scope?: RunScope | null;
22
+ /** The binding in force (Core §8); commit when absent, as before the field existed. */
23
+ binding?: EvidenceBinding;
24
+ /**
25
+ * Why the binding is the one in force: `configured` (the repository asked), `default` (subject, because slices
26
+ * exist) or `no-slices` (commit, because the repository has no slice claims to hash and did not ask for it,
27
+ * which EVID004 says). Absent reads as `configured`.
28
+ */
29
+ bindingReason?: EvidenceBindingReason;
30
+ /** Under subject binding: the subject of each verification at the snapshot, by verification ID. */
31
+ subjects?: ReadonlyMap<string, Subject>;
32
+ /**
33
+ * The files changed between a record's commit and the assessed commit, or null when the commit is not an
34
+ * ancestor of it or git is unavailable. Optional: it only makes the notes and EVID005 more specific.
35
+ */
36
+ changedSince?: (commit: string) => readonly string[] | null;
37
+ /** True for a file that can move some subject: claimed, a used resource's, a global input, a test, a record. */
38
+ covers?: (path: string) => boolean;
20
39
  }
21
40
  export type ResultCounts = Record<RunResult, number>;
22
41
  export interface VerificationEvidence {
23
42
  verificationId: string;
24
43
  method: "automated" | "manual";
25
44
  status: EvidenceStatus;
45
+ /** The binding that judged this verification. */
46
+ binding: EvidenceBinding;
47
+ /** Under subject binding, the hash of the subject it was judged at; null under commit binding and when none could be computed. */
48
+ subject: string | null;
26
49
  /** Why the status is qualified or what was set aside, when anything was. */
27
50
  note?: string;
28
51
  /** The record that decided the status: the latest at the snapshot, else the latest in scope; null when there is none. */
@@ -43,6 +66,9 @@ export interface Classification {
43
66
  commit: string | null;
44
67
  graphHash: string;
45
68
  scope: RunScope | null;
69
+ binding: EvidenceBinding;
70
+ /** Why this binding is in force (`configured` when the caller did not say). */
71
+ bindingReason: EvidenceBindingReason;
46
72
  };
47
73
  /** One entry per verification artifact in the graph, keyed and ordered by ID. */
48
74
  verifications: Record<string, VerificationEvidence>;
@@ -52,13 +78,19 @@ export interface Classification {
52
78
  unknown: RunRecord[];
53
79
  /** Records that cannot be evidence for the verification they name (EVID001), by evidence ID. */
54
80
  rejected: RejectedRecord[];
55
- /** EVID001 and EVID002, sorted. */
81
+ /** EVID001, EVID002, EVID004, EVID005, EVID006 and EVID007, sorted. */
56
82
  diagnostics: Diagnostic[];
57
83
  }
58
84
  export interface ClassifyOptions {
59
85
  /** The file the records were read from, for diagnostics; null when they did not come from one. */
60
86
  evidencePath?: string | null;
61
87
  }
88
+ /** The most files EVID005 lists; the rest are counted. */
89
+ export declare const UNCLAIMED_LIMIT = 20;
90
+ /** The most verifications EVID006 lists, and the most files it lists for each resource; the rest are counted. */
91
+ export declare const UNEXERCISED_LIMIT = 20;
92
+ /** The most verifications EVID007 lists, and the most files it lists for each dependency slice; the rest are counted. */
93
+ export declare const DEPENDENCY_INTERNALS_LIMIT = 20;
62
94
  /** Core §8: classify every verification in the graph against the snapshot. Deterministic for identical inputs. */
63
95
  export declare function classifyEvidence(graph: Graph, records: readonly RunRecord[], snapshot: EvidenceSnapshot, options?: ClassifyOptions): Classification;
64
96
  /** True when a record was made at the snapshot: same graph hash, and same commit unless the snapshot's is unknown. */
@@ -1 +1 @@
1
- {"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../src/classify.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,KAAK,EAAmB,MAAM,iBAAiB,CAAC;AAE/E,OAAO,EAA2B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEtG,eAAO,MAAM,iBAAiB,YAC5B,cAAc,EACd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