isolatedBdFixtureSkipReason function

String? isolatedBdFixtureSkipReason({
  1. required String? bdVersion,
  2. required Set<String> initFlags,
})

The skip reason when the installed bd cannot run an isolated fixture store, or null when it can.

Two reasons, both PRINTED: no binary at all (bdVersion null, the CI case), or a binary whose init is missing a flag the isolated store is built from. The second is the one worth naming — a version skew that silently fell back to a shared server is how a fixture store bound to someone else's Dolt in the first place.

Pure: bdVersion and initFlags are what a caller probed, so both outcomes are provable without a binary to probe.

Implementation

String? isolatedBdFixtureSkipReason({
  required String? bdVersion,
  required Set<String> initFlags,
}) {
  if (bdVersion == null) {
    return 'requires a real bd binary on PATH (absent in CI)';
  }
  final missing = [
    for (final flag in requiredIsolatedBdInitFlags)
      if (!initFlags.contains(flag)) flag,
  ];
  if (missing.isEmpty) return null;
  return 'installed $bdVersion cannot initialize an isolated proxied store: '
      'bd init is missing ${missing.join(', ')}';
}