Fork card: drop the redundant R-record mixed clause; its vector is an R-entry negative (Soul s1)
Some checks failed
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
Some checks failed
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9235c244ff
commit
448a202162
5 changed files with 8 additions and 10 deletions
|
|
@ -555,10 +555,9 @@ namespace GameCult.Networking.Tests
|
|||
var counted = answers.Where(a => (S(a!["outcome"]) is "Counted" or "Revision") && S(a["options_hash"]) == S(card["options_hash"])
|
||||
&& !answers.Any(r => S(r!["outcome"]) == "Retraction" && S(r["retracts"]) == S(a["answer_id"]))).Select(a => S(a!["answer_id"])).FirstOrDefault();
|
||||
if ((record["counted_answer_id"] is null ? null : S(record["counted_answer_id"])) != counted) yield return "counted_answer_id is not derived";
|
||||
// R-record: a record is one reader's view; named answerers are counted by distinct id, nil ones by a bound
|
||||
// R-record: named answerers are counted by distinct id, nil ones by a bound
|
||||
var named = answers.Count(a => a!["answerer"] is not null); var total = answers.Count; var n = record["answerer_count"]!.GetValue<long>();
|
||||
if (named > 0 && named < total) yield return "R-record: a record mixes named and nil answerers";
|
||||
else if (total == 0 && n != 0) yield return "R-record: no answers and a count other than 0";
|
||||
if (total == 0 && n != 0) yield return "R-record: no answers and a count other than 0";
|
||||
else if (named == total && total > 0 && n != answers.Select(a => S(a!["answerer"])).Distinct().Count()) yield return "R-record: answerer_count is not the distinct answerers";
|
||||
else if (named == 0 && total > 0 && (n < 1 || n > total)) yield return "R-record: a withheld count outside 1..answers";
|
||||
// R-entry: the card's view and the record's view agree, so a withheld card never rides beside a named account
|
||||
|
|
|
|||
Loading…
Reference in a new issue