pa-04 — Verification

One command

cd pa-04-partitioned-log && bash scripts/verify.sh

What the tests prove

TestInvariant
TestKeyMapsToSamePartitiona key always hashes to the same partition (ordering guarantee)
TestPerPartitionOrderingrecords for a key keep order via monotonic offsets
TestConsumeFromOffsetconsume returns records at/after an offset; HW is correct
TestConsumerGroupOffsetscommit/resume works; groups are independent
TestRangeAssignment5 partitions / 2 consumers → contiguous ranges, earlier gets the extra
TestRoundRobinAssignment5/2 → round-robin distribution
TestRetentionKeepsOffsetsStabletruncation drops old records; survivors keep absolute offsets; HW unchanged

All under -race.

What "green" does NOT guarantee

  • In-memory, single-node. Production replicates partitions (leader/follower, db-17) with durable segments.
  • No sticky rebalancing / transactions. Range/round-robin only; minimal-movement reassignment is an exercise.
  • No consumer-lag alerting wired — the SLI is an exercise (pa-09).