Skip to content

fix(discord-bot): page long-running turns on 15m×2ⁿ milestones - #384

Merged
patroza merged 1 commit into
fork/devfrom
t3code/fix-repeated-long-running-alerts
Aug 9, 2026
Merged

fix(discord-bot): page long-running turns on 15m×2ⁿ milestones#384
patroza merged 1 commit into
fork/devfrom
t3code/fix-repeated-long-running-alerts

Conversation

@patroza

@patroza patroza commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Long-running T3 turn alerts in #omegent-alerts used a fixed 10-minute cooldown after the 15-minute threshold, so a legitimate multi-hour turn (or sticky running row) re-paged every ~10 minutes.
  • Page instead on an age-milestone ladder: 0.25h → 0.5h → 1h → 2h → 4h → … (15m × 2ⁿ) while projection_turns.state = 'running'.
  • Alert body now shows current milestone and next rung; milestone state is pruned when the turn leaves the long-running set. Bot restart re-pages at most once for the current rung.

For the ~2h configurator turn that motivated this: previously ~11 pages after 15m; now 4 (15m, 30m, 1h, 2h).

Test plan

  • Unit tests for milestone math, between-rung silence, restart re-page once, label formatting (Alerts.test.ts)
  • Deploy / restart discord bot on guest; confirm a long turn pages at ladder steps only
  • Confirm finished turns stop alerting

Stop re-alerting every 10 minutes for the same stuck turn. Alert at
0.25h, 0.5h, 1h, 2h, 4h, … while projection_turns stays running, which
keeps multi-hour agent work (and sticky rows) from flooding #omegent-alerts.
@patroza
patroza marked this pull request as ready for review August 9, 2026 09:34
@patroza
patroza merged commit 3c22551 into fork/dev Aug 9, 2026
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant