retire-longinusx: a record names the retiring ones only by a whole string, not by a substring
The first dry run was refused by NameFile USA, whose name list holds longer strings containing the words. A reference is a string equal to the id or the name. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7109ce9e57
commit
8038b46aec
1 changed files with 2 additions and 1 deletions
|
|
@ -1116,8 +1116,9 @@ public static class Program
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A needle is the whole serialized string: a name inside a longer string (a name list entry) is not a reference.
|
||||||
var needles = doomed.Select(d => d.Key.Value).Concat(new[] { "LonginusX", "Traction" })
|
var needles = doomed.Select(d => d.Key.Value).Concat(new[] { "LonginusX", "Traction" })
|
||||||
.Select(System.Text.Encoding.UTF8.GetBytes).ToArray();
|
.Select(text => MessagePack.MessagePackSerializer.Serialize(text)).ToArray();
|
||||||
var doomedKeys = new HashSet<string>(doomed.Select(d => d.Key.Value));
|
var doomedKeys = new HashSet<string>(doomed.Select(d => d.Key.Value));
|
||||||
var named = 0;
|
var named = 0;
|
||||||
foreach (var other in stored.Where(d => !doomedKeys.Contains(d.Key.Value)))
|
foreach (var other in stored.Where(d => !doomedKeys.Contains(d.Key.Value)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue