|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0001 |
| Class | KNOWN-LIMITATION |
| Severity | 1 |
| Status | blocked |
| Models | — |
| Found | 2026-09-20 audit of 581b8091 |
| Decision needed | Should FhFmuExport gain --uuid and --generation-time options, or honour SOURCE_DATE_EPOCH, so that two exports of the same model produce byte-identical metadata? |
src/fmu/fhFMUexport/FmuUuid.cpp:10-20 seeds a Mersenne twister from std::random_device and returns a fresh random UUID on every call:
std::random_device entropySource;
...
uuids::uuid_random_generator uuidGenerator{generator};
return uuids::to_string(uuidGenerator());
src/fmu/fhFMUexport/FmuGenerationTimestamp.cpp:8-21 reads the wall clock:
const auto now = std::chrono::system_clock::now();
Both values reach modelDescription.xml — as guid in FMI 2.0 and instantiationToken in FMI 3.0, and as generationDateAndTime in both — and the token is repeated in resources/iomapping.xml.
Two exports of the same model from the same playpen differ. Three consequences:
This is a limitation rather than a defect: the values are legal, and FMI requires only that the token in modelDescription.xml and resources/iomapping.xml match within one FMU, which they do.
--uuid <value> and --generation-time <iso8601> to ExportOptionsParser, used in place of the generated values when given. Explicit, testable, no effect on any existing invocation.SOURCE_DATE_EPOCH for the timestamp and derive the UUID from a hash of the model file and the bundled library set. Reproducible with no extra flags, but changes the default behaviour and makes the UUID a content hash rather than a random identifier, which some hosts may key on.Option 1 is the smaller change and leaves the default untouched.
Export the same model twice and diff the two modelDescription.xml files: guid / instantiationToken and generationDateAndTime differ at HEAD. With option 1, export twice passing the same --uuid and --generation-time and assert the two archives' modelDescription.xml and resources/iomapping.xml are byte-identical.
Option 1 adds two options and no default behaviour change, so the risk is confined to the new code path. Option 2 changes what every existing export produces and would need the FMU test suite re-run. Neither is a prerequisite for any current work: a consumer that needs to compare exports can blank the three fields before diffing.