Receipt · 8ff8c1af-0
Retention policy keeps RETENTION_LIMIT+1 rows (off-by-one)
The finding
- src/providers/telemetry.ts:206-214
Using id < (MAX(id) - LIMIT) retains rows with id >= (MAX - LIMIT), which is LIMIT+1 rows due to inclusive range (e.g., keep 50..1050 inclusive when MAX=1050, LIMIT=1000). If the intent is to keep exactly RETENTION_LIMIT rows, the condition should be id <= (MAX - LIMIT).
Fix
Use <= instead of <. Example: DELETE FROM routing_decisions WHERE id <= (SELECT MAX(id) - ? FROM routing_decisions); DELETE FROM failures WHERE id <= (SELECT MAX(id) - ? FROM failures); Bind RETENTION_LIMIT as a parameter to avoid string interpolation. Optionally, guard NULL MAX with COALESCE.
Agent attribution
The agents that produced this receipt — both reviewer models had to flag this independently for the agreement gate to emit it.
anthropic
gpt-5
116.7s · error
openai
claude-opus-4-7
148.6s · error
Total
wall-clock review time · est. inference cost
148.6s · $0.40
Sweeper
closed at SHA
still open
internal review id · 8ff8c1af
Third-party witnesses
Everything below lives on GitHub's event log, not ours. Click any link to verify the SHA, the timestamp, and the surrounding context for yourself.
Original review comment
https://github.com/AntFleet/bench-mythos-router/pull/2#issuecomment-4540078216