@agent-ix/quoin 0.15.1 → 0.19.2

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 (125) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/default-modules.yaml +15 -6
  4. package/dist/advisor/advise.d.ts +14 -1
  5. package/dist/advisor/advise.d.ts.map +1 -1
  6. package/dist/advisor/methods.d.ts +11 -1
  7. package/dist/advisor/methods.d.ts.map +1 -1
  8. package/dist/{advisor-D35K3_iI.js → advisor-a9axb4Jl.js} +21 -8
  9. package/dist/assurance/graph.d.ts +79 -0
  10. package/dist/assurance/graph.d.ts.map +1 -0
  11. package/dist/assurance/index.d.ts +9 -0
  12. package/dist/assurance/index.d.ts.map +1 -0
  13. package/dist/assurance/render.d.ts +3 -0
  14. package/dist/assurance/render.d.ts.map +1 -0
  15. package/dist/auditor/audit.d.ts +37 -5
  16. package/dist/auditor/audit.d.ts.map +1 -1
  17. package/dist/auditor/combinatorial.d.ts +53 -0
  18. package/dist/auditor/combinatorial.d.ts.map +1 -0
  19. package/dist/auditor/index.d.ts +1 -1
  20. package/dist/auditor/index.d.ts.map +1 -1
  21. package/dist/auditor-W2jFinr6.js +188 -0
  22. package/dist/{base-CtpwIg4M.js → base-BE20w0jY.js} +1 -1
  23. package/dist/cli.js +1 -1
  24. package/dist/combinatorial-Cq01XfhV.js +80 -0
  25. package/dist/commands/advise.d.ts +16 -0
  26. package/dist/commands/advise.d.ts.map +1 -0
  27. package/dist/commands/advise.js +164 -0
  28. package/dist/commands/assurance.d.ts +14 -0
  29. package/dist/commands/assurance.d.ts.map +1 -0
  30. package/dist/commands/assurance.js +179 -0
  31. package/dist/commands/catalog/list.js +2 -2
  32. package/dist/commands/catalog/methods.js +3 -3
  33. package/dist/commands/catalog/show.js +2 -2
  34. package/dist/commands/catalog/validate.js +2 -2
  35. package/dist/commands/completeness.d.ts +16 -0
  36. package/dist/commands/completeness.d.ts.map +1 -0
  37. package/dist/commands/completeness.js +49 -0
  38. package/dist/commands/config/doctor.js +1 -1
  39. package/dist/commands/config/edit.js +1 -1
  40. package/dist/commands/config/get.js +1 -1
  41. package/dist/commands/config/set.js +1 -1
  42. package/dist/commands/evidence/affirm.d.ts.map +1 -1
  43. package/dist/commands/evidence/affirm.js +36 -50
  44. package/dist/commands/evidence/audit.d.ts +11 -0
  45. package/dist/commands/evidence/audit.d.ts.map +1 -1
  46. package/dist/commands/evidence/audit.js +60 -154
  47. package/dist/commands/evidence/baseline.d.ts +14 -0
  48. package/dist/commands/evidence/baseline.d.ts.map +1 -0
  49. package/dist/commands/evidence/baseline.js +79 -0
  50. package/dist/commands/evidence/gc.js +2 -2
  51. package/dist/commands/evidence/index.d.ts.map +1 -1
  52. package/dist/commands/evidence/index.js +4 -2
  53. package/dist/commands/evidence/record.d.ts +3 -0
  54. package/dist/commands/evidence/record.d.ts.map +1 -1
  55. package/dist/commands/evidence/record.js +97 -53
  56. package/dist/commands/matrix.js +1 -1
  57. package/dist/commands/module/ensure-defaults.js +3 -3
  58. package/dist/commands/module/install.js +2 -2
  59. package/dist/commands/module/list.js +2 -2
  60. package/dist/commands/module/remove.js +2 -2
  61. package/dist/commands/review.js +1 -1
  62. package/dist/commands/to-plan.js +1 -1
  63. package/dist/commands/update.js +2 -2
  64. package/dist/commands/write.js +3 -3
  65. package/dist/completeness/assess.d.ts +82 -0
  66. package/dist/completeness/assess.d.ts.map +1 -0
  67. package/dist/completeness/bundle.d.ts +52 -0
  68. package/dist/completeness/bundle.d.ts.map +1 -0
  69. package/dist/completeness/declarations.d.ts +46 -0
  70. package/dist/completeness/declarations.d.ts.map +1 -0
  71. package/dist/completeness/index.d.ts +11 -0
  72. package/dist/completeness/index.d.ts.map +1 -0
  73. package/dist/completeness/run.d.ts +35 -0
  74. package/dist/completeness/run.d.ts.map +1 -0
  75. package/dist/completeness-BeqcskAI.js +228 -0
  76. package/dist/evidence/adapters/agent-eval.d.ts +26 -0
  77. package/dist/evidence/adapters/agent-eval.d.ts.map +1 -0
  78. package/dist/evidence/adapters/audit-script.d.ts +25 -0
  79. package/dist/evidence/adapters/audit-script.d.ts.map +1 -0
  80. package/dist/evidence/adapters/cargo-mutants.d.ts +3 -0
  81. package/dist/evidence/adapters/cargo-mutants.d.ts.map +1 -0
  82. package/dist/evidence/adapters/junit.d.ts +17 -0
  83. package/dist/evidence/adapters/junit.d.ts.map +1 -0
  84. package/dist/evidence/adapters/registry.d.ts +63 -0
  85. package/dist/evidence/adapters/registry.d.ts.map +1 -0
  86. package/dist/evidence/adapters/sarif.d.ts +35 -0
  87. package/dist/evidence/adapters/sarif.d.ts.map +1 -0
  88. package/dist/evidence/adapters/sbom.d.ts +35 -0
  89. package/dist/evidence/adapters/sbom.d.ts.map +1 -0
  90. package/dist/evidence/adapters/types.d.ts +55 -0
  91. package/dist/evidence/adapters/types.d.ts.map +1 -0
  92. package/dist/evidence/index.d.ts +11 -1
  93. package/dist/evidence/index.d.ts.map +1 -1
  94. package/dist/evidence/record.d.ts +6 -0
  95. package/dist/evidence/record.d.ts.map +1 -1
  96. package/dist/evidence/store.d.ts +124 -8
  97. package/dist/evidence/store.d.ts.map +1 -1
  98. package/dist/evidence/types.d.ts +110 -5
  99. package/dist/evidence/types.d.ts.map +1 -1
  100. package/dist/evidence-FRF9RN77.js +595 -0
  101. package/dist/{flow-command-BSMqxass.js → flow-command-BrzzKBo9.js} +1 -1
  102. package/dist/index.js +6 -6
  103. package/dist/{modules-Ckfaq5p4.js → modules-_FQTZ3gx.js} +2 -2
  104. package/dist/{plugins-CLuXx2Jr.js → plugins-Q1MtCIE5.js} +1 -1
  105. package/dist/quire/contract.d.ts +1 -1
  106. package/dist/quire/contract.d.ts.map +1 -1
  107. package/dist/quire/exec.d.ts +44 -0
  108. package/dist/quire/exec.d.ts.map +1 -0
  109. package/dist/quire/index.d.ts +1 -0
  110. package/dist/quire/index.d.ts.map +1 -1
  111. package/dist/{quire-MbMdffPh.js → quire-Dis3ky5t.js} +316 -262
  112. package/dist/{version-By2YFRZQ.js → version-D0l3nDPZ.js} +1 -1
  113. package/dist/{write-8JJ8Dumo.js → write-CMA6BDUq.js} +1 -1
  114. package/package.json +2 -1
  115. package/skills/spec-evidence-analysis/SKILL.md +27 -11
  116. package/skills/spec-fuzz/SKILL.md +94 -0
  117. package/skills/spec-fuzz/assets/templates/atheris.py.md +74 -0
  118. package/skills/spec-fuzz/assets/templates/cargo-fuzz.rs.md +83 -0
  119. package/skills/spec-fuzz/assets/templates/fast-check.ts.md +76 -0
  120. package/skills/spec-fuzz/references/step-0-scope-and-harness.md +51 -0
  121. package/skills/spec-fuzz/references/step-1-select-obligations.md +47 -0
  122. package/skills/spec-fuzz/references/step-2-ground-entry-point.md +55 -0
  123. package/skills/spec-fuzz/references/step-3-emit-targets.md +65 -0
  124. package/skills/spec-fuzz/references/step-4-report.md +56 -0
  125. package/dist/evidence-BvUyw-Yv.js +0 -171
