anchor.diff:      }
   
       // Does package have analysis for the current version?
  +    final Key versionKey =
  +        packageKey.append(PackageVersionAnalysis, id: packageVersion);
       final PackageVersionAnalysis versionAnalysis =
  -        (await db.lookup([packageAnalysis.latestVersionKey])).first;
  +        (await db.lookup([versionKey])).single;
       if (versionAnalysis == null) return true;
   
       // Is current analysis version newer?
  
positive.code: 
    Future deleteObsoleteAnalysisEntries() async {
      final DateTime threshold =
          new DateTime.now().toUtc().subtract(const Duration(days: 180));
      final Query query = db.query(Analysis)
        ..order('timestamp')
        ..filter('timestamp <', threshold);
  
negative.code: AnalysisBackend get analysisBackend => ss.lookup(#_analysisBackend);
  
  final Logger _logger = new Logger('pub.analyzer.backend');
  
  const Duration freshThreshold = const Duration(hours: 12);
  const Duration obsoleteThreshold = const Duration(days: 180);
  
  /// Datastore-related access methods for the analyzer service
  class AnalysisBackend {
  