@vizejs/marquette 0.299.1 → 0.303.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/LICENSE +21 -0
- package/README.md +24 -3
- package/dist/application-contract.schema.json +167 -0
- package/dist/test-run-admission.d.mts +58 -2
- package/dist/test-run-admission.d.mts.map +1 -1
- package/dist/test-run-admission.mjs +100 -2
- package/dist/test-run-admission.mjs.map +1 -1
- package/dist/test-run-admission.schema.json +84 -0
- package/dist/test-run-canonical-CB-KzZxk.d.mts +35 -0
- package/dist/test-run-canonical-CB-KzZxk.d.mts.map +1 -0
- package/dist/test-run-canonical.d.mts +2 -35
- package/dist/test-run-check.d.mts +80 -0
- package/dist/test-run-check.d.mts.map +1 -0
- package/dist/test-run-check.mjs +116 -0
- package/dist/test-run-check.mjs.map +1 -0
- package/dist/test-run-check.schema.json +82 -0
- package/dist/test-run-evidence.schema.json +266 -0
- package/dist/test-run-transition.d.mts +146 -0
- package/dist/test-run-transition.d.mts.map +1 -0
- package/dist/test-run-transition.mjs +188 -0
- package/dist/test-run-transition.mjs.map +1 -0
- package/dist/test-run-transition.schema.json +148 -0
- package/dist/{test-run-validate-XF0vyoWI.mjs → test-run-validate-C_KR031E.mjs} +5 -5
- package/dist/test-run-validate-C_KR031E.mjs.map +1 -0
- package/dist/test-run-validate.mjs +1 -1
- package/package.json +27 -14
- package/dist/test-run-canonical.d.mts.map +0 -1
- package/dist/test-run-validate-XF0vyoWI.mjs.map +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { i as TestRunEvidence } from "./test-run-model-DkllmEsY.mjs";
|
|
2
|
+
import { MarquetteDiagnostic } from "./validate.mjs";
|
|
3
|
+
import { TestRunAdmissionDecision, TestRunCandidate } from "./test-run-admission.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/test-run-check.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Serialized `format` marker for retained tests-check records.
|
|
8
|
+
*
|
|
9
|
+
* Readers must reject any other value before trusting the record.
|
|
10
|
+
*/
|
|
11
|
+
declare const TEST_RUN_CHECK_FORMAT = "vize.test-run.check";
|
|
12
|
+
/**
|
|
13
|
+
* Current serialized tests-check format.
|
|
14
|
+
*
|
|
15
|
+
* Readers must reject a higher value until they explicitly support it.
|
|
16
|
+
*/
|
|
17
|
+
declare const TEST_RUN_CHECK_FORMAT_VERSION = 1;
|
|
18
|
+
/**
|
|
19
|
+
* Retained, release-bound `tests` check for one deployment decision.
|
|
20
|
+
*
|
|
21
|
+
* The record replaces every generic test-result reference — a summary blob,
|
|
22
|
+
* a report path, or a green workflow label — with the exact
|
|
23
|
+
* `test-run:<sha256>` admission id of an independently verified run, the six
|
|
24
|
+
* candidate facts the run was admitted for, and the identity and instant of
|
|
25
|
+
* the independent observer that recorded the admission. A release decision
|
|
26
|
+
* retaining anything else as its tests evidence cannot pass
|
|
27
|
+
* {@link verifyTestRunCheck}.
|
|
28
|
+
*/
|
|
29
|
+
interface TestRunCheck {
|
|
30
|
+
/** Serialized format marker; always {@link TEST_RUN_CHECK_FORMAT}. */
|
|
31
|
+
readonly format: typeof TEST_RUN_CHECK_FORMAT;
|
|
32
|
+
/**
|
|
33
|
+
* Serialized format version.
|
|
34
|
+
*
|
|
35
|
+
* Defaults to {@link TEST_RUN_CHECK_FORMAT_VERSION}.
|
|
36
|
+
*/
|
|
37
|
+
readonly formatVersion?: typeof TEST_RUN_CHECK_FORMAT_VERSION;
|
|
38
|
+
/** Exact `test-run:<sha256>` admission id of the observed run. */
|
|
39
|
+
readonly evidence: string;
|
|
40
|
+
/** Exact candidate facts the run was admitted for. */
|
|
41
|
+
readonly candidate: TestRunCandidate;
|
|
42
|
+
/**
|
|
43
|
+
* Identity of the independent observer that recorded the admission.
|
|
44
|
+
*
|
|
45
|
+
* The observer is the trusted promotion boundary, never the runner that
|
|
46
|
+
* executed the tests.
|
|
47
|
+
*/
|
|
48
|
+
readonly observer: string;
|
|
49
|
+
/** Millisecond-precision UTC instant the admission was observed. */
|
|
50
|
+
readonly observedAt: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Validates a retained tests-check record structurally.
|
|
54
|
+
*
|
|
55
|
+
* Diagnostics use `check.` paths and are deterministic and sorted by path,
|
|
56
|
+
* code, and message. A generic evidence reference fails here with
|
|
57
|
+
* `VIZE_MARQUETTE_141`: only an exact `test-run:<sha256>` admission id can
|
|
58
|
+
* name retained test evidence. Structural validity never admits anything by
|
|
59
|
+
* itself; {@link verifyTestRunCheck} must confirm the record against the
|
|
60
|
+
* caller's candidate and the retained run. Codes, paths, messages, and
|
|
61
|
+
* ordering are identical to the native implementation.
|
|
62
|
+
*/
|
|
63
|
+
declare function validateTestRunCheck(check: TestRunCheck): MarquetteDiagnostic[];
|
|
64
|
+
/**
|
|
65
|
+
* Verifies one retained tests check against the caller's own facts.
|
|
66
|
+
*
|
|
67
|
+
* The caller supplies the candidate it is deciding from its own trusted
|
|
68
|
+
* facts; the retained check must validate structurally, bind that candidate
|
|
69
|
+
* exactly, name an observer independent from the run's runner, and be
|
|
70
|
+
* observed no earlier than the run's completed verification. The referenced
|
|
71
|
+
* record is then admitted exactly like {@link admitTestRun}: canonical
|
|
72
|
+
* fingerprint, candidate bindings, expiry at `now`, verification outcome,
|
|
73
|
+
* and skipped-test accounting all fail closed. Diagnostics, denial codes,
|
|
74
|
+
* and ordering are identical to the native implementation, as pinned by the
|
|
75
|
+
* shared check-decision fixtures.
|
|
76
|
+
*/
|
|
77
|
+
declare function verifyTestRunCheck(check: TestRunCheck, candidate: TestRunCandidate, evidence: TestRunEvidence, now: string): Promise<TestRunAdmissionDecision>;
|
|
78
|
+
//#endregion
|
|
79
|
+
export { TEST_RUN_CHECK_FORMAT, TEST_RUN_CHECK_FORMAT_VERSION, TestRunCheck, validateTestRunCheck, verifyTestRunCheck };
|
|
80
|
+
//# sourceMappingURL=test-run-check.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-run-check.d.mts","names":[],"sources":["../src/test-run-check.ts"],"mappings":";;;;;;;AAwBA;;;cAAa,qBAAA;;AAOb;;;;cAAa,6BAAA;AAab;;;;;;;;;;;AAAA,UAAiB,YAAA;EAUN;EAAA,SARA,MAAA,SAAe,qBAAA;EAUJ;;;;;EAAA,SAJX,aAAA,UAAuB,6BAAA;EA2BE;EAAA,SAzBzB,QAAA;EAyBmE;EAAA,SAvBnE,SAAA,EAAW,gBAAA;EAuBe;;;;AA4DrC;;EA5DqC,SAhB1B,QAAA;EA6EF;EAAA,SA3EE,UAAA;AAAA;;;;;;;;;;;;iBAcK,oBAAA,CAAqB,KAAA,EAAO,YAAA,GAAe,mBAAA;;;;;;;;;;;;;;iBA4DrC,kBAAA,CACpB,KAAA,EAAO,YAAA,EACP,SAAA,EAAW,gBAAA,EACX,QAAA,EAAU,eAAA,EACV,GAAA,WACC,OAAA,CAAQ,wBAAA"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { a as checkDigest, c as checkSourceRevision, d as isStrictTimestamp, l as checkTimestamp, o as checkIdentifier, u as error } from "./test-run-validate-C_KR031E.mjs";
|
|
2
|
+
import { parseTestRunAdmissionId } from "./test-run-canonical.mjs";
|
|
3
|
+
import { admitTestRun, testRunDenialCode } from "./test-run-admission.mjs";
|
|
4
|
+
//#region src/test-run-check.ts
|
|
5
|
+
/**
|
|
6
|
+
* Serialized `format` marker for retained tests-check records.
|
|
7
|
+
*
|
|
8
|
+
* Readers must reject any other value before trusting the record.
|
|
9
|
+
*/
|
|
10
|
+
const TEST_RUN_CHECK_FORMAT = "vize.test-run.check";
|
|
11
|
+
/**
|
|
12
|
+
* Current serialized tests-check format.
|
|
13
|
+
*
|
|
14
|
+
* Readers must reject a higher value until they explicitly support it.
|
|
15
|
+
*/
|
|
16
|
+
const TEST_RUN_CHECK_FORMAT_VERSION = 1;
|
|
17
|
+
/**
|
|
18
|
+
* Validates a retained tests-check record structurally.
|
|
19
|
+
*
|
|
20
|
+
* Diagnostics use `check.` paths and are deterministic and sorted by path,
|
|
21
|
+
* code, and message. A generic evidence reference fails here with
|
|
22
|
+
* `VIZE_MARQUETTE_141`: only an exact `test-run:<sha256>` admission id can
|
|
23
|
+
* name retained test evidence. Structural validity never admits anything by
|
|
24
|
+
* itself; {@link verifyTestRunCheck} must confirm the record against the
|
|
25
|
+
* caller's candidate and the retained run. Codes, paths, messages, and
|
|
26
|
+
* ordering are identical to the native implementation.
|
|
27
|
+
*/
|
|
28
|
+
function validateTestRunCheck(check) {
|
|
29
|
+
const diagnostics = [];
|
|
30
|
+
if (check.format !== "vize.test-run.check") diagnostics.push(error("VIZE_MARQUETTE_101", "check.format", "unsupported tests-check format marker"));
|
|
31
|
+
if ((check.formatVersion ?? 1) !== 1) diagnostics.push(error("VIZE_MARQUETTE_102", "check.formatVersion", "unsupported tests-check format version"));
|
|
32
|
+
if (parseTestRunAdmissionId(check.evidence) === void 0) diagnostics.push(error("VIZE_MARQUETTE_141", "check.evidence", "check evidence must be test-run: followed by 64 lowercase hexadecimal characters"));
|
|
33
|
+
const candidate = check.candidate;
|
|
34
|
+
checkIdentifier(candidate.application, "check.candidate.application", diagnostics);
|
|
35
|
+
checkIdentifier(candidate.environment, "check.candidate.environment", diagnostics);
|
|
36
|
+
checkDigest(candidate.contractFingerprint, "check.candidate.contractFingerprint", diagnostics);
|
|
37
|
+
checkSourceRevision(candidate.sourceRevision, "check.candidate.sourceRevision", diagnostics);
|
|
38
|
+
if (candidate.release.length === 0 || candidate.release.length > 256) diagnostics.push(error("VIZE_MARQUETTE_106", "check.candidate.release", "release must be between 1 and 256 characters"));
|
|
39
|
+
checkDigest(candidate.artifactFingerprint, "check.candidate.artifactFingerprint", diagnostics);
|
|
40
|
+
checkIdentifier(check.observer, "check.observer", diagnostics);
|
|
41
|
+
checkTimestamp(check.observedAt, "check.observedAt", diagnostics);
|
|
42
|
+
sortDiagnostics(diagnostics);
|
|
43
|
+
return diagnostics;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Verifies one retained tests check against the caller's own facts.
|
|
47
|
+
*
|
|
48
|
+
* The caller supplies the candidate it is deciding from its own trusted
|
|
49
|
+
* facts; the retained check must validate structurally, bind that candidate
|
|
50
|
+
* exactly, name an observer independent from the run's runner, and be
|
|
51
|
+
* observed no earlier than the run's completed verification. The referenced
|
|
52
|
+
* record is then admitted exactly like {@link admitTestRun}: canonical
|
|
53
|
+
* fingerprint, candidate bindings, expiry at `now`, verification outcome,
|
|
54
|
+
* and skipped-test accounting all fail closed. Diagnostics, denial codes,
|
|
55
|
+
* and ordering are identical to the native implementation, as pinned by the
|
|
56
|
+
* shared check-decision fixtures.
|
|
57
|
+
*/
|
|
58
|
+
async function verifyTestRunCheck(check, candidate, evidence, now) {
|
|
59
|
+
const diagnostics = validateTestRunCheck(check);
|
|
60
|
+
const bindings = [
|
|
61
|
+
[
|
|
62
|
+
check.candidate.application,
|
|
63
|
+
candidate.application,
|
|
64
|
+
"application",
|
|
65
|
+
"application"
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
check.candidate.environment,
|
|
69
|
+
candidate.environment,
|
|
70
|
+
"environment",
|
|
71
|
+
"environment"
|
|
72
|
+
],
|
|
73
|
+
[
|
|
74
|
+
check.candidate.contractFingerprint,
|
|
75
|
+
candidate.contractFingerprint,
|
|
76
|
+
"contractFingerprint",
|
|
77
|
+
"contract fingerprint"
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
check.candidate.sourceRevision,
|
|
81
|
+
candidate.sourceRevision,
|
|
82
|
+
"sourceRevision",
|
|
83
|
+
"source revision"
|
|
84
|
+
],
|
|
85
|
+
[
|
|
86
|
+
check.candidate.release,
|
|
87
|
+
candidate.release,
|
|
88
|
+
"release",
|
|
89
|
+
"release"
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
check.candidate.artifactFingerprint,
|
|
93
|
+
candidate.artifactFingerprint,
|
|
94
|
+
"artifactFingerprint",
|
|
95
|
+
"artifact fingerprint"
|
|
96
|
+
]
|
|
97
|
+
];
|
|
98
|
+
for (const [recorded, expected, property, field] of bindings) if (recorded !== expected) diagnostics.push(error("VIZE_MARQUETTE_149", `check.candidate.${property}`, `check does not bind the candidate ${field}`));
|
|
99
|
+
if (check.observer === evidence.runner.identity) diagnostics.push(error("VIZE_MARQUETTE_151", "check.observer", "check observer must be independent from the run's runner"));
|
|
100
|
+
if (isStrictTimestamp(check.observedAt) && check.observedAt < evidence.verification.completedAt) diagnostics.push(error("VIZE_MARQUETTE_150", "check.observedAt", "observation must not precede the completed verification"));
|
|
101
|
+
diagnostics.push(...await admitTestRun(evidence, candidate, check.evidence, now));
|
|
102
|
+
sortDiagnostics(diagnostics);
|
|
103
|
+
const denialCodes = [...new Set(diagnostics.map(testRunDenialCode))].sort();
|
|
104
|
+
return {
|
|
105
|
+
allowed: diagnostics.length === 0,
|
|
106
|
+
denialCodes,
|
|
107
|
+
diagnostics
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function sortDiagnostics(diagnostics) {
|
|
111
|
+
diagnostics.sort((left, right) => left.path !== right.path ? left.path < right.path ? -1 : 1 : left.code !== right.code ? left.code < right.code ? -1 : 1 : left.message < right.message ? -1 : left.message > right.message ? 1 : 0);
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { TEST_RUN_CHECK_FORMAT, TEST_RUN_CHECK_FORMAT_VERSION, validateTestRunCheck, verifyTestRunCheck };
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=test-run-check.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-run-check.mjs","names":[],"sources":["../src/test-run-check.ts"],"sourcesContent":["import type { TestRunEvidence } from \"./test-run-model.js\";\nimport type { MarquetteDiagnostic } from \"./validate.js\";\nimport {\n admitTestRun,\n testRunDenialCode,\n type TestRunAdmissionDecision,\n type TestRunCandidate,\n type TestRunDenialCode,\n} from \"./test-run-admission.js\";\nimport { parseTestRunAdmissionId } from \"./test-run-canonical.js\";\nimport {\n checkDigest,\n checkIdentifier,\n checkSourceRevision,\n checkTimestamp,\n error,\n isStrictTimestamp,\n} from \"./test-run-validate-rules.js\";\n\n/**\n * Serialized `format` marker for retained tests-check records.\n *\n * Readers must reject any other value before trusting the record.\n */\nexport const TEST_RUN_CHECK_FORMAT = \"vize.test-run.check\";\n\n/**\n * Current serialized tests-check format.\n *\n * Readers must reject a higher value until they explicitly support it.\n */\nexport const TEST_RUN_CHECK_FORMAT_VERSION = 1;\n\n/**\n * Retained, release-bound `tests` check for one deployment decision.\n *\n * The record replaces every generic test-result reference — a summary blob,\n * a report path, or a green workflow label — with the exact\n * `test-run:<sha256>` admission id of an independently verified run, the six\n * candidate facts the run was admitted for, and the identity and instant of\n * the independent observer that recorded the admission. A release decision\n * retaining anything else as its tests evidence cannot pass\n * {@link verifyTestRunCheck}.\n */\nexport interface TestRunCheck {\n /** Serialized format marker; always {@link TEST_RUN_CHECK_FORMAT}. */\n readonly format: typeof TEST_RUN_CHECK_FORMAT;\n /**\n * Serialized format version.\n *\n * Defaults to {@link TEST_RUN_CHECK_FORMAT_VERSION}.\n */\n readonly formatVersion?: typeof TEST_RUN_CHECK_FORMAT_VERSION;\n /** Exact `test-run:<sha256>` admission id of the observed run. */\n readonly evidence: string;\n /** Exact candidate facts the run was admitted for. */\n readonly candidate: TestRunCandidate;\n /**\n * Identity of the independent observer that recorded the admission.\n *\n * The observer is the trusted promotion boundary, never the runner that\n * executed the tests.\n */\n readonly observer: string;\n /** Millisecond-precision UTC instant the admission was observed. */\n readonly observedAt: string;\n}\n\n/**\n * Validates a retained tests-check record structurally.\n *\n * Diagnostics use `check.` paths and are deterministic and sorted by path,\n * code, and message. A generic evidence reference fails here with\n * `VIZE_MARQUETTE_141`: only an exact `test-run:<sha256>` admission id can\n * name retained test evidence. Structural validity never admits anything by\n * itself; {@link verifyTestRunCheck} must confirm the record against the\n * caller's candidate and the retained run. Codes, paths, messages, and\n * ordering are identical to the native implementation.\n */\nexport function validateTestRunCheck(check: TestRunCheck): MarquetteDiagnostic[] {\n const diagnostics: MarquetteDiagnostic[] = [];\n\n if ((check.format as string) !== TEST_RUN_CHECK_FORMAT) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_101\", \"check.format\", \"unsupported tests-check format marker\"),\n );\n }\n if ((check.formatVersion ?? TEST_RUN_CHECK_FORMAT_VERSION) !== TEST_RUN_CHECK_FORMAT_VERSION) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_102\", \"check.formatVersion\", \"unsupported tests-check format version\"),\n );\n }\n\n if (parseTestRunAdmissionId(check.evidence) === undefined) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_141\",\n \"check.evidence\",\n \"check evidence must be test-run: followed by 64 lowercase hexadecimal characters\",\n ),\n );\n }\n\n const candidate = check.candidate;\n checkIdentifier(candidate.application, \"check.candidate.application\", diagnostics);\n checkIdentifier(candidate.environment, \"check.candidate.environment\", diagnostics);\n checkDigest(candidate.contractFingerprint, \"check.candidate.contractFingerprint\", diagnostics);\n checkSourceRevision(candidate.sourceRevision, \"check.candidate.sourceRevision\", diagnostics);\n if (candidate.release.length === 0 || candidate.release.length > 256) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_106\",\n \"check.candidate.release\",\n \"release must be between 1 and 256 characters\",\n ),\n );\n }\n checkDigest(candidate.artifactFingerprint, \"check.candidate.artifactFingerprint\", diagnostics);\n\n checkIdentifier(check.observer, \"check.observer\", diagnostics);\n checkTimestamp(check.observedAt, \"check.observedAt\", diagnostics);\n\n sortDiagnostics(diagnostics);\n return diagnostics;\n}\n\n/**\n * Verifies one retained tests check against the caller's own facts.\n *\n * The caller supplies the candidate it is deciding from its own trusted\n * facts; the retained check must validate structurally, bind that candidate\n * exactly, name an observer independent from the run's runner, and be\n * observed no earlier than the run's completed verification. The referenced\n * record is then admitted exactly like {@link admitTestRun}: canonical\n * fingerprint, candidate bindings, expiry at `now`, verification outcome,\n * and skipped-test accounting all fail closed. Diagnostics, denial codes,\n * and ordering are identical to the native implementation, as pinned by the\n * shared check-decision fixtures.\n */\nexport async function verifyTestRunCheck(\n check: TestRunCheck,\n candidate: TestRunCandidate,\n evidence: TestRunEvidence,\n now: string,\n): Promise<TestRunAdmissionDecision> {\n const diagnostics = validateTestRunCheck(check);\n\n const bindings = [\n [check.candidate.application, candidate.application, \"application\", \"application\"],\n [check.candidate.environment, candidate.environment, \"environment\", \"environment\"],\n [\n check.candidate.contractFingerprint,\n candidate.contractFingerprint,\n \"contractFingerprint\",\n \"contract fingerprint\",\n ],\n [check.candidate.sourceRevision, candidate.sourceRevision, \"sourceRevision\", \"source revision\"],\n [check.candidate.release, candidate.release, \"release\", \"release\"],\n [\n check.candidate.artifactFingerprint,\n candidate.artifactFingerprint,\n \"artifactFingerprint\",\n \"artifact fingerprint\",\n ],\n ] as const;\n for (const [recorded, expected, property, field] of bindings) {\n if (recorded !== expected) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_149\",\n `check.candidate.${property}`,\n `check does not bind the candidate ${field}`,\n ),\n );\n }\n }\n\n if (check.observer === evidence.runner.identity) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_151\",\n \"check.observer\",\n \"check observer must be independent from the run's runner\",\n ),\n );\n }\n if (isStrictTimestamp(check.observedAt) && check.observedAt < evidence.verification.completedAt) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_150\",\n \"check.observedAt\",\n \"observation must not precede the completed verification\",\n ),\n );\n }\n\n diagnostics.push(...(await admitTestRun(evidence, candidate, check.evidence, now)));\n sortDiagnostics(diagnostics);\n const denialCodes: TestRunDenialCode[] = [...new Set(diagnostics.map(testRunDenialCode))].sort();\n return { allowed: diagnostics.length === 0, denialCodes, diagnostics };\n}\n\nfunction sortDiagnostics(diagnostics: MarquetteDiagnostic[]): void {\n diagnostics.sort((left, right) =>\n left.path !== right.path\n ? left.path < right.path\n ? -1\n : 1\n : left.code !== right.code\n ? left.code < right.code\n ? -1\n : 1\n : left.message < right.message\n ? -1\n : left.message > right.message\n ? 1\n : 0,\n );\n}\n"],"mappings":";;;;;;;;;AAwBA,MAAa,wBAAwB;;;;;;AAOrC,MAAa,gCAAgC;;;;;;;;;;;;AAgD7C,SAAgB,qBAAqB,OAA4C;CAC/E,MAAM,cAAqC,EAAE;CAE7C,IAAK,MAAM,WAAA,uBACT,YAAY,KACV,MAAM,sBAAsB,gBAAgB,wCAAwC,CACrF;CAEH,KAAK,MAAM,iBAAA,OAAA,GACT,YAAY,KACV,MAAM,sBAAsB,uBAAuB,yCAAyC,CAC7F;CAGH,IAAI,wBAAwB,MAAM,SAAS,KAAK,KAAA,GAC9C,YAAY,KACV,MACE,sBACA,kBACA,mFACD,CACF;CAGH,MAAM,YAAY,MAAM;CACxB,gBAAgB,UAAU,aAAa,+BAA+B,YAAY;CAClF,gBAAgB,UAAU,aAAa,+BAA+B,YAAY;CAClF,YAAY,UAAU,qBAAqB,uCAAuC,YAAY;CAC9F,oBAAoB,UAAU,gBAAgB,kCAAkC,YAAY;CAC5F,IAAI,UAAU,QAAQ,WAAW,KAAK,UAAU,QAAQ,SAAS,KAC/D,YAAY,KACV,MACE,sBACA,2BACA,+CACD,CACF;CAEH,YAAY,UAAU,qBAAqB,uCAAuC,YAAY;CAE9F,gBAAgB,MAAM,UAAU,kBAAkB,YAAY;CAC9D,eAAe,MAAM,YAAY,oBAAoB,YAAY;CAEjE,gBAAgB,YAAY;CAC5B,OAAO;;;;;;;;;;;;;;;AAgBT,eAAsB,mBACpB,OACA,WACA,UACA,KACmC;CACnC,MAAM,cAAc,qBAAqB,MAAM;CAE/C,MAAM,WAAW;EACf;GAAC,MAAM,UAAU;GAAa,UAAU;GAAa;GAAe;GAAc;EAClF;GAAC,MAAM,UAAU;GAAa,UAAU;GAAa;GAAe;GAAc;EAClF;GACE,MAAM,UAAU;GAChB,UAAU;GACV;GACA;GACD;EACD;GAAC,MAAM,UAAU;GAAgB,UAAU;GAAgB;GAAkB;GAAkB;EAC/F;GAAC,MAAM,UAAU;GAAS,UAAU;GAAS;GAAW;GAAU;EAClE;GACE,MAAM,UAAU;GAChB,UAAU;GACV;GACA;GACD;EACF;CACD,KAAK,MAAM,CAAC,UAAU,UAAU,UAAU,UAAU,UAClD,IAAI,aAAa,UACf,YAAY,KACV,MACE,sBACA,mBAAmB,YACnB,qCAAqC,QACtC,CACF;CAIL,IAAI,MAAM,aAAa,SAAS,OAAO,UACrC,YAAY,KACV,MACE,sBACA,kBACA,2DACD,CACF;CAEH,IAAI,kBAAkB,MAAM,WAAW,IAAI,MAAM,aAAa,SAAS,aAAa,aAClF,YAAY,KACV,MACE,sBACA,oBACA,0DACD,CACF;CAGH,YAAY,KAAK,GAAI,MAAM,aAAa,UAAU,WAAW,MAAM,UAAU,IAAI,CAAE;CACnF,gBAAgB,YAAY;CAC5B,MAAM,cAAmC,CAAC,GAAG,IAAI,IAAI,YAAY,IAAI,kBAAkB,CAAC,CAAC,CAAC,MAAM;CAChG,OAAO;EAAE,SAAS,YAAY,WAAW;EAAG;EAAa;EAAa;;AAGxE,SAAS,gBAAgB,aAA0C;CACjE,YAAY,MAAM,MAAM,UACtB,KAAK,SAAS,MAAM,OAChB,KAAK,OAAO,MAAM,OAChB,KACA,IACF,KAAK,SAAS,MAAM,OAClB,KAAK,OAAO,MAAM,OAChB,KACA,IACF,KAAK,UAAU,MAAM,UACnB,KACA,KAAK,UAAU,MAAM,UACnB,IACA,EACX"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://vizejs.dev/schemas/marquette/test-run-check.schema.json",
|
|
4
|
+
"title": "Vize Test Run Check",
|
|
5
|
+
"description": "Retained, release-bound tests check for one deployment decision. This record replaces every generic test-result reference: a release decision may only satisfy its tests evidence with the exact test-run:<sha256> admission id of an independently verified run, bound to the six exact candidate facts and to the independent observer that recorded the admission. Verification is fail-closed and identical across JavaScript, Rust, Go, and JVM hosts; the shared tests/fixtures/test-run-evidence check-decision fixtures are the conformance source of truth for new host implementations.",
|
|
6
|
+
"$ref": "#/$defs/check",
|
|
7
|
+
"$defs": {
|
|
8
|
+
"identifier": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"minLength": 1,
|
|
11
|
+
"maxLength": 128,
|
|
12
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
13
|
+
},
|
|
14
|
+
"digest": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
17
|
+
},
|
|
18
|
+
"admissionId": {
|
|
19
|
+
"description": "Exact test-run:<sha256> admission id. Summary blobs, report paths, run URLs, and green workflow labels are not admissible test evidence.",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^test-run:[a-f0-9]{64}$"
|
|
22
|
+
},
|
|
23
|
+
"timestamp": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"format": "date-time",
|
|
26
|
+
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}Z$"
|
|
27
|
+
},
|
|
28
|
+
"candidate": {
|
|
29
|
+
"description": "Exact release candidate the run was admitted for. Every field must equal the deciding gate's own facts; verification rejects any difference.",
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": [
|
|
33
|
+
"application",
|
|
34
|
+
"environment",
|
|
35
|
+
"contractFingerprint",
|
|
36
|
+
"sourceRevision",
|
|
37
|
+
"release",
|
|
38
|
+
"artifactFingerprint"
|
|
39
|
+
],
|
|
40
|
+
"properties": {
|
|
41
|
+
"application": { "$ref": "#/$defs/identifier" },
|
|
42
|
+
"environment": { "$ref": "#/$defs/identifier" },
|
|
43
|
+
"contractFingerprint": { "$ref": "#/$defs/digest" },
|
|
44
|
+
"sourceRevision": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"pattern": "^[a-f0-9]{40,128}$"
|
|
47
|
+
},
|
|
48
|
+
"release": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 1,
|
|
51
|
+
"maxLength": 256
|
|
52
|
+
},
|
|
53
|
+
"artifactFingerprint": { "$ref": "#/$defs/digest" }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"check": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": ["format", "formatVersion", "evidence", "candidate", "observer", "observedAt"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"format": {
|
|
62
|
+
"description": "Serialized format marker; readers must reject any other value.",
|
|
63
|
+
"const": "vize.test-run.check"
|
|
64
|
+
},
|
|
65
|
+
"formatVersion": {
|
|
66
|
+
"description": "Serialized format version; readers must reject a higher value until they explicitly support it.",
|
|
67
|
+
"const": 1
|
|
68
|
+
},
|
|
69
|
+
"evidence": { "$ref": "#/$defs/admissionId" },
|
|
70
|
+
"candidate": { "$ref": "#/$defs/candidate" },
|
|
71
|
+
"observer": {
|
|
72
|
+
"description": "Identity of the independent observer that recorded the admission — the trusted promotion boundary, never the runner that executed the tests. Verification rejects a check whose observer equals the run's runner identity.",
|
|
73
|
+
"$ref": "#/$defs/identifier"
|
|
74
|
+
},
|
|
75
|
+
"observedAt": {
|
|
76
|
+
"description": "Millisecond-precision UTC instant the admission was observed. Verification rejects an observation earlier than the run's completed verification.",
|
|
77
|
+
"$ref": "#/$defs/timestamp"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://vizejs.dev/schemas/marquette/test-run-evidence.schema.json",
|
|
4
|
+
"title": "Vize Test Run Evidence",
|
|
5
|
+
"description": "Language-neutral evidence that binds completed test executions to one application release candidate.",
|
|
6
|
+
"$ref": "#/$defs/evidence",
|
|
7
|
+
"$defs": {
|
|
8
|
+
"identifier": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"minLength": 1,
|
|
11
|
+
"maxLength": 128,
|
|
12
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
13
|
+
},
|
|
14
|
+
"digest": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
17
|
+
},
|
|
18
|
+
"sourceRevision": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^[a-f0-9]{40,128}$"
|
|
21
|
+
},
|
|
22
|
+
"contentReference": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
25
|
+
},
|
|
26
|
+
"nonEmptyString": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 256
|
|
30
|
+
},
|
|
31
|
+
"nonNegativeCount": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"minimum": 0,
|
|
34
|
+
"maximum": 4294967295
|
|
35
|
+
},
|
|
36
|
+
"timestamp": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"format": "date-time",
|
|
39
|
+
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}Z$"
|
|
40
|
+
},
|
|
41
|
+
"retainedEvidence": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": ["reference", "fingerprint"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"reference": { "$ref": "#/$defs/contentReference" },
|
|
47
|
+
"fingerprint": { "$ref": "#/$defs/digest" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"artifact": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["id", "fingerprint", "sizeBytes"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
56
|
+
"fingerprint": { "$ref": "#/$defs/digest" },
|
|
57
|
+
"sizeBytes": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 1,
|
|
60
|
+
"maximum": 9007199254740991
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"runner": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": [
|
|
68
|
+
"identity",
|
|
69
|
+
"authenticationEvidence",
|
|
70
|
+
"isolation",
|
|
71
|
+
"invocationFingerprint",
|
|
72
|
+
"environmentEvidence",
|
|
73
|
+
"environmentFingerprint"
|
|
74
|
+
],
|
|
75
|
+
"properties": {
|
|
76
|
+
"identity": { "$ref": "#/$defs/identifier" },
|
|
77
|
+
"authenticationEvidence": { "$ref": "#/$defs/retainedEvidence" },
|
|
78
|
+
"isolation": { "enum": ["dedicated", "ephemeral"] },
|
|
79
|
+
"invocationFingerprint": { "$ref": "#/$defs/digest" },
|
|
80
|
+
"environmentEvidence": { "$ref": "#/$defs/retainedEvidence" },
|
|
81
|
+
"environmentFingerprint": { "$ref": "#/$defs/digest" }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"selection": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": ["targetIds", "suiteIds"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"targetIds": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"minItems": 1,
|
|
92
|
+
"maxItems": 32,
|
|
93
|
+
"uniqueItems": true,
|
|
94
|
+
"items": { "$ref": "#/$defs/identifier" }
|
|
95
|
+
},
|
|
96
|
+
"suiteIds": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"minItems": 1,
|
|
99
|
+
"maxItems": 512,
|
|
100
|
+
"uniqueItems": true,
|
|
101
|
+
"items": { "$ref": "#/$defs/identifier" }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"targetExecution": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"required": ["id", "kind", "environment"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
111
|
+
"kind": { "enum": ["web", "native", "desktop", "terminal", "server"] },
|
|
112
|
+
"environment": { "$ref": "#/$defs/identifier" }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"suiteExecution": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"required": [
|
|
119
|
+
"id",
|
|
120
|
+
"targetId",
|
|
121
|
+
"kind",
|
|
122
|
+
"shardIndex",
|
|
123
|
+
"shardCount",
|
|
124
|
+
"outcome",
|
|
125
|
+
"passed",
|
|
126
|
+
"failed",
|
|
127
|
+
"skipped",
|
|
128
|
+
"retries",
|
|
129
|
+
"durationMs",
|
|
130
|
+
"invocationFingerprint",
|
|
131
|
+
"report",
|
|
132
|
+
"log"
|
|
133
|
+
],
|
|
134
|
+
"properties": {
|
|
135
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
136
|
+
"targetId": { "$ref": "#/$defs/identifier" },
|
|
137
|
+
"kind": {
|
|
138
|
+
"enum": [
|
|
139
|
+
"unit",
|
|
140
|
+
"integration",
|
|
141
|
+
"contract",
|
|
142
|
+
"end-to-end",
|
|
143
|
+
"accessibility",
|
|
144
|
+
"visual",
|
|
145
|
+
"performance",
|
|
146
|
+
"resilience",
|
|
147
|
+
"installation",
|
|
148
|
+
"upgrade",
|
|
149
|
+
"migration"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"shardIndex": {
|
|
153
|
+
"type": "integer",
|
|
154
|
+
"minimum": 1,
|
|
155
|
+
"maximum": 1024
|
|
156
|
+
},
|
|
157
|
+
"shardCount": {
|
|
158
|
+
"type": "integer",
|
|
159
|
+
"minimum": 1,
|
|
160
|
+
"maximum": 1024
|
|
161
|
+
},
|
|
162
|
+
"outcome": { "enum": ["passed", "failed", "cancelled"] },
|
|
163
|
+
"passed": { "$ref": "#/$defs/nonNegativeCount" },
|
|
164
|
+
"failed": { "$ref": "#/$defs/nonNegativeCount" },
|
|
165
|
+
"skipped": { "$ref": "#/$defs/nonNegativeCount" },
|
|
166
|
+
"retries": { "$ref": "#/$defs/nonNegativeCount" },
|
|
167
|
+
"durationMs": {
|
|
168
|
+
"type": "integer",
|
|
169
|
+
"minimum": 0,
|
|
170
|
+
"maximum": 9007199254740991
|
|
171
|
+
},
|
|
172
|
+
"invocationFingerprint": { "$ref": "#/$defs/digest" },
|
|
173
|
+
"report": { "$ref": "#/$defs/retainedEvidence" },
|
|
174
|
+
"log": { "$ref": "#/$defs/retainedEvidence" }
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"verification": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"required": [
|
|
181
|
+
"verifier",
|
|
182
|
+
"completedAt",
|
|
183
|
+
"outcome",
|
|
184
|
+
"targetCount",
|
|
185
|
+
"suiteCount",
|
|
186
|
+
"passed",
|
|
187
|
+
"failed",
|
|
188
|
+
"skipped",
|
|
189
|
+
"retries",
|
|
190
|
+
"evidence"
|
|
191
|
+
],
|
|
192
|
+
"properties": {
|
|
193
|
+
"verifier": { "$ref": "#/$defs/identifier" },
|
|
194
|
+
"completedAt": { "$ref": "#/$defs/timestamp" },
|
|
195
|
+
"outcome": { "enum": ["accepted", "rejected"] },
|
|
196
|
+
"targetCount": {
|
|
197
|
+
"type": "integer",
|
|
198
|
+
"minimum": 1,
|
|
199
|
+
"maximum": 32
|
|
200
|
+
},
|
|
201
|
+
"suiteCount": {
|
|
202
|
+
"type": "integer",
|
|
203
|
+
"minimum": 1,
|
|
204
|
+
"maximum": 512
|
|
205
|
+
},
|
|
206
|
+
"passed": { "$ref": "#/$defs/nonNegativeCount" },
|
|
207
|
+
"failed": { "$ref": "#/$defs/nonNegativeCount" },
|
|
208
|
+
"skipped": { "$ref": "#/$defs/nonNegativeCount" },
|
|
209
|
+
"retries": { "$ref": "#/$defs/nonNegativeCount" },
|
|
210
|
+
"evidence": { "$ref": "#/$defs/retainedEvidence" }
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"evidence": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"additionalProperties": false,
|
|
216
|
+
"required": [
|
|
217
|
+
"format",
|
|
218
|
+
"formatVersion",
|
|
219
|
+
"id",
|
|
220
|
+
"application",
|
|
221
|
+
"environment",
|
|
222
|
+
"contractFingerprint",
|
|
223
|
+
"sourceRevision",
|
|
224
|
+
"release",
|
|
225
|
+
"artifact",
|
|
226
|
+
"startedAt",
|
|
227
|
+
"completedAt",
|
|
228
|
+
"validUntil",
|
|
229
|
+
"runner",
|
|
230
|
+
"selection",
|
|
231
|
+
"targets",
|
|
232
|
+
"suites",
|
|
233
|
+
"verification"
|
|
234
|
+
],
|
|
235
|
+
"properties": {
|
|
236
|
+
"format": { "const": "vize.test-run.evidence" },
|
|
237
|
+
"formatVersion": { "const": 1, "default": 1 },
|
|
238
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
239
|
+
"application": { "$ref": "#/$defs/identifier" },
|
|
240
|
+
"environment": { "$ref": "#/$defs/identifier" },
|
|
241
|
+
"contractFingerprint": { "$ref": "#/$defs/digest" },
|
|
242
|
+
"sourceRevision": { "$ref": "#/$defs/sourceRevision" },
|
|
243
|
+
"release": { "$ref": "#/$defs/nonEmptyString" },
|
|
244
|
+
"artifact": { "$ref": "#/$defs/artifact" },
|
|
245
|
+
"startedAt": { "$ref": "#/$defs/timestamp" },
|
|
246
|
+
"completedAt": { "$ref": "#/$defs/timestamp" },
|
|
247
|
+
"validUntil": { "$ref": "#/$defs/timestamp" },
|
|
248
|
+
"runner": { "$ref": "#/$defs/runner" },
|
|
249
|
+
"selection": { "$ref": "#/$defs/selection" },
|
|
250
|
+
"targets": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"minItems": 1,
|
|
253
|
+
"maxItems": 32,
|
|
254
|
+
"items": { "$ref": "#/$defs/targetExecution" }
|
|
255
|
+
},
|
|
256
|
+
"suites": {
|
|
257
|
+
"type": "array",
|
|
258
|
+
"minItems": 1,
|
|
259
|
+
"maxItems": 512,
|
|
260
|
+
"items": { "$ref": "#/$defs/suiteExecution" }
|
|
261
|
+
},
|
|
262
|
+
"verification": { "$ref": "#/$defs/verification" }
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|