@@ -1,4 +1,4 @@
1
- import { BaselineFile, Binding, BindingsFile, RunRecord } from './types.js';
1
+ import { BaselineFile, Binding, BindingsFile, FindingRecord, RunRecord } from './types.js';
2
2
  /**
3
3
  * The store root for a repository.
4
4
  *
@@ -19,6 +19,8 @@ export declare function bindingsPath(repo: string): string;
19
19
  export declare function baselinePath(repo: string): string;
20
20
  /** `runs/<SUITE-N>/<commit12>.json` — one file is one run of one suite. */
21
21
  export declare function runPath(repo: string, suite: string, commit: string): string;
22
+ /** `scans/<SUITE-N>/<commit12>.json` — one file is one scan of one suite. */
23
+ export declare function scanPath(repo: string, suite: string, commit: string): string;
22
24
  /** The 12-character commit prefix the run filenames use. */
23
25
  export declare function short(commit: string): string;
24
26
  /**
@@ -27,18 +29,114 @@ export declare function short(commit: string): string;
27
29
  * produce identical bytes.
28
30
  */
29
31
  export declare function canonicalJson(value: unknown): string;
32
+ /**
33
+ * A store file that exists and cannot be read as JSON.
34
+ *
35
+ * `bindings.json` and `baseline.json` are **checked into git**, so a merge
36
+ * conflict leaves `<<<<<<< HEAD` in one of them. Before this, every store read
37
+ * threw a bare `SyntaxError: Unexpected token '<'` naming no file
38
+ * (agent-ix/quoin#106).
39
+ */
40
+ export declare class StoreReadError extends Error {
41
+ readonly path: string;
42
+ readonly cause: unknown;
43
+ constructor(path: string, cause: unknown);
44
+ }
30
45
  /** Write one run record. Last-write-wins at the same (suite, commit). */
