Date: 2026-05-29
Time: 13:10
I'll work from the test file content provided, which gives a thorough view of the implementation's contract.
hinted-handoff/hintedhandoff.py — The implementation: how consistent hashing selects preferred nodes, how sloppy quorum routing works, and how triggerhandoff iterates nodes to deliver hintshinted-handoff/hintedhandoff.py:getpreferred_nodes — The consistent hashing logic that determines which N nodes own a key — foundational to understanding every test's setupread-repair/read_repair.py — Read repair is the complementary consistency mechanism: hinted handoff handles write-time failures, read repair catches divergence at read timemerkle-tree/merkle_tree.py — Merkle trees provide anti-entropy repair for the exact scenario test 12 exposes: when hints are lost, background Merkle tree comparison detects and repairs missing datasloppy-vs-strict-quorum — DDIA Chapter 5's distinction between strict quorums (W + R > N on the *same* N nodes) and sloppy quorums (any W nodes will do) — tests 6 and 7 directly contrast these two modeshinted-handoff-sloppy-quorum-writes-to-non-preferred — When sloppy quorum is enabled and preferred replicas are down, writes succeed by routing to non-preferred substitute nodes that store hints for later deliveryhinted-handoff-hint-ttl-exclusive-boundary — Hint expiration uses exclusive comparison: a hint created at time t with TTL d is not expired at time t + d - 1 but is expired at time t + dhinted-handoff-strict-quorum-rejects-insufficient-preferred — With sloppyquorum=False, a write fails if fewer than writequorum preferred nodes are available, even if non-preferred nodes could servehinted-handoff-hints-cleared-after-delivery — After trigger_handoff successfully delivers hints to a recovered node, the hint count on the substitute node drops to zerohinted-handoff-hint-loss-is-silent-data-loss — If a hint node crashes and its hints are lost before handoff, the target node never receives the data and no error is raised — this is an acknowledged limitation requiring anti-entropy repair