@behavproof/contract-registry 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/dist/architecture.d.ts +6 -0
- package/dist/architecture.d.ts.map +1 -0
- package/dist/architecture.js +120 -0
- package/dist/architecture.js.map +1 -0
- package/dist/assurance-map.d.ts +53 -0
- package/dist/assurance-map.d.ts.map +1 -0
- package/dist/assurance-map.js +100 -0
- package/dist/assurance-map.js.map +1 -0
- package/dist/assurance-runtime.d.ts +512 -0
- package/dist/assurance-runtime.d.ts.map +1 -0
- package/dist/assurance-runtime.js +321 -0
- package/dist/assurance-runtime.js.map +1 -0
- package/dist/assurance.d.ts +59 -0
- package/dist/assurance.d.ts.map +1 -0
- package/dist/assurance.js +173 -0
- package/dist/assurance.js.map +1 -0
- package/dist/discovery.d.ts +20 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +235 -0
- package/dist/discovery.js.map +1 -0
- package/dist/documents.d.ts +18 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +95 -0
- package/dist/documents.js.map +1 -0
- package/dist/graph.d.ts +29 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +61 -0
- package/dist/graph.js.map +1 -0
- package/dist/impact.d.ts +11 -0
- package/dist/impact.d.ts.map +1 -0
- package/dist/impact.js +110 -0
- package/dist/impact.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/probe.d.ts +79 -0
- package/dist/probe.d.ts.map +1 -0
- package/dist/probe.js +99 -0
- package/dist/probe.js.map +1 -0
- package/dist/registry.d.ts +208 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +221 -0
- package/dist/registry.js.map +1 -0
- package/package.json +30 -4
package/dist/impact.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import ts from "typescript-parser";
|
|
2
|
+
import { posix } from "node:path";
|
|
3
|
+
export function analyzeImpact(files, changed, mappings) {
|
|
4
|
+
const dependencies = new Map();
|
|
5
|
+
const unknown = [];
|
|
6
|
+
const calls = [];
|
|
7
|
+
for (const [path, source] of Object.entries(files)) {
|
|
8
|
+
const f = ts.createSourceFile(path, source, ts.ScriptTarget.Latest, true);
|
|
9
|
+
if (f.parseDiagnostics?.length)
|
|
10
|
+
unknown.push(`${path}: incomplete source parse`);
|
|
11
|
+
const deps = new Set();
|
|
12
|
+
dependencies.set(path, deps);
|
|
13
|
+
const knownCalls = new Set(["require"]);
|
|
14
|
+
const scan = (n) => {
|
|
15
|
+
if (ts.isFunctionDeclaration(n) && n.name)
|
|
16
|
+
knownCalls.add(n.name.text);
|
|
17
|
+
if (ts.isImportSpecifier(n))
|
|
18
|
+
knownCalls.add(n.name.text);
|
|
19
|
+
if (ts.isImportClause(n) && n.name)
|
|
20
|
+
knownCalls.add(n.name.text);
|
|
21
|
+
if (ts.isVariableDeclaration(n) &&
|
|
22
|
+
ts.isIdentifier(n.name) &&
|
|
23
|
+
n.initializer &&
|
|
24
|
+
(ts.isArrowFunction(n.initializer) ||
|
|
25
|
+
ts.isFunctionExpression(n.initializer)) &&
|
|
26
|
+
ts.isVariableDeclarationList(n.parent) &&
|
|
27
|
+
(n.parent.flags & ts.NodeFlags.Const) !== 0)
|
|
28
|
+
knownCalls.add(n.name.text);
|
|
29
|
+
ts.forEachChild(n, scan);
|
|
30
|
+
};
|
|
31
|
+
scan(f);
|
|
32
|
+
const resolve = (specifier) => {
|
|
33
|
+
if (!specifier.startsWith(".")) {
|
|
34
|
+
unknown.push(`${path}: external dependency ${specifier}`);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const base = posix.normalize(posix.join(posix.dirname(path), specifier));
|
|
38
|
+
const target = [
|
|
39
|
+
base,
|
|
40
|
+
`${base}.ts`,
|
|
41
|
+
`${base}.tsx`,
|
|
42
|
+
`${base}/index.ts`,
|
|
43
|
+
].find((p) => Object.hasOwn(files, p));
|
|
44
|
+
if (target)
|
|
45
|
+
deps.add(target);
|
|
46
|
+
else
|
|
47
|
+
unknown.push(`${path}: unresolved ${specifier}`);
|
|
48
|
+
};
|
|
49
|
+
const visit = (n) => {
|
|
50
|
+
if (ts.isCallExpression(n) &&
|
|
51
|
+
n.expression.kind !== ts.SyntaxKind.ImportKeyword) {
|
|
52
|
+
if (ts.isIdentifier(n.expression)) {
|
|
53
|
+
calls.push({ file: path, callee: n.expression.text });
|
|
54
|
+
if (!knownCalls.has(n.expression.text))
|
|
55
|
+
unknown.push(`${path}: unresolved call ${n.expression.text}`);
|
|
56
|
+
}
|
|
57
|
+
else if (ts.isPropertyAccessExpression(n.expression)) {
|
|
58
|
+
calls.push({ file: path, callee: n.expression.getText(f) });
|
|
59
|
+
unknown.push(`${path}: unresolved member call`);
|
|
60
|
+
}
|
|
61
|
+
else
|
|
62
|
+
unknown.push(`${path}: computed or indirect call`);
|
|
63
|
+
}
|
|
64
|
+
if (ts.isImportDeclaration(n) && ts.isStringLiteral(n.moduleSpecifier))
|
|
65
|
+
resolve(n.moduleSpecifier.text);
|
|
66
|
+
if (ts.isExportDeclaration(n) &&
|
|
67
|
+
n.moduleSpecifier &&
|
|
68
|
+
ts.isStringLiteral(n.moduleSpecifier))
|
|
69
|
+
resolve(n.moduleSpecifier.text);
|
|
70
|
+
if (ts.isCallExpression(n) &&
|
|
71
|
+
n.expression.kind === ts.SyntaxKind.ImportKeyword) {
|
|
72
|
+
if (n.arguments[0] && ts.isStringLiteral(n.arguments[0]))
|
|
73
|
+
resolve(n.arguments[0].text);
|
|
74
|
+
else
|
|
75
|
+
unknown.push(`${path}: dynamic import`);
|
|
76
|
+
}
|
|
77
|
+
if (ts.isCallExpression(n) &&
|
|
78
|
+
ts.isIdentifier(n.expression) &&
|
|
79
|
+
n.expression.text === "require") {
|
|
80
|
+
if (n.arguments.length === 1 && ts.isStringLiteral(n.arguments[0]))
|
|
81
|
+
resolve(n.arguments[0].text);
|
|
82
|
+
else
|
|
83
|
+
unknown.push(`${path}: dynamic require`);
|
|
84
|
+
}
|
|
85
|
+
ts.forEachChild(n, visit);
|
|
86
|
+
};
|
|
87
|
+
visit(f);
|
|
88
|
+
}
|
|
89
|
+
const affected = new Set(changed);
|
|
90
|
+
let again = true;
|
|
91
|
+
while (again) {
|
|
92
|
+
again = false;
|
|
93
|
+
for (const [p, deps] of dependencies)
|
|
94
|
+
if (!affected.has(p) && [...deps].some((d) => affected.has(d))) {
|
|
95
|
+
affected.add(p);
|
|
96
|
+
again = true;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const contractIds = [
|
|
100
|
+
...new Set([...affected].flatMap((p) => mappings[p] ?? [])),
|
|
101
|
+
].sort();
|
|
102
|
+
return {
|
|
103
|
+
status: unknown.length ? "unknown" : "pass",
|
|
104
|
+
affectedFiles: [...affected].sort(),
|
|
105
|
+
contractIds,
|
|
106
|
+
calls: calls.sort((a, b) => a.file.localeCompare(b.file) || a.callee.localeCompare(b.callee)),
|
|
107
|
+
unknown: unknown.sort(),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=impact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impact.js","sourceRoot":"","sources":["../src/impact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,MAAM,UAAU,aAAa,CAC3B,KAAuC,EACvC,OAA0B,EAC1B,QAAqD;IAErD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAuB,CAAC;IACpD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,KAAK,GAGL,EAAE,CAAC;IACT,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACnD,MAA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C,GAAG,CAAC,CAAC,CAAC,CAAC;gBAChB,KAAK,GAAG,IAAI,CAAC;YACf,CAAC;IACL,CAAC;IACD,MAAM,WAAW,GAAG;QAClB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;KAC5D,CAAC,IAAI,EAAE,CAAC;IACT,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;QAC3C,aAAa,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE;QACnC,WAAW;QACX,KAAK,EAAE,KAAK,CAAC,IAAI,CACf,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CACnE;QACD,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE;KACxB,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./discovery.js";
|
|
2
|
+
export * from "./registry.js";
|
|
3
|
+
export { bindingKey, evaluateAssurance, evaluateScopedClaims, bindRegistrations, } from "./assurance.js";
|
|
4
|
+
export type { ExecutionRow, ClaimScope, ReportBinding } from "./assurance.js";
|
|
5
|
+
export * from "./documents.js";
|
|
6
|
+
export * from "./impact.js";
|
|
7
|
+
export * from "./graph.js";
|
|
8
|
+
export { instrumentFunction, evaluateProbeRuns, PROBE_METHOD } from './probe.js';
|
|
9
|
+
export type { ProbeProtocol, ProbeRun, ProbeRow, TargetFault } from './probe.js';
|
|
10
|
+
export * from "./assurance-map.js";
|
|
11
|
+
export { runAssurance, seededRandom } from './assurance-runtime.js';
|
|
12
|
+
export type { AssuranceRunOptions, RuntimeDriver, RuntimeContext, RuntimeEnvironment } from './assurance-runtime.js';
|
|
13
|
+
export { inspectArchitecture } from './architecture.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAC,kBAAkB,EAAC,iBAAiB,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAC7E,YAAY,EAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAE5E,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAC,mBAAmB,EAAC,aAAa,EAAC,cAAc,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAChH,OAAO,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./discovery.js";
|
|
2
|
+
export * from "./registry.js";
|
|
3
|
+
export { bindingKey, evaluateAssurance, evaluateScopedClaims, bindRegistrations, } from "./assurance.js";
|
|
4
|
+
export * from "./documents.js";
|
|
5
|
+
export * from "./impact.js";
|
|
6
|
+
export * from "./graph.js";
|
|
7
|
+
export { instrumentFunction, evaluateProbeRuns, PROBE_METHOD } from './probe.js';
|
|
8
|
+
export * from "./assurance-map.js";
|
|
9
|
+
export { runAssurance, seededRandom } from './assurance-runtime.js';
|
|
10
|
+
export { inspectArchitecture } from './architecture.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAExB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAC,kBAAkB,EAAC,iBAAiB,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAG7E,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC"}
|
package/dist/probe.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type Contract } from '@behavproof/core';
|
|
2
|
+
import { type ReportBinding } from './assurance.js';
|
|
3
|
+
export declare const PROBE_METHOD = "protected-case-observer-and-vitest-canary-v1";
|
|
4
|
+
export type TargetFault = {
|
|
5
|
+
targetRef: string;
|
|
6
|
+
originalSha256: string;
|
|
7
|
+
mutatedSha256: string;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
10
|
+
/** Generate programs only. The caller runs them in an isolated selected producer. */
|
|
11
|
+
export declare function instrumentFunction(input: {
|
|
12
|
+
source: string;
|
|
13
|
+
targetRef: string;
|
|
14
|
+
expectedSourceHash: string;
|
|
15
|
+
faultValue: unknown;
|
|
16
|
+
}): {
|
|
17
|
+
status: 'unknown';
|
|
18
|
+
reason: string;
|
|
19
|
+
} | {
|
|
20
|
+
status: 'supported';
|
|
21
|
+
targetRef: string;
|
|
22
|
+
originalSha256: string;
|
|
23
|
+
observedSource: string;
|
|
24
|
+
mutatedSource: string;
|
|
25
|
+
fault: {
|
|
26
|
+
targetRef: string;
|
|
27
|
+
originalSha256: string;
|
|
28
|
+
mutatedSha256: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type ProbeRow = ReportBinding & {
|
|
33
|
+
testState: string;
|
|
34
|
+
targetCalls: {
|
|
35
|
+
targetRef: string;
|
|
36
|
+
count: number;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
export type ProbeRun = {
|
|
40
|
+
executionId: string;
|
|
41
|
+
exitCode: number;
|
|
42
|
+
sourceHash: string;
|
|
43
|
+
report: {
|
|
44
|
+
registrations: ReportBinding[];
|
|
45
|
+
contracts: ProbeRow[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export type ProbeProtocol = {
|
|
49
|
+
contract: Contract;
|
|
50
|
+
targetRef: string;
|
|
51
|
+
expectedSourceHash: string;
|
|
52
|
+
main: ProbeRun;
|
|
53
|
+
canary: ProbeRun;
|
|
54
|
+
fault: TargetFault;
|
|
55
|
+
};
|
|
56
|
+
/** Raw observations are never authority: verifyRun authenticates each exact frozen
|
|
57
|
+
* run against independently chosen execution, source transformation and reports.
|
|
58
|
+
* Canary failures are diagnostics, not successful ordinary test evidence.
|
|
59
|
+
*/
|
|
60
|
+
export declare function evaluateProbeRuns(input: ProbeProtocol, verifyRun: (run: ProbeRun, phase: 'main' | 'canary') => unknown): {
|
|
61
|
+
observations: {
|
|
62
|
+
contractId: string;
|
|
63
|
+
caseIds: string[];
|
|
64
|
+
targetRef: string;
|
|
65
|
+
method: string;
|
|
66
|
+
observations: number;
|
|
67
|
+
status: "pass" | "unknown";
|
|
68
|
+
}[];
|
|
69
|
+
canaries: {
|
|
70
|
+
contractId: string;
|
|
71
|
+
caseIds: string[];
|
|
72
|
+
targetRef: string;
|
|
73
|
+
method: string;
|
|
74
|
+
detected: number;
|
|
75
|
+
total: number;
|
|
76
|
+
status: "fail" | "pass" | "unknown";
|
|
77
|
+
}[];
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=probe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe.d.ts","sourceRoot":"","sources":["../src/probe.ts"],"names":[],"mappings":"AACA,OAAO,EAA2E,KAAK,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AACzH,OAAO,EAAmB,KAAK,aAAa,EAAC,MAAM,gBAAgB,CAAC;AACpE,eAAO,MAAM,YAAY,iDAA+C,CAAC;AACzE,MAAM,MAAM,WAAW,GAAC;IAAC,SAAS,EAAC,MAAM,CAAC;IAAA,cAAc,EAAC,MAAM,CAAC;IAAA,aAAa,EAAC,MAAM,CAAC;IAAA,WAAW,EAAC,MAAM,CAAA;CAAC,CAAC;AACzG,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,KAAK,EAAC;IAAC,MAAM,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,kBAAkB,EAAC,MAAM,CAAC;IAAA,UAAU,EAAC,OAAO,CAAA;CAAC;YACxE,SAAS;;;YAwBtC,WAAW;;;;;;;;;;;EAE3B;AACD,MAAM,MAAM,QAAQ,GAAC,aAAa,GAAC;IAAC,SAAS,EAAC,MAAM,CAAC;IAAA,WAAW,EAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAA,KAAK,EAAC,MAAM,CAAA;KAAC,EAAE,CAAA;CAAC,CAAC;AACpG,MAAM,MAAM,QAAQ,GAAC;IAAC,WAAW,EAAC,MAAM,CAAC;IAAA,QAAQ,EAAC,MAAM,CAAC;IAAA,UAAU,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC;QAAC,aAAa,EAAC,aAAa,EAAE,CAAC;QAAA,SAAS,EAAC,QAAQ,EAAE,CAAA;KAAC,CAAA;CAAC,CAAC;AACxI,MAAM,MAAM,aAAa,GAAC;IAAC,QAAQ,EAAC,QAAQ,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,kBAAkB,EAAC,MAAM,CAAC;IAAA,IAAI,EAAC,QAAQ,CAAC;IAAA,MAAM,EAAC,QAAQ,CAAC;IAAA,KAAK,EAAC,WAAW,CAAA;CAAC,CAAC;AAGzI;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAC,aAAa,EAAC,SAAS,EAAC,CAAC,GAAG,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,GAAC,QAAQ,KAAG,OAAO;;;;;;;;;;;;;;;;;;EA8B5G"}
|
package/dist/probe.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import ts from 'typescript-parser';
|
|
2
|
+
import { canonicalJson, hash, hashBytes, HashSchema, RelativePathSchema, ContractSchema } from '@behavproof/core';
|
|
3
|
+
import { bindRegistrations } from './assurance.js';
|
|
4
|
+
export const PROBE_METHOD = 'protected-case-observer-and-vitest-canary-v1';
|
|
5
|
+
/** Generate programs only. The caller runs them in an isolated selected producer. */
|
|
6
|
+
export function instrumentFunction(input) {
|
|
7
|
+
const unsupported = (reason) => ({ status: 'unknown', reason });
|
|
8
|
+
if (Buffer.byteLength(input.source) > 1024 * 1024)
|
|
9
|
+
return unsupported('Source exceeds probe limit');
|
|
10
|
+
const originalSha256 = hashBytes(Buffer.from(input.source));
|
|
11
|
+
if (!HashSchema.safeParse(input.expectedSourceHash).success || originalSha256 !== input.expectedSourceHash)
|
|
12
|
+
return unsupported('Source differs from independently selected target');
|
|
13
|
+
const parts = input.targetRef.split('#');
|
|
14
|
+
if (parts.length !== 2 || !RelativePathSchema.safeParse(parts[0]).success || !/^[$A-Z_a-z][$\w]*$/.test(parts[1]))
|
|
15
|
+
return unsupported('Unsupported target reference');
|
|
16
|
+
const file = ts.createSourceFile(parts[0], input.source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
17
|
+
if (file.parseDiagnostics.length)
|
|
18
|
+
return unsupported('Target source is not valid TypeScript');
|
|
19
|
+
const functions = file.statements.filter((node) => ts.isFunctionDeclaration(node) && node.name?.text === parts[1]);
|
|
20
|
+
if (functions.length !== 1 || !functions[0].body || functions[0].asteriskToken ||
|
|
21
|
+
!functions[0].modifiers?.some(m => m.kind === ts.SyntaxKind.ExportKeyword) ||
|
|
22
|
+
functions[0].modifiers?.some(m => m.kind === ts.SyntaxKind.DefaultKeyword))
|
|
23
|
+
return unsupported('Only one named exported function declaration is supported');
|
|
24
|
+
const original = functions[0], f = ts.factory;
|
|
25
|
+
let hook = '__behavproofObserveTarget';
|
|
26
|
+
while (input.source.includes(hook))
|
|
27
|
+
hook += '_';
|
|
28
|
+
let faultJson;
|
|
29
|
+
try {
|
|
30
|
+
faultJson = canonicalJson(input.faultValue);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return unsupported('Fault value must be plain JSON');
|
|
34
|
+
}
|
|
35
|
+
const observe = f.createExpressionStatement(f.createCallExpression(f.createIdentifier(hook), undefined, [f.createStringLiteral(input.targetRef)]));
|
|
36
|
+
const imported = f.createImportDeclaration(undefined, f.createImportClause(false, undefined, f.createNamedImports([f.createImportSpecifier(false, f.createIdentifier('observeTargetCall'), f.createIdentifier(hook))])), f.createStringLiteral('@behavproof/vitest/probe'));
|
|
37
|
+
const program = (mutated) => {
|
|
38
|
+
const statements = mutated ? [observe, f.createReturnStatement(f.createCallExpression(f.createPropertyAccessExpression(f.createIdentifier('JSON'), 'parse'), undefined, [f.createStringLiteral(faultJson)]))] : [observe, ...original.body.statements];
|
|
39
|
+
const declaration = f.updateFunctionDeclaration(original, original.modifiers, original.asteriskToken, original.name, original.typeParameters, original.parameters, original.type, f.createBlock(statements, true));
|
|
40
|
+
const next = f.updateSourceFile(file, [imported, ...file.statements.map(node => node === original ? declaration : node)]);
|
|
41
|
+
return ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }).printFile(next);
|
|
42
|
+
};
|
|
43
|
+
const observedSource = program(false), mutatedSource = program(true);
|
|
44
|
+
return { status: 'supported', targetRef: input.targetRef, originalSha256, observedSource, mutatedSource,
|
|
45
|
+
fault: { targetRef: input.targetRef, originalSha256, mutatedSha256: hashBytes(Buffer.from(mutatedSource)), description: 'Replace the selected function body with the host-selected distinct JSON fault value' } };
|
|
46
|
+
}
|
|
47
|
+
const freeze = (value) => { if (value && typeof value === 'object') {
|
|
48
|
+
for (const child of Object.values(value))
|
|
49
|
+
freeze(child);
|
|
50
|
+
Object.freeze(value);
|
|
51
|
+
} return value; };
|
|
52
|
+
const identity = (row) => hash({ contractId: row.contractId, caseId: row.caseId, revisionHash: row.revisionHash, bindingHash: row.bindingHash });
|
|
53
|
+
/** Raw observations are never authority: verifyRun authenticates each exact frozen
|
|
54
|
+
* run against independently chosen execution, source transformation and reports.
|
|
55
|
+
* Canary failures are diagnostics, not successful ordinary test evidence.
|
|
56
|
+
*/
|
|
57
|
+
export function evaluateProbeRuns(input, verifyRun) {
|
|
58
|
+
const contract = ContractSchema.parse(input.contract), caseIds = contract.caseIds ?? [], targetRef = input.targetRef;
|
|
59
|
+
let main, canary, mainTrusted = false, canaryTrusted = false;
|
|
60
|
+
try {
|
|
61
|
+
const text = canonicalJson(input);
|
|
62
|
+
if (Buffer.byteLength(text) > 10 * 1024 * 1024)
|
|
63
|
+
throw Error('Probe inventory exceeds limit');
|
|
64
|
+
const p = freeze(JSON.parse(text));
|
|
65
|
+
main = p.main;
|
|
66
|
+
canary = p.canary;
|
|
67
|
+
const valid = (run) => !!run.executionId && Number.isSafeInteger(run.exitCode) && Array.isArray(run.report.registrations) && Array.isArray(run.report.contracts) && run.report.contracts.length <= 10000 && bindRegistrations(run.report.registrations, run.report.contracts, () => true).status === 'pass';
|
|
68
|
+
mainTrusted = valid(main) && main.exitCode === 0 && main.sourceHash === p.expectedSourceHash && HashSchema.safeParse(p.expectedSourceHash).success && verifyRun(main, 'main') === true;
|
|
69
|
+
canaryTrusted = valid(canary) && canary.executionId !== main.executionId && [0, 1].includes(canary.exitCode) &&
|
|
70
|
+
p.fault.targetRef === p.targetRef && p.fault.originalSha256 === p.expectedSourceHash &&
|
|
71
|
+
HashSchema.safeParse(p.fault.mutatedSha256).success && p.fault.mutatedSha256 !== p.fault.originalSha256 &&
|
|
72
|
+
canary.sourceHash === p.fault.mutatedSha256 && !!p.fault.description && verifyRun(canary, 'canary') === true;
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
mainTrusted = false;
|
|
76
|
+
canaryTrusted = false;
|
|
77
|
+
main = undefined;
|
|
78
|
+
canary = undefined;
|
|
79
|
+
}
|
|
80
|
+
const rows = (run, id) => run?.report.contracts.filter(row => row.contractId === contract.id && row.caseId === id && row.revisionHash === contract.revisionHash) ?? [];
|
|
81
|
+
const count = (row) => {
|
|
82
|
+
if (!Array.isArray(row.targetCalls) || row.targetCalls.length > 1000 || row.targetCalls.some(call => !call || typeof call !== 'object' || typeof call.targetRef !== 'string' || !call.targetRef || !Number.isSafeInteger(call.count) || call.count < 0) || new Set(row.targetCalls.map(call => call.targetRef)).size !== row.targetCalls.length)
|
|
83
|
+
return 0;
|
|
84
|
+
return row.targetCalls.find(call => call.targetRef === targetRef)?.count ?? 0;
|
|
85
|
+
};
|
|
86
|
+
const observations = caseIds.map(id => {
|
|
87
|
+
const selected = rows(main, id), total = selected.reduce((n, row) => n + count(row), 0), valid = Number.isSafeInteger(total) && mainTrusted && selected.length > 0 && selected.every(row => row.status === 'pass' && row.testState === 'passed' && Number.isSafeInteger(row.comparisonCount) && row.comparisonCount > 0 && count(row) > 0);
|
|
88
|
+
return { contractId: contract.id, caseIds: [id], targetRef, method: PROBE_METHOD, observations: valid ? total : 0, status: valid ? 'pass' : 'unknown' };
|
|
89
|
+
});
|
|
90
|
+
const canaries = caseIds.map((id, i) => {
|
|
91
|
+
const expected = rows(main, id), actual = rows(canary, id), bound = mainTrusted && canaryTrusted && expected.length > 0 &&
|
|
92
|
+
hash(expected.map(identity).sort()) === hash(actual.map(identity).sort());
|
|
93
|
+
const detected = bound ? actual.filter(row => row.status === 'fail' && row.testState === 'failed' && Number.isSafeInteger(row.comparisonCount) && row.comparisonCount > 0 && count(row) > 0).length : 0;
|
|
94
|
+
const observed = observations[i].status === 'pass', total = bound ? expected.length : 0;
|
|
95
|
+
return { contractId: contract.id, caseIds: [id], targetRef, method: PROBE_METHOD, detected, total, status: bound && observed ? (detected === total ? 'pass' : 'fail') : 'unknown' };
|
|
96
|
+
});
|
|
97
|
+
return { observations, canaries };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=probe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe.js","sourceRoot":"","sources":["../src/probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,SAAS,EAAC,UAAU,EAAC,kBAAkB,EAAC,cAAc,EAAe,MAAM,kBAAkB,CAAC;AACzH,OAAO,EAAC,iBAAiB,EAAoB,MAAM,gBAAgB,CAAC;AACpE,MAAM,CAAC,MAAM,YAAY,GAAC,8CAA8C,CAAC;AAEzE,qFAAqF;AACrF,MAAM,UAAU,kBAAkB,CAAC,KAAmF;IACpH,MAAM,WAAW,GAAC,CAAC,MAAa,EAAC,EAAE,CAAA,CAAC,EAAC,MAAM,EAAC,SAAkB,EAAC,MAAM,EAAC,CAAC,CAAC;IACxE,IAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,GAAC,IAAI,GAAC,IAAI;QAAC,OAAO,WAAW,CAAC,4BAA4B,CAAC,CAAC;IAC9F,MAAM,cAAc,GAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1D,IAAG,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,OAAO,IAAE,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AAC,CAAA,CAAC,CAAA,SAAkB,EAAC,CAAC;IACzL,CAAC,CAAC,CAAC;IACH,OAAO,EAAC,YAAY,EAAC,QAAQ,EAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { type Contract, type Intent, type RegistrySnapshot, type Approval } from "@behavproof/core";
|
|
2
|
+
export type Change = {
|
|
3
|
+
type: string;
|
|
4
|
+
contractId?: string;
|
|
5
|
+
intentId?: string;
|
|
6
|
+
caseId?: string;
|
|
7
|
+
conditionId?: string;
|
|
8
|
+
checkId?: string;
|
|
9
|
+
faultId?: string;
|
|
10
|
+
before?: unknown;
|
|
11
|
+
after?: unknown;
|
|
12
|
+
transitionHash: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function transitionHash(before: Contract, after: Contract | undefined): string;
|
|
15
|
+
export declare function intentTransitionHash(before: Intent, after: Intent | undefined, beforeContracts: readonly string[], afterContracts: readonly string[]): string;
|
|
16
|
+
/** verifyApproval is supplied by an independent trust boundary; data in the repository is not authority. */
|
|
17
|
+
export declare function reconcile(base: Pick<RegistrySnapshot, "contracts" | "intents">, head: Pick<RegistrySnapshot, "contracts" | "intents">, approvals?: readonly Approval[], verifyApproval?: (approval: Approval) => boolean): {
|
|
18
|
+
obligations: {
|
|
19
|
+
id: string;
|
|
20
|
+
assurance?: {
|
|
21
|
+
feature: {
|
|
22
|
+
id: string;
|
|
23
|
+
entrypoints: string[];
|
|
24
|
+
};
|
|
25
|
+
conditions: {
|
|
26
|
+
id: string;
|
|
27
|
+
kind: "architecture" | "effect" | "invariant" | "journey" | "postcondition" | "precondition" | "property";
|
|
28
|
+
statement: string;
|
|
29
|
+
checks: string[];
|
|
30
|
+
requiredFaults: {
|
|
31
|
+
id: string;
|
|
32
|
+
kind: string;
|
|
33
|
+
checkId: string;
|
|
34
|
+
implementation: string;
|
|
35
|
+
detects: ({
|
|
36
|
+
kind: "result";
|
|
37
|
+
id: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: "unchanged";
|
|
40
|
+
id: string;
|
|
41
|
+
scope: string;
|
|
42
|
+
field: string;
|
|
43
|
+
} | {
|
|
44
|
+
kind: "effect";
|
|
45
|
+
id: string;
|
|
46
|
+
scope: string;
|
|
47
|
+
effectId: string;
|
|
48
|
+
} | {
|
|
49
|
+
kind: "rule";
|
|
50
|
+
id: string;
|
|
51
|
+
})[];
|
|
52
|
+
}[];
|
|
53
|
+
}[];
|
|
54
|
+
checks: ({
|
|
55
|
+
id: string;
|
|
56
|
+
targetRef: string;
|
|
57
|
+
method: "example";
|
|
58
|
+
cases: {
|
|
59
|
+
id: string;
|
|
60
|
+
input: import("zod").JSONType;
|
|
61
|
+
expected: import("zod").JSONType;
|
|
62
|
+
}[];
|
|
63
|
+
} | {
|
|
64
|
+
id: string;
|
|
65
|
+
targetRef: string;
|
|
66
|
+
method: "effects";
|
|
67
|
+
cases: {
|
|
68
|
+
id: string;
|
|
69
|
+
input: import("zod").JSONType;
|
|
70
|
+
expected: import("zod").JSONType;
|
|
71
|
+
}[];
|
|
72
|
+
scope: string[];
|
|
73
|
+
resources: {
|
|
74
|
+
scope: string;
|
|
75
|
+
adapter: string;
|
|
76
|
+
targets: string[];
|
|
77
|
+
}[];
|
|
78
|
+
allowedChanges: {
|
|
79
|
+
scope: string;
|
|
80
|
+
field: string;
|
|
81
|
+
}[];
|
|
82
|
+
unchangedFields: {
|
|
83
|
+
scope: string;
|
|
84
|
+
field: string;
|
|
85
|
+
}[];
|
|
86
|
+
effects: {
|
|
87
|
+
id: string;
|
|
88
|
+
scope: string;
|
|
89
|
+
min: number;
|
|
90
|
+
max: number;
|
|
91
|
+
}[];
|
|
92
|
+
window: {
|
|
93
|
+
settledBy: string;
|
|
94
|
+
durationMs: number;
|
|
95
|
+
};
|
|
96
|
+
} | {
|
|
97
|
+
id: string;
|
|
98
|
+
targetRef: string;
|
|
99
|
+
method: "property";
|
|
100
|
+
domain: import("zod").JSONType;
|
|
101
|
+
seed: string;
|
|
102
|
+
runs: number;
|
|
103
|
+
minValid: number;
|
|
104
|
+
maxDiscarded: number;
|
|
105
|
+
maxDiscardRatio?: number | undefined;
|
|
106
|
+
requiredClasses: string[];
|
|
107
|
+
classMinimums?: Record<string, number> | undefined;
|
|
108
|
+
generator: string;
|
|
109
|
+
predicate: string;
|
|
110
|
+
shrinker?: string | undefined;
|
|
111
|
+
} | {
|
|
112
|
+
id: string;
|
|
113
|
+
targetRef: string;
|
|
114
|
+
method: "sequence";
|
|
115
|
+
seed: string;
|
|
116
|
+
generator: string;
|
|
117
|
+
model: string;
|
|
118
|
+
projection: string;
|
|
119
|
+
maxSteps: number;
|
|
120
|
+
minTraces: number;
|
|
121
|
+
requiredActions: string[];
|
|
122
|
+
actionMinimums?: Record<string, number> | undefined;
|
|
123
|
+
} | {
|
|
124
|
+
id: string;
|
|
125
|
+
targetRef: string;
|
|
126
|
+
method: "architecture";
|
|
127
|
+
files: string[];
|
|
128
|
+
rules: {
|
|
129
|
+
id: string;
|
|
130
|
+
from: string[];
|
|
131
|
+
forbidden: string[];
|
|
132
|
+
}[];
|
|
133
|
+
} | {
|
|
134
|
+
id: string;
|
|
135
|
+
targetRef: string;
|
|
136
|
+
method: "journey";
|
|
137
|
+
entrypoint: string;
|
|
138
|
+
environment: import("zod").JSONType;
|
|
139
|
+
mockBoundaries: string[];
|
|
140
|
+
layers: string[];
|
|
141
|
+
layerBindings: {
|
|
142
|
+
id: string;
|
|
143
|
+
adapter: string;
|
|
144
|
+
targetRef: string;
|
|
145
|
+
}[];
|
|
146
|
+
steps: {
|
|
147
|
+
id: string;
|
|
148
|
+
input: import("zod").JSONType;
|
|
149
|
+
expected: import("zod").JSONType;
|
|
150
|
+
action: string;
|
|
151
|
+
layers: string[];
|
|
152
|
+
}[];
|
|
153
|
+
requiredMedia?: string[] | undefined;
|
|
154
|
+
})[];
|
|
155
|
+
} | undefined;
|
|
156
|
+
formal?: {
|
|
157
|
+
modelId: string;
|
|
158
|
+
modelHash: string;
|
|
159
|
+
driverHash?: string | undefined;
|
|
160
|
+
propertyIds: string[];
|
|
161
|
+
} | undefined;
|
|
162
|
+
kind: "api_contract" | "examples" | "external" | "invariant" | "state_machine";
|
|
163
|
+
intentIds: string[];
|
|
164
|
+
revisionHash: string;
|
|
165
|
+
sourceRef: string;
|
|
166
|
+
caseIds?: string[] | undefined;
|
|
167
|
+
risk?: "basic" | "critical" | "standard" | undefined;
|
|
168
|
+
cases?: {
|
|
169
|
+
id: string;
|
|
170
|
+
input: import("zod").JSONType;
|
|
171
|
+
expected: import("zod").JSONType;
|
|
172
|
+
negative?: boolean | undefined;
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
}[];
|
|
175
|
+
intentObligations: {
|
|
176
|
+
id: string;
|
|
177
|
+
statement: string;
|
|
178
|
+
risk: "basic" | "critical" | "standard";
|
|
179
|
+
contentHash: string;
|
|
180
|
+
origin: {
|
|
181
|
+
kind: "external" | "inline" | "manifest";
|
|
182
|
+
ref: string;
|
|
183
|
+
};
|
|
184
|
+
}[];
|
|
185
|
+
changes: Change[];
|
|
186
|
+
};
|
|
187
|
+
export type LifecycleAction = "approve" | "supersede" | "revoke";
|
|
188
|
+
export declare function lifecycleTransitionHash(kind: "intent" | "contract", id: string, from: string, action: "supersede" | "revoke", to: string | null): string;
|
|
189
|
+
export type LifecycleTransition = {
|
|
190
|
+
action: "approve";
|
|
191
|
+
approval: Approval;
|
|
192
|
+
} | {
|
|
193
|
+
action: "revoke";
|
|
194
|
+
approval: Approval;
|
|
195
|
+
} | {
|
|
196
|
+
action: "supersede";
|
|
197
|
+
toHash: string;
|
|
198
|
+
approval: Approval;
|
|
199
|
+
};
|
|
200
|
+
export declare function lifecycle(entity: Intent | Contract, transitions: readonly LifecycleTransition[], verify?: (approval: Approval) => boolean): {
|
|
201
|
+
state: "approved" | "proposed" | "revoked" | "superseded";
|
|
202
|
+
contentHash: string;
|
|
203
|
+
history: {
|
|
204
|
+
action: LifecycleAction;
|
|
205
|
+
approvalId: string;
|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