31
46
  export declare function writeRun(repo: string, record: RunRecord): string;
47
+ /**
48
+ * Write one finding-shaped scan. Last-write-wins at the same (suite, commit).
49
+ *
50
+ * Writing the record IS the assertion that the scan executed, so this is only
51
+ * ever called with an envelope an adapter actually read (FR-034).
52
+ */
53
+ export declare function writeScan(repo: string, record: FindingRecord): string;
54
+ /** Read one scan record, or `null` when that (suite, commit) has none. */
55
+ export declare function readScan(repo: string, suite: string, commit: string): FindingRecord | null;
56
+ /** Every scan file recorded for a suite, in filename order (not time order). */
57
+ export declare function listScans(repo: string, suite: string): string[];
58
+ /**
59
+ * Every scan recorded for a suite, oldest first by `timestamp`.
60
+ *
61
+ * Ordered exactly as `readRuns` is, and for the same reason: a filename is a
62
+ * commit prefix, which is uniformly random hex, so lexical order is not time
63
+ * order. agent-ix/quoin#104 fixed that once for runs; reintroducing it here
64
+ * would rebuild the same defect beside the fix.
65
+ */
66
+ export declare function readScans(repo: string, suite: string, skipped?: string[]): FindingRecord[];
67
+ /** The newest scan of a suite by timestamp, or `null` when it has none. */
68
+ export declare function latestScan(repo: string, suite: string, skipped?: string[]): FindingRecord | null;
69
+ /**
70
+ * Whether a scan proves nothing — the finding-shaped meaning of vacuity.
71
+ *
72
+ * **Not "found nothing".** A scan that ran every rule and reported no finding
73
+ * is a clean result and is exactly the evidence this record type exists to
74
+ * preserve. What proves nothing is a scan that **evaluated no rules**: it also
75
+ * reports zero findings, and from the findings list alone the two are
76
+ * identical.
77
+ *
78
+ * Returns `null` when the tool did not say how many rules it evaluated. The
79
+ * question cannot be asked, so the auditor says nothing rather than something
80
+ * wrong — the same posture `evidenceKind` takes for method conformance
81
+ * (agent-ix/quoin#105).
82
+ */
83
+ export declare function scanIsVacuous(record: FindingRecord): boolean | null;
32
84
  /** Read one run record, or `null` when that (suite, commit) has none. */
33
85
  export declare function readRun(repo: string, suite: string, commit: string): RunRecord | null;
34
- /** Every run recorded for a suite, newest filename last (lexicographic). */
86
+ /**
87
+ * Every run file recorded for a suite, in filename order.
88
+ *
89
+ * Filename order is **not** time order — a filename is a commit prefix, which
90
+ * is uniformly random hex. Use [`latestRun`] when you mean the newest run;
91
+ * this exists for enumeration.
92
+ */
35
93
  export declare function listRuns(repo: string, suite: string): string[];
