mirror of
https://github.com/block/buzz.git
synced 2026-11-27 11:41:21 +00:00
The two operations added in 099bacbe had no direct unit tests -- they
were covered only indirectly by the integration suite. Four tests, each
pinning a property where the failure would be silent:
- a steer drains rather than peeks (a peek repeats the instruction to
the model every round)
- an empty queue is NotApplicable, not an empty Applied (the loop treats
applied-but-unchanged as a reason to look again, so an always-applying
operation spins it)
- only effects that change state count as progress, including effects
this loop deliberately ignores
- compaction clears the running token total (a stale total describes the
pre-compaction conversation and would re-trigger compaction at once)
Verified by mutation rather than assumed: removing the token reset fails
the compaction test, and making drain() peek fails the steer test.
78 unit + 21 integration green.
Signed-off-by: Michael Neale <michael.neale@gmail.com>
Co-authored-by: Michael Neale <michael.neale@gmail.com>