certify method
Certify manifest: every declared method invoked through a fresh
runtime with the failure schedule held back (certification mode).
Implementation
Future<WorldCertification> certify(WorldManifest manifest) async {
// Certification mode: the same corpus/contracts/latency, no storms —
// storms are the scenario's behavioral semantics, not the contract.
final stormFree = WorldManifest(
schema: manifest.schema,
spec: manifest.spec,
scenario: manifest.scenario,
feature: manifest.feature,
version: manifest.version,
seed: manifest.seed,
touchpoints: manifest.touchpoints,
latency: manifest.latency,
storms: const [],
corpus: manifest.corpus,
behaviors: const [],
description: manifest.description,
);
final runtime = WorldRuntime(stormFree);
final proofs = <WorldMethodProof>[];
for (final touchpoint in manifest.touchpoints) {
for (final method in touchpoint.methods) {
proofs.add(await _prove(runtime, touchpoint, method));
}
}
return WorldCertification(
scenario: manifest.scenario,
worldHash: manifest.worldHash,
certified: proofs.isNotEmpty && proofs.every((x) => x.satisfied),
proofs: proofs,
at: DateTime.now().toUtc().toIso8601String(),
);
}