94
+ /**
95
+ * Every run recorded for a suite, oldest first by `timestamp`.
96
+ *
97
+ * An unreadable run file is skipped and its path pushed onto `skipped` when the
98
+ * caller passes one — one corrupt record must not hide every finding in the
99
+ * report (agent-ix/quoin#106).
100
+ */
101
+ export declare function readRuns(repo: string, suite: string, skipped?: string[]): RunRecord[];
102
+ /**
103
+ * The newest run of a suite, by **timestamp** — or `null` when it has none.
104
+ *
105
+ * Not `listRuns().at(-1)`. A run filename is `<commit12>.json` and a commit
106
+ * prefix is uniformly random hex, so the lexicographically last file is the
107
+ * newest run with probability 1/n. That arbitrary choice drove the auditor's
108
+ * freshness and vacuity checks and `gc`'s retention: record a fresh run at HEAD
109
+ * and, if an older run's prefix happened to sort higher, `stale-evidence` was
110
+ * reported against evidence that was current — and re-recording could not fix
111
+ * it, because the ordering is a property of the hashes and not of what you do
112
+ * (agent-ix/quoin#104).
113
+ *
114
+ * `RunRecord.timestamp` was there the whole time. The commit is the tiebreak,
115
+ * so two runs stamped identically still order deterministically.
116
+ */
117
+ export declare function latestRun(repo: string, suite: string, skipped?: string[]): RunRecord | null;
36
118
  /** Every suite that has at least one recorded run. */
37
119
  export declare function listRecordedSuites(repo: string): string[];
38
120
  /** The binding graph. An absent file reads as an empty graph, not an error. */
39
121
  export declare function readBindings(repo: string): BindingsFile;
40
- /** Write the binding graph, ordered by obligation id so diffs stay minimal. */
41
- export declare function writeBindings(repo: string, file: BindingsFile): void;
122
+ /**
123
+ * Write the binding graph, ordered by `(obligation, suite)` so diffs stay
124
+ * minimal.
125
+ *
126
+ * Compared with plain `<`, not `localeCompare`: this file is checked in and its
127
+ * diff is meant to *be* the per-PR delta, and `localeCompare` without an
128
+ * explicit locale depends on the runtime's ICU data — so two machines could
129
+ * serialize the same binding set in different orders and produce a diff nobody
130
+ * made.
131
+ */
132
+ /**
133
+ * `Pick<…, "bindings">` and not `BindingsFile`: the version written is always
134
+ * `STORE_SCHEMA_VERSION`, and `file.schemaVersion` was never read. Demanding it
135
+ * made callers supply a value the function discards — which one command did not,
136
+ * and the resulting type error stayed latent until an unrelated entry widened
137
+ * the build graph enough for `tsc` to reach the call site.
138
+ */
139
+ export declare function writeBindings(repo: string, file: Pick<BindingsFile, "bindings">): void;
42
140
  /** The ratchet baseline, or `null` when none has been accepted. */
43
141
  export declare function readBaseline(repo: string): BaselineFile | null;
44
142
  export declare function writeBaseline(repo: string, file: BaselineFile): void;
@@ -55,22 +153,40 @@ export declare function gc(repo: string, dryRun?: boolean): string[];
55
153
  * Bind an obligation to the run that discharged it, stamping the statement hash
56
154
  * as it stands now.
57
155
  *
