loadTwinFixtureSuites function
Loads every fixture file under rootPath (layout: <root>/v<N>/*.json),
sorted by path for stable test ordering.
Throws FormatException on malformed JSON, and on any fixture that does
not match the documented format — a broken fixture should fail loudly and
immediately, not silently shrink the suite or fail later as a phantom
rules divergence.
Implementation
List<TwinFixtureSuite> loadTwinFixtureSuites(String rootPath) {
final files =
Directory(rootPath)
.listSync(recursive: true)
.whereType<File>()
.where((f) => f.path.endsWith('.json'))
.toList()
..sort((a, b) => a.path.compareTo(b.path));
return [
for (final file in files)
parseTwinFixtureSuite(file.path, jsonDecode(file.readAsStringSync())),
];
}