refactor(analysis): remove fixed result quotas
This commit is contained in:
@@ -19,7 +19,7 @@ export const projectAndroidApplicationEvidence = (
|
||||
schema: androidApplicationProjectionInputSchema,
|
||||
project: projectAndroidApplication,
|
||||
operation: OPERATION,
|
||||
predicateType: "rea.android-application-graph/v1",
|
||||
predicateType: "rea.android-application-graph",
|
||||
provider: ANDROID_APPLICATION_PROVIDER,
|
||||
subjectFormat: () => "apk",
|
||||
protocolError: "Android application projection produced an invalid result",
|
||||
|
||||
@@ -19,7 +19,7 @@ export const projectAppleApplicationEvidence = (
|
||||
schema: appleApplicationProjectionInputSchema,
|
||||
project: projectAppleApplication,
|
||||
operation: OPERATION,
|
||||
predicateType: "rea.apple-application-graph/v1",
|
||||
predicateType: "rea.apple-application-graph",
|
||||
provider: APPLE_APPLICATION_PROVIDER,
|
||||
subjectFormat: () => "ipa",
|
||||
protocolError: "Apple application projection produced an invalid result",
|
||||
|
||||
@@ -34,11 +34,11 @@ const APPLICATION_GRAPH_IDENTITIES = [
|
||||
},
|
||||
{
|
||||
operation: "reconcile_javascript_runtime",
|
||||
predicate: "rea.javascript-runtime-reconciliation/v1",
|
||||
predicate: "rea.javascript-runtime-reconciliation",
|
||||
},
|
||||
{
|
||||
operation: "project_managed_application_graph",
|
||||
predicate: "rea.managed-application-graph/v1",
|
||||
predicate: "rea.managed-application-graph",
|
||||
},
|
||||
] as const satisfies readonly EvidenceSemanticIdentity[];
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { projectPermissionFailure } from "./PermissionFailure.js";
|
||||
import { artifactExtractionPermissionRequest } from "./ArtifactExtractionDestination.js";
|
||||
import { parseConfig, type AppConfig } from "../config.js";
|
||||
import type { JsonValue } from "../domain/jsonValue.js";
|
||||
import { EnhancedTools } from "./EnhancedTools.js";
|
||||
@@ -118,23 +119,11 @@ const authorizeAnalysis = async (
|
||||
const requests = [];
|
||||
if (tool === "extract_artifact" && typeof arguments_.output_root === "string")
|
||||
requests.push({
|
||||
capability: "artifact_extract" as const,
|
||||
path: arguments_.output_root,
|
||||
request: artifactExtractionPermissionRequest(),
|
||||
access: "write" as const,
|
||||
});
|
||||
for (const request of requests) {
|
||||
const result = await authority.authorize(
|
||||
{
|
||||
capability: request.capability,
|
||||
roots: [request.path],
|
||||
executables: [],
|
||||
environment_names: [],
|
||||
network: "none",
|
||||
mount: false,
|
||||
operation_identity: `${tool}:${request.capability}:${request.path}`,
|
||||
},
|
||||
request.access,
|
||||
);
|
||||
const result = await authority.authorize(request.request, request.access);
|
||||
if (!result.ok) return err(projectPermissionFailure(result.error));
|
||||
}
|
||||
if (
|
||||
|
||||
@@ -39,13 +39,13 @@ export const parseApplicationGraphEvidence = (
|
||||
return staticApplicationSource(evidence);
|
||||
if (
|
||||
evidence.operation === "reconcile_javascript_runtime" &&
|
||||
evidence.predicate_type === "rea.javascript-runtime-reconciliation/v1" &&
|
||||
evidence.predicate_type === "rea.javascript-runtime-reconciliation" &&
|
||||
providerMatches(evidence, JAVASCRIPT_RUNTIME_RECONCILIATION_PROVIDER)
|
||||
)
|
||||
return staticRuntimeSource(evidence);
|
||||
if (
|
||||
evidence.operation === "project_managed_application_graph" &&
|
||||
evidence.predicate_type === "rea.managed-application-graph/v1" &&
|
||||
evidence.predicate_type === "rea.managed-application-graph" &&
|
||||
providerMatches(evidence, MANAGED_WORKFLOW_PROVIDER)
|
||||
)
|
||||
return managedApplicationSource(evidence);
|
||||
|
||||
@@ -17,7 +17,7 @@ export const createApplicationFeatureTraceEvidence = (
|
||||
result: ApplicationFeatureTraceResult,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, JAVASCRIPT_APPLICATION_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.application-feature-trace/v1",
|
||||
predicateType: "rea.application-feature-trace",
|
||||
operation: "trace_application_feature",
|
||||
parameters,
|
||||
result: jsonValueSchema.parse(result),
|
||||
@@ -35,7 +35,7 @@ export const createJavaScriptSemanticTraceEvidence = (
|
||||
result: JavaScriptSemanticTraceResult,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, JAVASCRIPT_APPLICATION_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.javascript-semantic-trace/v1",
|
||||
predicateType: "rea.javascript-semantic-trace",
|
||||
operation: "trace_javascript_semantics",
|
||||
parameters,
|
||||
result: jsonValueSchema.parse(result),
|
||||
@@ -53,7 +53,7 @@ export const createApplicationVersionComparisonEvidence = (
|
||||
result: ApplicationVersionComparisonResult,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, JAVASCRIPT_APPLICATION_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.application-version-comparison/v1",
|
||||
predicateType: "rea.application-version-comparison",
|
||||
operation: "compare_application_versions",
|
||||
parameters,
|
||||
result: jsonValueSchema.parse(result),
|
||||
@@ -71,7 +71,7 @@ export const createSourceToBundleComparisonEvidence = (
|
||||
result: SourceToBundleComparisonResult,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, JAVASCRIPT_APPLICATION_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.source-to-bundle-comparison/v1",
|
||||
predicateType: "rea.source-to-bundle-comparison",
|
||||
operation: "compare_source_to_bundle",
|
||||
parameters,
|
||||
result: jsonValueSchema.parse(result),
|
||||
@@ -89,7 +89,7 @@ export const createJavaScriptExportShapeComparisonEvidence = (
|
||||
result: JavaScriptExportShapeComparisonResult,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, JAVASCRIPT_APPLICATION_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.javascript-export-shape-comparison/v1",
|
||||
predicateType: "rea.javascript-export-shape-comparison",
|
||||
operation: "compare_javascript_export_shapes",
|
||||
parameters,
|
||||
result: jsonValueSchema.parse(result),
|
||||
|
||||
@@ -124,21 +124,13 @@ const analyzeArtifactFile = (
|
||||
parsed,
|
||||
{
|
||||
maxAstNodes: remainingNodes,
|
||||
maxFindings: Number.MAX_SAFE_INTEGER,
|
||||
maxModules: Number.MAX_SAFE_INTEGER,
|
||||
deadline: context.deadline,
|
||||
now: context.now,
|
||||
},
|
||||
);
|
||||
const staticFindings = findingCount(analysis);
|
||||
const semanticLimits: JavaScriptSemanticLimits = {
|
||||
...DEFAULT_JAVASCRIPT_SEMANTIC_LIMITS,
|
||||
maxScopes: remainingNodes,
|
||||
maxBindings: remainingNodes,
|
||||
maxCallables: remainingNodes,
|
||||
maxReferences: remainingNodes,
|
||||
maxModuleLinks: remainingNodes,
|
||||
};
|
||||
const semanticLimits: JavaScriptSemanticLimits =
|
||||
DEFAULT_JAVASCRIPT_SEMANTIC_LIMITS;
|
||||
const semantics =
|
||||
analysis.parse_status === "complete" || analysis.parse_status === "partial"
|
||||
? analyzeParsedJavaScriptSemantics(parsed, semanticLimits)
|
||||
@@ -212,13 +204,13 @@ const parsePackage = (
|
||||
path: file.path,
|
||||
sha256: file.sha256,
|
||||
status: "included",
|
||||
name: boundedString(value.name),
|
||||
version: boundedString(value.version),
|
||||
main: boundedString(value.main),
|
||||
name: optionalString(value.name),
|
||||
version: optionalString(value.version),
|
||||
main: optionalString(value.main),
|
||||
renderer:
|
||||
boundedString(value.renderer) ??
|
||||
boundedString(value.browser) ??
|
||||
boundedString(value.module),
|
||||
optionalString(value.renderer) ??
|
||||
optionalString(value.browser) ??
|
||||
optionalString(value.module),
|
||||
limitation: null,
|
||||
};
|
||||
};
|
||||
@@ -253,7 +245,7 @@ const parseHtmlScripts = (
|
||||
const baseHref = htmlBaseHref(text);
|
||||
const pattern = /<script\b[^>]*\bsrc\s*=\s*(["'])([^"']+)\1[^>]*>/giu;
|
||||
for (const match of text.matchAll(pattern)) {
|
||||
const script = match[2]?.slice(0, 4_096);
|
||||
const script = match[2];
|
||||
if (script === undefined) continue;
|
||||
const start = match.index;
|
||||
scripts.push({
|
||||
@@ -268,7 +260,7 @@ const parseHtmlScripts = (
|
||||
|
||||
const htmlBaseHref = (text: string): string | null => {
|
||||
const match = /<base\b[^>]*\bhref\s*=\s*(["'])([^"']+)\1[^>]*>/iu.exec(text);
|
||||
return match?.[2]?.slice(0, 4_096) ?? null;
|
||||
return match?.[2] ?? null;
|
||||
};
|
||||
|
||||
const parseSourceMap = (
|
||||
@@ -297,7 +289,7 @@ const parseSourceMap = (
|
||||
null,
|
||||
"Parse deadline elapsed during source-map decoding.",
|
||||
);
|
||||
const maps = flattenSourceMaps(value, 10_000);
|
||||
const maps = flattenSourceMaps(value);
|
||||
if (maps === undefined)
|
||||
return invalidSourceMap(file, "Source map is not a bounded version 3 map.");
|
||||
return collectSourceMapOriginals(file, maps, context);
|
||||
@@ -372,7 +364,6 @@ const unavailableSourceMap = (
|
||||
|
||||
const flattenSourceMaps = (
|
||||
root: unknown,
|
||||
maximum: number,
|
||||
): Readonly<Record<string, unknown>>[] | undefined => {
|
||||
if (!isRecord(root) || root.version !== 3) return undefined;
|
||||
const maps: Readonly<Record<string, unknown>>[] = [];
|
||||
@@ -381,8 +372,6 @@ const flattenSourceMaps = (
|
||||
const map = pending.pop();
|
||||
if (map === undefined || map.version !== 3) return undefined;
|
||||
if (Array.isArray(map.sections)) {
|
||||
if (pending.length + maps.length + map.sections.length > maximum)
|
||||
return undefined;
|
||||
for (const section of map.sections) {
|
||||
if (!isRecord(section) || !isRecord(section.map)) return undefined;
|
||||
pending.push(section.map);
|
||||
@@ -454,8 +443,8 @@ const resolveSourceName = (root: string, source: string): string =>
|
||||
4_096,
|
||||
);
|
||||
|
||||
const boundedString = (value: unknown): string | null =>
|
||||
typeof value === "string" && value.length > 0 ? value.slice(0, 4_096) : null;
|
||||
const optionalString = (value: unknown): string | null =>
|
||||
typeof value === "string" && value.length > 0 ? value : null;
|
||||
|
||||
const sha256 = (value: string): string =>
|
||||
createHash("sha256").update(value).digest("hex");
|
||||
|
||||
@@ -81,15 +81,12 @@ const createBundlerChunkNode = (
|
||||
bundler: registration.bundler,
|
||||
runtime: registration.runtime,
|
||||
chunk_keys: registration.chunk_keys,
|
||||
omitted_chunk_keys: registration.omitted_chunk_keys,
|
||||
unknown_chunk_keys: registration.unknown_chunk_keys,
|
||||
runtime_require_name: registration.runtime_require_name,
|
||||
runtime_module_cache_status: registration.runtime_module_cache_status,
|
||||
entry_module_keys: registration.entry_module_keys,
|
||||
omitted_entry_module_keys: registration.omitted_entry_module_keys,
|
||||
unknown_entry_module_keys: registration.unknown_entry_module_keys,
|
||||
async_chunk_keys: registration.async_chunk_keys,
|
||||
omitted_async_chunk_keys: registration.omitted_async_chunk_keys,
|
||||
unknown_async_chunk_keys: registration.unknown_async_chunk_keys,
|
||||
module_count: registration.modules.length,
|
||||
},
|
||||
@@ -140,7 +137,6 @@ const addBundlerModuleNodes = (
|
||||
structural_fingerprint_status:
|
||||
moduleValue.structural_fingerprint_status,
|
||||
exports: moduleValue.exports,
|
||||
exports_truncated: moduleValue.exports_truncated,
|
||||
},
|
||||
evidence: astObservationEvidence({
|
||||
sha256: file.sha256,
|
||||
|
||||
@@ -250,8 +250,6 @@ describe("contextual JavaScript module identity", () => {
|
||||
`,
|
||||
{
|
||||
maxAstNodes: 10_000,
|
||||
maxFindings: 100,
|
||||
maxModules: 100,
|
||||
deadline: Number.POSITIVE_INFINITY,
|
||||
now: () => 0,
|
||||
},
|
||||
|
||||
@@ -84,12 +84,23 @@ export interface JavaScriptReplayRunner {
|
||||
) => Promise<ReplayExecutionResult>;
|
||||
}
|
||||
|
||||
const assertReplayManifestWithinProtocolLimit = (
|
||||
input: ControlledReplayInput,
|
||||
): void => {
|
||||
if (
|
||||
new TextEncoder().encode(JSON.stringify(input)).byteLength >
|
||||
input.limits.protocol_bytes
|
||||
)
|
||||
throw new RangeError("Replay plan input exceeds its protocol byte limit");
|
||||
};
|
||||
|
||||
/** Read, normalize, and content-address every input to one replay experiment. */
|
||||
export const prepareReplayPlan = async (
|
||||
input: ControlledReplayInput,
|
||||
policy: EnabledJavaScriptReplayPolicy,
|
||||
host: JavaScriptReplayHost,
|
||||
): Promise<PreparedReplayPlan> => {
|
||||
assertReplayManifestWithinProtocolLimit(input);
|
||||
const cases = replayCases(input).map((item) => ({
|
||||
...item,
|
||||
sha256: digestJson(item.arguments),
|
||||
|
||||
@@ -47,7 +47,7 @@ export const projectJavaScriptExportReturnShapes = (input: {
|
||||
semanticOmitted === null ? null : semanticOmitted + projectionOmitted;
|
||||
const coverage = complete
|
||||
? input.baseCoverage
|
||||
: callable.returnCoverage.status === "truncated" || projectionOmitted > 0
|
||||
: projectionOmitted > 0
|
||||
? truncatedApplicationCoverage(limits, omitted)
|
||||
: partialApplicationCoverage(limits, omitted);
|
||||
const limitations = [
|
||||
|
||||
@@ -26,8 +26,8 @@ export const createJavaScriptRuntimeObservationEvidence = (
|
||||
createEvidence(undefined, provider, {
|
||||
predicateType:
|
||||
operation === "list_javascript_runtime_targets"
|
||||
? "rea.javascript-runtime-target-list/v1"
|
||||
: "rea.javascript-runtime-observation/v1",
|
||||
? "rea.javascript-runtime-target-list"
|
||||
: "rea.javascript-runtime-observation",
|
||||
operation,
|
||||
parameters: parameters(input),
|
||||
result: jsonValueSchema.parse(result),
|
||||
|
||||
@@ -16,7 +16,7 @@ export const createJavaScriptRuntimeReconciliationEvidence = (
|
||||
result: JavaScriptRuntimeReconciliationResult,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, JAVASCRIPT_RUNTIME_RECONCILIATION_PROVIDER, {
|
||||
predicateType: "rea.javascript-runtime-reconciliation/v1",
|
||||
predicateType: "rea.javascript-runtime-reconciliation",
|
||||
operation: "reconcile_javascript_runtime",
|
||||
parameters: parameters(input),
|
||||
result: jsonValueSchema.parse(result),
|
||||
|
||||
@@ -173,10 +173,10 @@ it("connects caller results, direct returns, parameters, and captures", () => {
|
||||
expect(capture?.evidence.location).not.toEqual(readOuter.evidence.location);
|
||||
});
|
||||
|
||||
it("preserves semantic analyzer truncation in graph coverage", () => {
|
||||
it("preserves the semantic value-depth guard in graph coverage", () => {
|
||||
const graph = graphFor(
|
||||
"const first = 1; const second = first; const third = second;",
|
||||
{ maxReferences: 1 },
|
||||
{ maxValueDepth: 1 },
|
||||
);
|
||||
expect(graph.coverage).toMatchObject({
|
||||
status: "partial",
|
||||
@@ -184,7 +184,7 @@ it("preserves semantic analyzer truncation in graph coverage", () => {
|
||||
omitted_nodes: null,
|
||||
omitted_relations: null,
|
||||
limits: expect.arrayContaining([
|
||||
{ name: "semantic.maxReferences", value: 1, unit: "items" },
|
||||
{ name: "semantic.maxValueDepth", value: 1, unit: "depth" },
|
||||
]),
|
||||
});
|
||||
expect(
|
||||
|
||||
@@ -75,7 +75,7 @@ interface FileContext extends SemanticFlowProjectionContext {
|
||||
readonly callResolutions: ReadonlyMap<string, "candidate" | "resolved">;
|
||||
}
|
||||
|
||||
/** Project bounded per-file semantic IR into an artifact-bound companion graph. */
|
||||
/** Project per-file semantic IR into an artifact-bound companion graph. */
|
||||
export const buildJavaScriptSemanticGraph = ({
|
||||
rootArtifactSha256,
|
||||
applicationGraph,
|
||||
|
||||
@@ -19,7 +19,7 @@ export const projectSemanticFunctionFingerprints = (
|
||||
return [
|
||||
createJavaScriptSemanticFingerprint({
|
||||
function_node_id: callable.node_id,
|
||||
algorithm: "rea.javascript-semantic-function/v1",
|
||||
algorithm: "rea.javascript-semantic-function",
|
||||
status: fingerprint.status,
|
||||
components: {
|
||||
parameter_arity: fingerprint.components.parameterArity,
|
||||
|
||||
@@ -281,13 +281,13 @@ export const projectSemanticFrontiers = (
|
||||
}
|
||||
};
|
||||
|
||||
/** Publish exact semantic analyzer limits reached by any admitted source file. */
|
||||
/** Publish the semantic recursion guard when it caused incomplete recovery. */
|
||||
export const semanticRecoveryLimits = (
|
||||
analysis: JavaScriptArtifactAnalysis,
|
||||
): {
|
||||
readonly name: string;
|
||||
readonly value: number;
|
||||
readonly unit: "items";
|
||||
readonly unit: "depth";
|
||||
}[] => {
|
||||
const limits = new Map<string, number>();
|
||||
for (const { semantic } of analysis.files) {
|
||||
@@ -297,5 +297,5 @@ export const semanticRecoveryLimits = (
|
||||
}
|
||||
return [...limits]
|
||||
.sort(([left], [right]) => left.localeCompare(right))
|
||||
.map(([name, value]) => ({ name, value, unit: "items" }));
|
||||
.map(([name, value]) => ({ name, value, unit: "depth" }));
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ const createManagedApplicationGraphEvidence = (
|
||||
result: ManagedApplicationGraphResult,
|
||||
): Evidence =>
|
||||
createEvidence(subjectTarget(input), MANAGED_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.managed-application-graph/v1",
|
||||
predicateType: "rea.managed-application-graph",
|
||||
operation: OPERATION,
|
||||
parameters: {
|
||||
managed_artifact_evidence_id: input.managed_artifact?.evidence_id ?? null,
|
||||
|
||||
@@ -156,7 +156,7 @@ const createManagedMemberComparisonEvidence = (
|
||||
result: z.infer<typeof managedMemberComparisonResultSchema>,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, MANAGED_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.managed-member-comparison/v1",
|
||||
predicateType: "rea.managed-member-comparison",
|
||||
operation: "compare_managed_members",
|
||||
parameters: {
|
||||
left_evidence_id: parameters.left.evidence_id,
|
||||
|
||||
@@ -45,7 +45,7 @@ const createManagedNativeVerificationEvidence = (
|
||||
result: ManagedNativeVerificationResult,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, MANAGED_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.managed-native-verification/v1",
|
||||
predicateType: "rea.managed-native-verification",
|
||||
operation: OPERATION,
|
||||
parameters: {
|
||||
managed_boundaries_evidence_id: input.managed_boundaries.evidence_id,
|
||||
|
||||
@@ -59,7 +59,7 @@ const createManagedReconstructionEvidence = (
|
||||
},
|
||||
MANAGED_WORKFLOW_PROVIDER,
|
||||
{
|
||||
predicateType: "rea.managed-reconstruction-import/v1",
|
||||
predicateType: "rea.managed-reconstruction-import",
|
||||
operation: OPERATION,
|
||||
parameters: {
|
||||
static_members_evidence_id: input.static_members.evidence_id,
|
||||
|
||||
@@ -115,7 +115,7 @@ export const planManagedRuntimeCorrelationEvidenceValidated = async (
|
||||
},
|
||||
MANAGED_WORKFLOW_PROVIDER,
|
||||
{
|
||||
predicateType: "rea.managed-runtime-correlation-plan/v1",
|
||||
predicateType: "rea.managed-runtime-correlation-plan",
|
||||
operation: OPERATION,
|
||||
parameters: {
|
||||
static_members_evidence_id: staticEvidence.evidence_id,
|
||||
|
||||
@@ -212,7 +212,7 @@ const createTransformationEvidence = (
|
||||
},
|
||||
PROVIDER,
|
||||
{
|
||||
predicateType: "rea.javascript-export-transformation/v1",
|
||||
predicateType: "rea.javascript-export-transformation",
|
||||
operation: PREPARE_OPERATION,
|
||||
parameters: {
|
||||
selected_alias: input.selected_alias,
|
||||
@@ -249,7 +249,7 @@ const createCharacterizationEvidence = (
|
||||
},
|
||||
PROVIDER,
|
||||
{
|
||||
predicateType: "rea.runtime-characterization/v1",
|
||||
predicateType: "rea.runtime-characterization",
|
||||
operation: EXECUTE_OPERATION,
|
||||
parameters: {
|
||||
plan_sha256: prepared.plan.plan_sha256,
|
||||
@@ -340,7 +340,7 @@ const digestPreparation = (
|
||||
): string =>
|
||||
createHash("sha256")
|
||||
.update(
|
||||
`rea.node-characterization-preparation/v1\0${instrumentedSha256}\0${replayPlanDigest}`,
|
||||
`rea.node-characterization-preparation\0${instrumentedSha256}\0${replayPlanDigest}`,
|
||||
)
|
||||
.digest("hex");
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ export const evidenceAuthoritySupportsProof = (
|
||||
if (
|
||||
evidence.confidence !== "observed" ||
|
||||
!proofEvidenceAuthorities[authority].includes(evidence.authority) ||
|
||||
evidence.predicate_type !== "rea.reconstruction-proof/v1" ||
|
||||
evidence.predicate_type !== "rea.reconstruction-proof" ||
|
||||
evidence.operation !== "verify_reconstruction_obligations"
|
||||
)
|
||||
return false;
|
||||
|
||||
@@ -22,7 +22,7 @@ const proofEvidence = (id: string) =>
|
||||
undefined,
|
||||
{ id: `fixture-${id}`, name: "Fixture verifier", version: "1" },
|
||||
{
|
||||
predicateType: "rea.fixture-verification/v1",
|
||||
predicateType: "rea.fixture-verification",
|
||||
operation: "run_fixture_verifier",
|
||||
parameters: { id },
|
||||
result: { passed: true },
|
||||
@@ -58,7 +58,7 @@ const boundProofEvidence = (
|
||||
undefined,
|
||||
{ id: `proof-${id}`, name: "Reconstruction proof", version: "1" },
|
||||
{
|
||||
predicateType: "rea.reconstruction-proof/v1",
|
||||
predicateType: "rea.reconstruction-proof",
|
||||
operation: "verify_reconstruction_obligations",
|
||||
parameters: {},
|
||||
result: {
|
||||
@@ -248,7 +248,7 @@ describe("reconstruction obligation ledger fail-closed behavior", () => {
|
||||
undefined,
|
||||
{ id: "external", name: "External protocol observer", version: "1" },
|
||||
{
|
||||
predicateType: "rea.protocol-observation/v1",
|
||||
predicateType: "rea.protocol-observation",
|
||||
operation: "observe_protocol",
|
||||
parameters: {},
|
||||
result: { status: 200 },
|
||||
|
||||
@@ -23,7 +23,7 @@ const proofEvidence = (id: string) =>
|
||||
undefined,
|
||||
{ id: `fixture-${id}`, name: "Fixture verifier", version: "1" },
|
||||
{
|
||||
predicateType: "rea.fixture-verification/v1",
|
||||
predicateType: "rea.fixture-verification",
|
||||
operation: "run_fixture_verifier",
|
||||
parameters: { id },
|
||||
result: { passed: true },
|
||||
@@ -59,7 +59,7 @@ const boundProofEvidence = (
|
||||
undefined,
|
||||
{ id: `proof-${id}`, name: "Reconstruction proof", version: "1" },
|
||||
{
|
||||
predicateType: "rea.reconstruction-proof/v1",
|
||||
predicateType: "rea.reconstruction-proof",
|
||||
operation: "verify_reconstruction_obligations",
|
||||
parameters: {},
|
||||
result: {
|
||||
|
||||
@@ -64,7 +64,7 @@ const createLedgerEvidence = (
|
||||
): Evidence => {
|
||||
const completeLedger = reconstructionObligationLedgerSchema.parse(ledger);
|
||||
return createEvidence(undefined, JAVASCRIPT_APPLICATION_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.reconstruction-obligation-ledger/v1",
|
||||
predicateType: "rea.reconstruction-obligation-ledger",
|
||||
operation: OPERATION,
|
||||
parameters: jsonObjectSchema.parse({
|
||||
ledger_id: completeLedger.ledger_id,
|
||||
|
||||
@@ -19,7 +19,7 @@ export const unknownMutationEvidence = (
|
||||
input: RecordUnknownInput,
|
||||
): Evidence =>
|
||||
createEvidence(target, UNKNOWN_REGISTRY_PROVIDER, {
|
||||
predicateType: "rea.residual-unknown-mutation/v1",
|
||||
predicateType: "rea.residual-unknown-mutation",
|
||||
operation: "record_unknown",
|
||||
parameters: { domain: input.domain, severity: input.severity },
|
||||
result: {
|
||||
|
||||
Reference in New Issue
Block a user