156
+ * **Keyed on `(obligation, suite)`, not on the obligation alone.** The binding
157
+ * graph is cross-suite by design — one obligation discharged by a unit suite
158
+ * and a mutation suite is the case `bindings.json` exists to hold in one file —
159
+ * and keying on the obligation made the second suite *overwrite* the first.
160
+ * Two consequences, both silent: the cross-suite relationship was destroyed on
161
+ * write, and `insufficient-multiplicity` counted distinct suites per obligation
162
+ * across a set that could never hold more than one, so the finding could not be
163
+ * cleared by any amount of evidence (agent-ix/quoin#102).
164
+ *
58
165
  * **Auto-bind, explicit affirmation.** First discharge binds without asking:
59
166
  * requiring a human to confirm a binding the evidence already proves would put
60
167
  * a gate in front of the common case and teach people to click through it. What
61
168
  * stays explicit is *re-affirmation* after a statement changes — that is the
62
169
  * judgement call, and it is the one worth a signature.
63
170
  *
64
- * Returns the binding, whether it was newly created, and (when it already
65
- * existed) whether it is now suspect.
171
+ * Returns the binding, whether it was newly created, and (when this
172
+ * `(obligation, suite)` already existed) whether it is now suspect.
66
173
  */
67
174
  export declare function bind(existing: Binding[], next: Omit<Binding, "affirmations">): {
68
175
  bindings: Binding[];
69
176
  created: boolean;
70
177
  suspect: boolean;
71
178
  };
72
- /** Record a re-affirmation against an existing binding, clearing suspicion. */
73
- export declare function affirm(existing: Binding[], obligation: string, currentHash: string, who: string, commit: string, note?: string): {
179
+ /**
180
+ * Record a re-affirmation, clearing suspicion.
181
+ *
182
+ * Affirms **every** binding for the obligation, not the first one found. The
183
+ * judgement being recorded is "I have read the new statement and the evidence
184
+ * still discharges it", and that is a judgement about the requirement rather
185
+ * than about one suite — affirming only the first would leave a sibling suite
186
+ * suspect for a reason nobody could act on. `suite` narrows it when the
187
+ * reviewer means only one.
188
+ */
189
+ export declare function affirm(existing: Binding[], obligation: string, currentHash: string, who: string, commit: string, note?: string, suite?: string): {
74
190
  bindings: Binding[];
75
191
  found: boolean;
76
192
  };
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/evidence/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,2EAA2E;AAC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cAAc,CAAC,GAClC;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAwB7D;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,OAAO,EAAE,EACnB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,GACb;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAkBzC"}
@@ -24,6 +24,13 @@
24
24
  */
25
25
  /** Where a suite's run records live, relative to the store root. */
26
26
  export declare const RUNS_DIR = "runs";
27
+ /**
28
+ * Where a suite's finding-shaped scan records live, relative to the store root.
29
+ *
30
+ * Separate from `runs/` because the two answer different questions and a reader
31
+ * must not have to open a file to learn which kind it is.
32
+ */
33
+ export declare const SCANS_DIR = "scans";
27
34
  /** Schema version carried by every machine-written file in the store. */
28
35
  export declare const STORE_SCHEMA_VERSION = 1;
29
36
  /**
@@ -45,6 +52,14 @@ export interface RunEntry {
45
52
  score?: number;
46
53
  /** Trace ids this symbol carries, as the adapter read them. */
47
54
  traceIds?: string[];
55
+ /**
56
+ * The configuration this entry was executed under — dimension name to value.
57
+ *
58
+ * Present only for a run over a declared configuration space (quire-rs
59
+ * FR-061). It is what lets the auditor say WHICH t-way combinations a run
60
+ * reached, rather than only how many entries it contained.
61
+ */
62
+ config?: Record<string, string>;
48
63
  }
49
64
  /**
50
65
  * One run of ONE suite at ONE commit.
@@ -66,10 +81,93 @@ export interface RunRecord {
66
81
  commit: string;
67
82
  /** Tool and version, as the adapter reported them. */
68
83
  tool: string;
84
+ /**
85
+ * The kind of evidence this run produced, from the declared `test_type`
86
+ * vocabulary (`Unit`, `Property`, `Static`, `Manual`, …) — the same
87
+ * vocabulary the suite registry's `Evidence Kind` column and the catalog's
88
+ * `evidence_kind` use.
89
+ *
90
+ * Optional, and its absence is **not** an invitation to guess. Method
91
+ * conformance used to infer "this was a test run" from `entries.length > 0`,
92
+ * which is true of a transcribed inspection too — so every `Inspection` or
93
+ * `Analysis` obligation recorded through `quoin evidence record` was flagged
94
+ * (agent-ix/quoin#105). With no kind declared the question cannot be asked,
95
+ * and the check says nothing rather than something wrong.
96
+ */
97
+ evidenceKind?: string;
69
98
  /** ISO-8601, supplied by the caller — never read from the clock here. */
70
99
  timestamp: string;
71
100
  entries: RunEntry[];
72
101
  }
