listSessionSegmentPaths function
All segment paths of a (possibly rotated) session in chain order:
the .part-NN siblings, oldest first, then the primary. A listing
failure degrades to just the primary — raw-scan consumers
(readCustomRecordsOfType, sessionNameQuick) must never fail a
boot because housekeeping metadata could not be read.
Implementation
Future<List<String>> listSessionSegmentPaths(
FileSystem fs,
String primaryPath,
) async {
final listed = await JsonlSessionStorage._listSessionParts(fs, primaryPath);
return [...?listed?.parts, primaryPath];
}