Type EveUnity capture contract
This commit is contained in:
parent
5182236529
commit
ceb6e005c4
7 changed files with 140 additions and 1 deletions
|
|
@ -1254,6 +1254,7 @@ function compareRuntimeLifecycleClaims(expectedLifecycle, actualLifecycle, manif
|
|||
errors.push(...missingMembers(expected.pendingProofs || [], actual.pendingProofs || [], `${label}.pendingProofs`));
|
||||
errors.push(...compareReleaseContract(expected.releaseContract, actual.releaseContract, `${label}.releaseContract`));
|
||||
errors.push(...compareTestContract(expected.testContract, actual.testContract, `${label}.testContract`));
|
||||
errors.push(...compareCaptureContract(expected.captureContract, actual.captureContract, `${label}.captureContract`));
|
||||
|
||||
for (const evidencePath of actual.evidencePaths || []) {
|
||||
if (!existsSync(path.join(repoRoot, evidencePath))) {
|
||||
|
|
@ -1264,6 +1265,29 @@ function compareRuntimeLifecycleClaims(expectedLifecycle, actualLifecycle, manif
|
|||
return errors;
|
||||
}
|
||||
|
||||
function compareCaptureContract(expected, actual, label) {
|
||||
const errors = [];
|
||||
if (!expected) return errors;
|
||||
if (!actual) return [`${label}:missing`];
|
||||
for (const key of [
|
||||
"ownerRepo",
|
||||
"runtimeId",
|
||||
"captureKind",
|
||||
"artifactKind",
|
||||
"artifactPattern",
|
||||
"conformanceAttachment",
|
||||
"requiredProvider",
|
||||
"requiredSurface",
|
||||
"authority",
|
||||
"publishProof",
|
||||
]) {
|
||||
if ((expected[key] || "") !== (actual[key] || "")) {
|
||||
errors.push(`${label}.${key}:expected ${expected[key] || ""} got ${actual[key] || ""}`);
|
||||
}
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
function compareTestContract(expected, actual, label) {
|
||||
const errors = [];
|
||||
if (!expected) return errors;
|
||||
|
|
|
|||
Loading…
Reference in a new issue