core: require account attribution for legacy imports
Apply provider and historical account identity checks to the designated hourly import source. Retain previously attributed history when a CLI signs out, while excluding mismatched or unknown accounts. Refs #19
This commit is contained in:
@@ -56,8 +56,8 @@ public static class FleetAnalysis
|
||||
List<ModelTokenPoint> tokens = reconciled.Select(u => new ModelTokenPoint(Hour(u.Time), u.Model, u.Counts)).ToList();
|
||||
if (account.HistoryBefore is { } before)
|
||||
{
|
||||
var legacy = profiles.SingleOrDefault(p => p.Machine == account.LegacyMachine && p.Profile.Id == account.LegacyProfile).Profile;
|
||||
if (legacy is null) warnings.Add("Designated legacy history source has not reported.");
|
||||
var legacy = verified.SingleOrDefault(p => p.Machine == account.LegacyMachine && p.Profile.Id == account.LegacyProfile).Profile;
|
||||
if (legacy is null) warnings.Add("Designated legacy history source is unavailable or unverified.");
|
||||
else tokens.AddRange(legacy.LegacyTokens.Where(t => t.Time < before));
|
||||
warnings.Add("Before the migration cutoff, history uses one designated machine; cross-machine attribution is unavailable.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user