@agent-ix/quoin 0.21.2 → 0.21.9
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/bin/quoin.js +9 -2
- package/default-modules.yaml +4 -4
- package/dist/advisor/advise.d.ts +91 -5
- package/dist/advisor/advise.d.ts.map +1 -1
- package/dist/advisor/index.d.ts +1 -1
- package/dist/advisor/index.d.ts.map +1 -1
- package/dist/{advisor-x8vSvzWl.js → advisor-BiKhR9Yp.js} +1 -1
- package/dist/assurance/graph.d.ts +8 -0
- package/dist/assurance/graph.d.ts.map +1 -1
- package/dist/auditor/audit.d.ts +51 -17
- package/dist/auditor/audit.d.ts.map +1 -1
- package/dist/auditor/index.d.ts +1 -1
- package/dist/auditor/index.d.ts.map +1 -1
- package/dist/{auditor-B6Hs00oH.js → auditor-ww0MC62a.js} +127 -73
- package/dist/{base-DVl7skpc.js → base-W7vrLi5E.js} +1 -1
- package/dist/cli.d.ts +28 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +20 -10
- package/dist/commands/advise.d.ts.map +1 -1
- package/dist/commands/advise.js +65 -42
- package/dist/commands/assurance.d.ts.map +1 -1
- package/dist/commands/assurance.js +21 -19
- package/dist/commands/catalog/list.js +2 -2
- package/dist/commands/catalog/methods.js +3 -3
- package/dist/commands/catalog/show.js +2 -2
- package/dist/commands/catalog/validate.js +2 -2
- package/dist/commands/completeness.js +2 -2
- package/dist/commands/config/doctor.js +1 -1
- package/dist/commands/config/edit.js +1 -1
- package/dist/commands/config/get.js +1 -1
- package/dist/commands/config/set.js +1 -1
- package/dist/commands/evidence/affirm.d.ts.map +1 -1
- package/dist/commands/evidence/affirm.js +4 -7
- package/dist/commands/evidence/audit.d.ts +8 -0
- package/dist/commands/evidence/audit.d.ts.map +1 -1
- package/dist/commands/evidence/audit.js +39 -36
- package/dist/commands/evidence/baseline.js +5 -5
- package/dist/commands/evidence/gc.d.ts.map +1 -1
- package/dist/commands/evidence/gc.js +3 -3
- package/dist/commands/evidence/index.js +1 -1
- package/dist/commands/evidence/record.js +3 -3
- package/dist/commands/matrix.js +1 -1
- package/dist/commands/module/ensure-defaults.js +3 -3
- package/dist/commands/module/install.js +2 -2
- package/dist/commands/module/list.js +2 -2
- package/dist/commands/module/remove.js +2 -2
- package/dist/commands/review.js +1 -1
- package/dist/commands/to-plan.js +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/write.js +3 -3
- package/dist/{completeness-Bl40nk02.js → completeness-BQDxME0a.js} +1 -1
- package/dist/evidence/adapters/cargo-mutants.d.ts.map +1 -1
- package/dist/evidence/index.d.ts +1 -1
- package/dist/evidence/index.d.ts.map +1 -1
- package/dist/evidence/record.d.ts.map +1 -1
- package/dist/evidence/types.d.ts +23 -0
- package/dist/evidence/types.d.ts.map +1 -1
- package/dist/{evidence-DopNnj0E.js → evidence-BA5vyZJk.js} +134 -136
- package/dist/{flow-command-zfisQlK7.js → flow-command-C_dUJNm-.js} +14 -14
- package/dist/index.js +6 -6
- package/dist/modules-Cn9Htfp0.js +23 -0
- package/dist/{plugins-7DX6rIfX.js → plugins-Byi1bWLD.js} +1 -1
- package/dist/quire/contract.d.ts +8 -2
- package/dist/quire/contract.d.ts.map +1 -1
- package/dist/quire/exec.d.ts +12 -0
- package/dist/quire/exec.d.ts.map +1 -1
- package/dist/quire/index.d.ts +2 -2
- package/dist/quire/index.d.ts.map +1 -1
- package/dist/quire/types.d.ts +131 -0
- package/dist/quire/types.d.ts.map +1 -1
- package/dist/{quire-VZjWaHph.js → quire-UzoK3Azf.js} +281 -273
- package/dist/schemas/coverage-v1.schema.json +89 -5
- package/dist/{version-DxqfsO8n.js → version-BMXhyIie.js} +5 -5
- package/dist/{write-Dkpd6XwW.js → write-BDxILTLC.js} +1 -1
- package/package.json +6 -4
- package/skills/gap-analysis/references/step-3-matrix-verification.md +1 -1
- package/skills/spec-dependency-analysis/SKILL.md +15 -0
- package/skills/spec-failure-domain-analysis/SKILL.md +15 -0
- package/skills/spec-fuzz/SKILL.md +8 -0
- package/skills/spec-integrity-analysis/SKILL.md +15 -0
- package/skills/spec-matrix/SKILL.md +9 -4
- package/skills/spec-matrix/assets/test-matrix-example.md +2 -2
- package/skills/spec-matrix/assets/test-matrix-template.md +3 -3
- package/skills/spec-matrix/workflow-assets/dist/index.d.ts +146 -0
- package/skills/spec-matrix/workflow-assets/dist/index.d.ts.map +1 -0
- package/skills/spec-matrix/workflow-assets/dist/index.js +7525 -0
- package/skills/spec-matrix/workflow-assets/dist/invariants.d.ts +6 -0
- package/skills/spec-matrix/workflow-assets/dist/invariants.d.ts.map +1 -0
- package/skills/spec-review/SKILL.md +8 -0
- package/skills/spec-review/workflow-assets/dist/index.d.ts +146 -0
- package/skills/spec-review/workflow-assets/dist/index.d.ts.map +1 -0
- package/skills/spec-review/workflow-assets/dist/index.js +7525 -0
- package/skills/spec-review/workflow-assets/dist/invariants.d.ts +6 -0
- package/skills/spec-review/workflow-assets/dist/invariants.d.ts.map +1 -0
- package/skills/spec-review/workflow-assets/skills/review/SKILL.md +4 -4
- package/skills/spec-review/workflow-assets/skills/review/scripts/invariants.js +3 -2
- package/skills/spec-review/workflow-assets/skills/review/workflows/review/def.yaml +3 -3
- package/skills/spec-risk-complexity-analysis/SKILL.md +15 -0
- package/skills/spec-scope-boundary-analysis/SKILL.md +15 -0
- package/skills/spec-to-plan/workflow-assets/dist/index.d.ts +146 -0
- package/skills/spec-to-plan/workflow-assets/dist/index.d.ts.map +1 -0
- package/skills/spec-to-plan/workflow-assets/dist/index.js +7525 -0
- package/skills/spec-to-plan/workflow-assets/dist/invariants.d.ts +6 -0
- package/skills/spec-to-plan/workflow-assets/dist/invariants.d.ts.map +1 -0
- package/dist/modules-BEWi5WeN.js +0 -23
package/bin/quoin.js
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { execute } from "@agent-ix/ix-cli-core";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
isVersionRequest,
|
|
7
|
+
packageVersion,
|
|
8
|
+
versionedConfig,
|
|
9
|
+
} from "../dist/cli.js";
|
|
6
10
|
|
|
7
11
|
const argv = process.argv.slice(2);
|
|
8
12
|
|
|
@@ -10,5 +14,8 @@ const argv = process.argv.slice(2);
|
|
|
10
14
|
if (isVersionRequest(argv)) {
|
|
11
15
|
console.log(packageVersion());
|
|
12
16
|
} else {
|
|
13
|
-
|
|
17
|
+
// #196: the config carries the build-time version, so the `--help` VERSION
|
|
18
|
+
// block agrees with `--version` instead of printing package.json's CI
|
|
19
|
+
// placeholder.
|
|
20
|
+
await execute({ loadOptions: await versionedConfig(import.meta.url) });
|
|
14
21
|
}
|
package/default-modules.yaml
CHANGED
|
@@ -10,13 +10,13 @@ schemaVersion: 1
|
|
|
10
10
|
name: quoin-default-modules
|
|
11
11
|
entries:
|
|
12
12
|
- name: spec-artifacts-iso
|
|
13
|
-
version: "0.
|
|
13
|
+
version: "0.18.0"
|
|
14
14
|
defaultEnabled: true
|
|
15
15
|
source:
|
|
16
16
|
type: git-subdir
|
|
17
17
|
url: agent-ix/spec-artifacts-iso
|
|
18
18
|
path: spec_artifacts_iso
|
|
19
|
-
ref: v0.
|
|
19
|
+
ref: v0.18.0
|
|
20
20
|
|
|
21
21
|
- name: spec-artifacts-app
|
|
22
22
|
version: "0.5.0"
|
|
@@ -28,13 +28,13 @@ entries:
|
|
|
28
28
|
ref: v0.5.0
|
|
29
29
|
|
|
30
30
|
- name: spec-artifacts-process
|
|
31
|
-
version: "0.
|
|
31
|
+
version: "0.24.0"
|
|
32
32
|
defaultEnabled: true
|
|
33
33
|
source:
|
|
34
34
|
type: git-subdir
|
|
35
35
|
url: agent-ix/spec-artifacts-process
|
|
36
36
|
path: spec_artifacts_process
|
|
37
|
-
ref: v0.
|
|
37
|
+
ref: v0.24.0
|
|
38
38
|
|
|
39
39
|
- name: spec-objects-business
|
|
40
40
|
version: "0.6.0"
|
package/dist/advisor/advise.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MethodCatalog } from './methods.js';
|
|
2
|
+
import { CoverageDiagnostic } from '../quire/index.js';
|
|
2
3
|
/** What the advisor knows about one obligation before it recommends anything. */
|
|
3
4
|
export interface ObligationFacts {
|
|
4
5
|
id: string;
|
|
@@ -30,6 +31,31 @@ export interface ObligationFacts {
|
|
|
30
31
|
* which is reading it, not judging it.
|
|
31
32
|
*/
|
|
32
33
|
criticality?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* The obligation's structured `parameters`, as quire emits them —
|
|
36
|
+
* `{"target": "< 4 min", "threshold": "< 5 min"}` on an NFR measurement row.
|
|
37
|
+
*
|
|
38
|
+
* The only *structured* signal quire provides about an obligation, and it
|
|
39
|
+
* was typed, parsed and read nowhere while the advisor re-derived everything
|
|
40
|
+
* by regex over the statement prose (agent-ix/quoin#166). A quantified
|
|
41
|
+
* threshold is exactly the fact a verification-method advisor should key on,
|
|
42
|
+
* and the one fact it cannot get wrong by misreading a sentence.
|
|
43
|
+
*/
|
|
44
|
+
parameters?: Record<string, string>;
|
|
45
|
+
/**
|
|
46
|
+
* True when the engine's `uncatalogued-verification-method` diagnostic names
|
|
47
|
+
* this obligation's authored method (agent-ix/quoin#168).
|
|
48
|
+
*
|
|
49
|
+
* Supplied by the caller, never derived here — the same seam as `evidence`:
|
|
50
|
+
* the command joins the coverage payload's diagnostics' `value` against
|
|
51
|
+
* `Obligation.method` by byte equality, which quire-rs CR-091 guarantees.
|
|
52
|
+
* The engine's own catalog knowledge decides what "known" means, so the
|
|
53
|
+
* advisor and the engine cannot disagree about the same value (the ADR-0011
|
|
54
|
+
* discipline). Absent means the classification was unavailable — an engine
|
|
55
|
+
* predating CR-091 — and the advisor degrades to the two-state behaviour
|
|
56
|
+
* rather than guessing.
|
|
57
|
+
*/
|
|
58
|
+
uncataloguedMethod?: boolean;
|
|
33
59
|
}
|
|
34
60
|
/**
|
|
35
61
|
* What the evidence store records about one obligation.
|
|
@@ -41,7 +67,8 @@ export interface ObligationEvidence {
|
|
|
41
67
|
/** True when at least one binding names this obligation. */
|
|
42
68
|
bound: boolean;
|
|
43
69
|
/**
|
|
44
|
-
* Fault-detection scores from runs bound to it
|
|
70
|
+
* Fault-detection scores from runs bound to it — entries whose declared
|
|
71
|
+
* `metric` says they are mutation scores (agent-ix/quoin#138).
|
|
45
72
|
*
|
|
46
73
|
* Empty while `bound` is true is the interesting case, not an error: the
|
|
47
74
|
* obligation is exercised and nothing says the exercise discriminates.
|
|
@@ -68,18 +95,51 @@ export interface Advice {
|
|
|
68
95
|
/** The authored method, normalized. */
|
|
69
96
|
authored?: string | null;
|
|
70
97
|
/**
|
|
71
|
-
* Set when the authored method is
|
|
72
|
-
* advisor had rules to go on.
|
|
73
|
-
*
|
|
98
|
+
* Set when the authored method **is a declared method or class**, is not
|
|
99
|
+
* among the recommendations, AND the advisor had rules to go on. A genuine
|
|
100
|
+
* disagreement — *did you mean to inspect this rather than test it?* —
|
|
101
|
+
* advisory: the human confirms, and the confirmed method is what the auditor
|
|
102
|
+
* later checks conformance against.
|
|
103
|
+
*
|
|
104
|
+
* Never set for an uncatalogued value (agent-ix/quoin#168): a word the
|
|
105
|
+
* catalog has never heard of is a vocabulary problem, not a choice the
|
|
106
|
+
* advisor disagrees with, and conflating the two buried the handful of real
|
|
107
|
+
* disagreements under 90 vocabulary rows.
|
|
74
108
|
*/
|
|
75
109
|
mismatch: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The authored value is in neither the catalog's method set nor its class
|
|
112
|
+
* set, per the engine's own `uncatalogued-verification-method` diagnostic.
|
|
113
|
+
* The fix is a vocabulary fix — add a catalog entry, or author a declared
|
|
114
|
+
* method — so it is reported as its own state, never as a mismatch.
|
|
115
|
+
* Orthogonal to `inconclusive`: the vocabulary fact does not disappear
|
|
116
|
+
* because the advisor was silent.
|
|
117
|
+
*/
|
|
118
|
+
uncatalogued: boolean;
|
|
76
119
|
/**
|
|
77
120
|
* True when no rule matched anything. The honest outcome — an advisor that
|
|
78
121
|
* recommends `Test` because it found nothing is the habit this replaces.
|
|
79
122
|
*/
|
|
80
123
|
inconclusive: boolean;
|
|
81
124
|
}
|
|
82
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Does the regex match anywhere OUTSIDE a hyphenated compound token?
|
|
127
|
+
*
|
|
128
|
+
* `\b` treats a hyphen as a boundary, so `\bunsafe\b` matched inside
|
|
129
|
+
* `unsafe-audit` and a CI wall-clock budget was advised as a memory-safety
|
|
130
|
+
* check (agent-ix/quoin#167). A hyphenated compound is ONE token: a match is
|
|
131
|
+
* discarded when its edge is glued by a hyphen to more word characters —
|
|
132
|
+
* i.e. when it caught a fragment of a compound rather than the whole of one.
|
|
133
|
+
*
|
|
134
|
+
* A match that *contains* its hyphens (`use-after-free`, `constant-time`,
|
|
135
|
+
* `fault-tolerant` up to its stem) is untouched: the guard looks only at the
|
|
136
|
+
* characters just outside the match. And a regex that names the whole
|
|
137
|
+
* compound (`memory[- ]safe(ty)?`, `thread[- ]safe(ty)?`) still matches it,
|
|
138
|
+
* which is how a compound earns a characteristic: by being named, not by
|
|
139
|
+
* containing a keyword.
|
|
140
|
+
*/
|
|
141
|
+
export declare function matchesOutsideCompound(re: RegExp, text: string): boolean;
|
|
142
|
+
export declare function characteristicsOf(statement: string, criticality?: string | null, evidence?: ObligationEvidence, parameters?: Record<string, string>): string[];
|
|
83
143
|
/**
|
|
84
144
|
* Every `characteristics` value any code path in quoin can produce.
|
|
85
145
|
*
|
|
@@ -110,4 +170,30 @@ export declare function mintableCharacteristics(): Set<string>;
|
|
|
110
170
|
* as a deterministic tiebreak, so the same input always yields the same order.
|
|
111
171
|
*/
|
|
112
172
|
export declare function advise(catalog: MethodCatalog, facts: ObligationFacts): Advice;
|
|
173
|
+
/** The diagnostic reason quire mints for a method the catalog never declared. */
|
|
174
|
+
export declare const UNCATALOGUED_METHOD_REASON = "uncatalogued-verification-method";
|
|
175
|
+
/** What the coverage payload's diagnostics say about authored-method vocabulary. */
|
|
176
|
+
export interface UncataloguedMethods {
|
|
177
|
+
/**
|
|
178
|
+
* Authored methods the engine diagnosed as uncatalogued — each `value`
|
|
179
|
+
* byte-equal to the `Obligation.method` it is about (quire-rs CR-091).
|
|
180
|
+
*/
|
|
181
|
+
values: Set<string>;
|
|
182
|
+
/**
|
|
183
|
+
* True when a diagnostic carried the reason but no `value`: the engine
|
|
184
|
+
* predates the CR-091 classification, so uncatalogued values cannot be told
|
|
185
|
+
* from genuine disagreements. The caller must degrade to the two-state
|
|
186
|
+
* behaviour and say so, rather than misclassify.
|
|
187
|
+
*/
|
|
188
|
+
degraded: boolean;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* The uncatalogued-method join, read off a coverage payload's diagnostics.
|
|
192
|
+
*
|
|
193
|
+
* No diagnostics, or none with the reason, yields an empty set with
|
|
194
|
+
* `degraded: false`: under an engine of either vintage that means every
|
|
195
|
+
* authored value is catalogued, and the three-state split degenerates to the
|
|
196
|
+
* two-state behaviour *correctly* — nothing was there to classify.
|
|
197
|
+
*/
|
|
198
|
+
export declare function uncataloguedAuthoredMethods(diagnostics: CoverageDiagnostic[] | undefined): UncataloguedMethods;
|
|
113
199
|
//# sourceMappingURL=advise.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advise.d.ts","sourceRoot":"","sources":["../../src/advisor/advise.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"advise.d.ts","sourceRoot":"","sources":["../../src/advisor/advise.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,cAAc,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC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IAAI,CAAC;IACzB;;;;;;;;;;;OAWG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB;AAkRD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAWxE;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,EAC3B,QAAQ,CAAC,EAAE,kBAAkB,EAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAClC,MAAM,EAAE,CAmDV;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,IAAI,GAAG,CAAC,MAAM,CAAC,CASrD;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,GAAG,MAAM,CAgE7E;AAED,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E,oFAAoF;AACpF,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB;;;;;OAKG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,kBAAkB,EAAE,GAAG,SAAS,GAC5C,mBAAmB,CASrB"}
|
package/dist/advisor/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* happens.
|
|
7
7
|
*/
|
|
8
8
|
export { loadMethodCatalog, methodClasses, type MethodCatalog, type VerificationMethod, } from './methods.js';
|
|
9
|
-
export { advise, characteristicsOf, mintableCharacteristics, type Advice, type MatchReason, type ObligationEvidence, type ObligationFacts, type Recommendation, } from './advise.js';
|
|
9
|
+
export { advise, characteristicsOf, mintableCharacteristics, uncataloguedAuthoredMethods, UNCATALOGUED_METHOD_REASON, type Advice, type MatchReason, type ObligationEvidence, type ObligationFacts, type Recommendation, type UncataloguedMethods, } from './advise.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/advisor/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,kBAAkB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/advisor/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,kBAAkB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,0BAA0B,EAC1B,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,aAAa,CAAC"}
|
|
@@ -25,6 +25,14 @@ export interface CaseNode {
|
|
|
25
25
|
export interface AssuranceCase {
|
|
26
26
|
/** Top-level claims, one tree each. */
|
|
27
27
|
claims: CaseNode[];
|
|
28
|
+
/**
|
|
29
|
+
* Present exactly when `claims` is empty: why there is no case, naming the
|
|
30
|
+
* claim types that were searched. The human renderer already explained this
|
|
31
|
+
* (`render.ts`); the JSON payload carried no equivalent, so a machine
|
|
32
|
+
* consumer could not tell "the assurance case is clean" from "nothing
|
|
33
|
+
* matched, so nothing was argued" (#170).
|
|
34
|
+
*/
|
|
35
|
+
reason?: string;
|
|
28
36
|
/**
|
|
29
37
|
* Requirements reachable from no claim.
|
|
30
38
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/assurance/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,2DAA2D;AAC3D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,qDAAqD;IACrD,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAYD,MAAM,WAAW,SAAS;IACxB,mDAAmD;IACnD,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B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D;IACrD,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAYD,MAAM,WAAW,SAAS;IACxB,mDAAmD;IACnD,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,iDAAiD;IACjD,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAsFzD;AAgGD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAG1D"}
|
package/dist/auditor/audit.d.ts
CHANGED
|
@@ -5,11 +5,27 @@ import { MethodCatalog } from '../advisor/index.js';
|
|
|
5
5
|
export type Severity = "low" | "medium" | "high";
|
|
6
6
|
/** One thing wrong with the evidence for one obligation. */
|
|
7
7
|
export interface Finding {
|
|
8
|
-
kind: "suspect-link" | "stale-evidence" | "vacuous-evidence" | "combinatorial-gap" | "undischarged" | "method-conformance" | "unknown-method" | "insufficient-multiplicity" | "insufficient-mutation-score" | "unmeasured-mutation-score";
|
|
8
|
+
kind: "suspect-link" | "stale-evidence" | "vacuous-evidence" | "combinatorial-gap" | "undischarged" | "method-conformance" | "unknown-method" | "insufficient-multiplicity" | "insufficient-mutation-score" | "unmeasured-mutation-score" | "mocked-confirmation";
|
|
9
9
|
obligation: string;
|
|
10
10
|
severity: Severity;
|
|
11
11
|
summary: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* A stand-in a suite injects for real behaviour.
|
|
15
|
+
*
|
|
16
|
+
* Pass 2 found `FR-017-AC-7`'s trusted-UI confirmation had NO implementation,
|
|
17
|
+
* and its test passed by injecting `Confirmation::allow()` — mocking exactly
|
|
18
|
+
* the behaviour the criterion verifies. The test was green, the AC was green,
|
|
19
|
+
* and the behaviour did not exist.
|
|
20
|
+
*/
|
|
21
|
+
export interface MockInjection {
|
|
22
|
+
/** Suite the injection was observed in. */
|
|
23
|
+
suite: string;
|
|
24
|
+
/** Symbol doing the injecting. */
|
|
25
|
+
symbol: string;
|
|
26
|
+
/** Identifiers substituted for real behaviour — `Confirmation::allow`. */
|
|
27
|
+
injects: string[];
|
|
28
|
+
}
|
|
13
29
|
/** What the auditor was given to read. */
|
|
14
30
|
export interface AuditInput {
|
|
15
31
|
/** Obligations as quire derives them today. */
|
|
@@ -18,6 +34,15 @@ export interface AuditInput {
|
|
|
18
34
|
bindings: Binding[];
|
|
19
35
|
/** Every run record the store holds, newest per suite. */
|
|
20
36
|
runs: RunRecord[];
|
|
37
|
+
/**
|
|
38
|
+
* What each suite's tests INJECT in place of real behaviour (#204).
|
|
39
|
+
*
|
|
40
|
+
* Supplied by the caller because the auditor reads the store, not source —
|
|
41
|
+
* and #204 asked to extend `evidence audit`, not to build a second system.
|
|
42
|
+
* An absent list means "nobody looked", never "nothing was mocked": the
|
|
43
|
+
* check stays silent, the same posture `scanIsVacuous` takes.
|
|
44
|
+
*/
|
|
45
|
+
injections?: MockInjection[];
|
|
21
46
|
/**
|
|
22
47
|
* Every finding-shaped scan record the store holds, newest per suite
|
|
23
48
|
* (FR-034).
|
|
@@ -61,28 +86,37 @@ export interface AuditReport {
|
|
|
61
86
|
*/
|
|
62
87
|
export declare function audit(input: AuditInput): AuditReport;
|
|
63
88
|
/**
|
|
64
|
-
*
|
|
65
|
-
* is absent.
|
|
89
|
+
* Fault-detection scores among the runs bound to this obligation.
|
|
66
90
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
91
|
+
* **Filtered on the entry's own `metric`, never on the tool name.**
|
|
92
|
+
* `RunEntry.score` is deliberately generic — its own contract says "a mutation
|
|
93
|
+
* score, a coverage percentage, a measured latency" — so reading every scored
|
|
94
|
+
* entry would compare a p95 latency in milliseconds against a floor of `0.8`
|
|
95
|
+
* and report the obligation as failing. The first draft did exactly that; the
|
|
96
|
+
* first fix scoped by tool name against the catalog's
|
|
97
|
+
* `mutation-testing.tooling`, which named a method id in the engine, was a
|
|
98
|
+
* tool allowlist by another name, and did not generalize. The adapter now
|
|
99
|
+
* names what it measured at the point of recording (agent-ix/quoin#138), and
|
|
100
|
+
* an entry without a `metric` is not a mutation score — no fallback read of
|
|
101
|
+
* the tool string.
|
|
71
102
|
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
103
|
+
* Exported for the advisor (agent-ix/quoin#158), which needs the same answer
|
|
104
|
+
* to decide whether anything has measured that the tests discriminate. One
|
|
105
|
+
* definition, so the auditor's finding and the advisor's recommendation cannot
|
|
106
|
+
* disagree about what a score is.
|
|
75
107
|
*/
|
|
76
|
-
export declare function toolsFor(catalog: AuditInput["catalog"], methodId: string): Set<string> | null;
|
|
77
108
|
/**
|
|
78
|
-
*
|
|
109
|
+
* How much of an injected identifier must overlap the statement's own words
|
|
110
|
+
* before the injection is read as standing in for the verified behaviour.
|
|
79
111
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
112
|
+
* Deliberately high. A test legitimately mocks a clock, a filesystem, a
|
|
113
|
+
* network — all of which share nothing with the statement. What this is
|
|
114
|
+
* looking for is the narrow case where the mock's NAME is the statement's
|
|
115
|
+
* subject, which is what `Confirmation::allow` against a trusted-UI
|
|
116
|
+
* confirmation criterion looks like.
|
|
84
117
|
*/
|
|
85
|
-
export declare
|
|
118
|
+
export declare const MOCK_SUBJECT_FLOOR = 0.5;
|
|
119
|
+
export declare function scoresFor(bindings: Binding[], runs: RunRecord[]): number[];
|
|
86
120
|
/** The baseline key for one finding. */
|
|
87
121
|
export declare function findingKey(finding: Finding): string;
|
|
88
122
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/auditor/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,kEAAkE;AAClE,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEjD,4DAA4D;AAC5D,MAAM,WAAW,OAAO;IACtB,IAAI,EACA,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,oBAAoB,GACpB,gBAAgB,GAChB,2BAA2B,GAC3B,6BAA6B,GAC7B,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/auditor/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,kEAAkE;AAClE,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEjD,4DAA4D;AAC5D,MAAM,WAAW,OAAO;IACtB,IAAI,EACA,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,oBAAoB,GACpB,gBA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CAAC;AA+DtC,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAgB1E;AAED,wCAAwC;AACxC,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GAC/B,OAAO,EAAE,CAKX;AAED,0DAA0D;AAC1D,wBAAgB,KAAK,CACnB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,WAAW,GACjB;IAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,CAO3C"}
|
package/dist/auditor/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Reads the store and reports. Runs nothing (ADR-0011 invariant 1): an auditor
|
|
5
5
|
* that could re-run a suite could also make a finding disappear by re-running it.
|
|
6
6
|
*/
|
|
7
|
-
export { audit, delta, findingKey, ratchet, scoresFor,
|
|
7
|
+
export { audit, delta, findingKey, ratchet, scoresFor, type AuditInput, type AuditReport, type Finding, type Severity, } from './audit.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auditor/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auditor/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,GACd,MAAM,YAAY,CAAC"}
|