heavyScanGuardLines function

List<String> heavyScanGuardLines(
  1. int sizeBytes,
  2. String path
)

The hygiene guidance lines for a session file of sizeBytes over the sessionHeavyScanWarnBytes guard (issue #1882 AC3): the exact size, why it matters, and the three escapes — vacuum the dead ledger snapshots, repair/drop the ledger, or start a fresh session / branch.

Implementation

List<String> heavyScanGuardLines(int sizeBytes, String path) => [
  'warning: $path is ${formatSessionBytes(sizeBytes)} (> '
      '${formatSessionBytes(sessionHeavyScanWarnBytes)}) — reads over it '
      'scan the whole ledger',
  '  escapes: `fa session repair <sid> --dry-run` (ledger surgery), '
      '`sessions.vacuumLedgers: true` (vacuum dead snapshots at resume), '
      'or start a fresh session / branch',
];