102
+ /**
103
+ * One finding a scanner reported.
104
+ *
105
+ * `ruleId` is the join, and it is the reason this record type is worth
106
+ * building: a scanner rule id ⇄ obligation id is a **verification method**
107
+ * discharging a specific obligation, not a generic scan whose output someone
108
+ * reads. The catalog already carries the method (spec-artifacts-process
109
+ * FR-007); this is what discharges it.
110
+ */
111
+ export interface Finding {
112
+ /** The scanner's rule identifier — `RUSTSEC-2026-0190`, a semgrep rule id. */
113
+ ruleId: string;
114
+ /**
115
+ * The scanner's own severity string, verbatim.
116
+ *
117
+ * NOT normalized to a quoin vocabulary. Scanners disagree about what
118
+ * "high" means and quoin judges nothing (FR-034-CON-2); translating here
119
+ * would invent a comparison the tools never made.
120
+ */
121
+ severity?: string;
122
+ message?: string;
123
+ /** Repo-relative path the finding is about, when the tool names one. */
124
+ path?: string;
125
+ line?: number;
126
+ /** Obligation ids this rule discharges, as the adapter read them. */
127
+ traceIds?: string[];
128
+ }
129
+ /**
130
+ * One finding-shaped scan of ONE suite at ONE commit.
131
+ *
132
+ * **Why this is not a `RunRecord`.** Five of the eight formats quoin means to
133
+ * read emit *findings*, not run outcomes: no symbol, no pass/fail. Forced into
134
+ * `RunEntry`, a clean semgrep run and a semgrep run that never executed are
135
+ * indistinguishable — both have zero failing entries. An evidence store whose
136
+ * whole purpose is telling "verified" from "looks verified" cannot carry that
137
+ * ambiguity; it would be the green-matrix-over-dead-links defect reproduced
138
+ * inside the store built to prevent it.
139
+ *
140
+ * **The distinction lives on the record, not in the findings.** The record's
141
+ * existence IS the proof the scan executed — written only when an adapter read
142
+ * a real report envelope. `findings: []` on a present record means *ran and
143
+ * found nothing*, which is evidence. No record at all means *did not run*,
144
+ * which is not. Real tool output already works this way: `cargo audit --json`
145
+ * emits `vulnerabilities.found: false` beside the `database` and `lockfile` it
146
+ * consulted, and a SARIF `run` with an empty `results` array is still a run.
147
+ */
148
+ export interface FindingRecord {
149
+ schemaVersion: number;
150
+ suite: string;
151
+ /** Full commit sha the scan was performed at. */
152
+ commit: string;
153
+ /** Tool and version, as the adapter reported them. */
154
+ tool: string;
155
+ evidenceKind?: string;
156
+ /** ISO-8601, supplied by the caller — never read from the clock here. */
157
+ timestamp: string;
158
+ /**
159
+ * What the scan covered, as the tool reported it: a ruleset name, a policy
160
+ * file, an advisory-database revision.
161
+ *
162
+ * Load-bearing for vacuity. A scan that ran with **no rules enabled** also
163
+ * reports zero findings, and is as empty as one that never ran — but it
164
+ * cannot be told apart by the findings list alone.
165
+ */
166
+ ruleset?: string;
167
+ /** Number of rules the scan actually evaluated, when the tool reports it. */
168
+ rulesEvaluated?: number;
169
+ findings: Finding[];
170
+ }
73
171
  /** Someone re-affirming a binding after the statement it was made against changed. */
74
172
  export interface Affirmation {
75
173
  who: string;
@@ -109,14 +207,21 @@ export interface BindingsFile {
109
207
  schemaVersion: number;
110
208
  bindings: Binding[];
111
209
  }
112
- /** The accepted violation set a ratchet compares against. */
210
+ /**
211
+ * The accepted violation set a ratchet compares against.
212
+ *
213
+ * `accepted` holds `<kind>:<obligation>` keys — **every** finding kind, not two
214
+ * named buckets. The original shape carried `undischarged` and `suspect` only,
215
+ * so `stale-evidence`, `vacuous-evidence`, `method-conformance`,
216
+ * `unknown-method` and `insufficient-multiplicity` could never appear in a
217
+ * baseline and `--ratchet` reported the entire existing backlog for all five —
218
+ * the outcome ratchet mode exists to prevent (agent-ix/quoin#105).
219
+ */
113
220
  export interface BaselineFile {
114
221
  schemaVersion: number;
115
222
  /** Commit the baseline was accepted at. */
116
223
  commit: string;
117
- /** Obligation ids accepted as currently undischarged. */
118
- undischarged: string[];
119
- /** Obligation ids accepted as currently suspect. */
120
- suspect: string[];
224
+ /** Accepted findings as `<kind>:<obligation>`, sorted. */
225
+ accepted: string[];
121
226
  }
122
227
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/evidence/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,oEAAoE;AACpE,eAAO,MAAM,QAAQ,SAAS,CAAC;AAE/B,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC5C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED,sFAAsF;AACtF,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACtB,6EAA6E;IA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