save method
Persist a run receipt. GenerationReceipt.at must carry the run's
timestamp; the world extras merge on top of the proof.v1 payload.
Implementation
Future<File> save(WorldRunReceipt receipt) => _store.saveNamed(
fileNameFor(receipt.scenario),
GenerationReceipt(
command: 'simulate run ${receipt.scenario}',
target: receipt.scenario,
repro:
'zfa simulate run ${receipt.scenario}'
'${receipt.feature.isEmpty ? '' : ' --feature ${receipt.feature}'}'
' --seed ${receipt.seed}',
at: DateTime.parse(receipt.at),
generatorVersion: 'zuraffa-worlds-1',
input: {
'scenario': receipt.scenario,
'feature': receipt.feature,
'seed': receipt.seed,
},
files: const [],
plugin: 'simulate',
capability: 'run',
entity: receipt.scenario,
),
extra: receipt.toExtra(),
);