test(transactions): verify consistency histories

Merged
RE
2mo ago
+444-93

Problem

The transaction TestKit consistency verifier had no deterministic coverage despite carrying the highest measured state-testing risk: CheckConsistency was uncovered with cyclomatic complexity 54 and CRAP 2970. Its rejection rules were exercised primarily through randomized and stress-oriented tests.

Solution

Add deterministic BVT tests for valid serialized histories, missing versions, multiple and invalid writers, invalid readers, dependency cycles, in-doubt outcomes, and timeout tolerance. Factor history recording and consistency checks into invariant-specific helpers so runtime collection and deterministic verification use the same paths.

Rationale

The focused suite verifies persisted version observations, ordering, serializability, abort state, corruption-shaped histories, and recoverable incomplete outcomes without cloud dependencies. The extraction lowers CheckConsistency complexity from 54 to 8 while focused coverage reaches 93.3% line and 100% branch for that method.

Progress toward #10863.

Microsoft Reviewers: Open in CodeFlow