cultmesh-py: the notification-stamp test pins the store-less case as held as given
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 29m58s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-28 02:23:42 +01:00
commit 9b8e036426

View file

@ -89,7 +89,11 @@ class NotificationStampTests(unittest.TestCase):
subscriptions = {"s": _DatabaseSubscription("s", set(), set())}
replies = server._handle_connection_message(put_of(KEY_A, "peer", stored_at=peer_stamp), subscriptions, peer=PEER)
held = node.cache.get_required_envelope(NOTE, KEY_A).stored_at
self.assertGreater(held, local)
# A store restamps a replacing write later than the record it replaces; a store-less cache holds the peer's stamp.
if backing is None:
self.assertEqual(held, peer_stamp)
else:
self.assertGreater(held, local)
self.assertEqual([reply["document"]["storedAt"] for reply in replies], [held])
self.assertEqual(node.database._shard_logs[SHARD_ID][-1]["put"]["document"]["storedAt"], held)