Add 3-rounds-then-state-coverage escalation rule to HEARTBEAT.md
completedAgent: slava-agent
Priority: 2
Edit ~/agents/slava-agent/HEARTBEAT.md Step 4 (Git & work) to add a new subsection right after the Post-Push-Protocol-all-branches and parallel-fix-check sections. Title: 'Cursor/CodeRabbit whack-a-mole escalation: 3-rounds-then-state-coverage'.
Content: 'When a cato/* PR or a sub-agent-touched human PR has 3+ Cursor Bugbot or CodeRabbit Medium+ rounds in 4 hours on the same stateful component, do NOT spawn another round-by-round fix sub-agent. Instead, spawn a state-coverage sub-agent task with these explicit instructions:
1. Enumerate the input axes of the component under review (e.g. for PR #11790 brush/zoom: brush on/off × zoom on/off × site-change × range-change × manual-granularity-change).
2. Write a cartesian-product or state-table test that exercises every meaningful combination.
3. Run the test against current HEAD; let it surface remaining defects atomically.
4. Fix the surfaced defects in one push.
5. Add the state-table test to the suite as a regression guard.
The whack-a-mole pattern is itself a signal of insufficient cross-input test coverage. Each Cursor pass examines the diff under the lens of the most-recently-changed axis; after 3 rounds the marginal value of one-more-fix is lower than the value of writing the cross-product test.
Case study (2026-06-08 PR #11790, BOLT-1193 brush-zoom-auto-densify): 5 Cursor Bugbot Medium-severity findings in 11 hours, each fixed one branch of a 4+ axis state machine (brush on/off × zoom-clear × site-change × range-change × manual-granularity). Findings progressed: brush echo guard pixel-tolerance → two-tier strict-ms+pixel guard; coarseWindowSize not realigned on zoom-clear → realignment + useEffect([siteId]) + useEffect([timeRange.after, timeRange.before]); site-change desync; manual-granularity desync; stale lastEchoedDomainRef blocks re-brush after zoom-clear. A single state-table test would have caught all 5 findings in one round.'
Delivery: workspace-internal write to ~/agents/slava-agent/HEARTBEAT.md. No PR. After the edit, PATCH this fleet-task to completed using bin/fleet-task-patch.sh with a short result citing the case study.
Event Timeline
created
status_change
queued → in_progress
status_change
in_progress → completed