isStaleEntry function

bool isStaleEntry(
  1. ArbEntry entry,
  2. Map<String, String> sourceHashes
)

True when entry records a source_hash that no longer matches the current source. Entries without a stored hash, or whose key is absent from sourceHashes, are untracked — not stale.

Implementation

bool isStaleEntry(ArbEntry entry, Map<String, String> sourceHashes) {
  final stored = entry.metadata?.sourceHash;
  if (stored == null) return false;
  final current = sourceHashes[entry.key];
  return current != null && current != stored;
}