Skip to content

feat(alerts): add configurable threshold alerts with GitHub markdown syntax#14

Merged
Garbee merged 4 commits intomainfrom
claude/add-alerts-section-to-summary
Feb 14, 2026
Merged

feat(alerts): add configurable threshold alerts with GitHub markdown syntax#14
Garbee merged 4 commits intomainfrom
claude/add-alerts-section-to-summary

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Feb 14, 2026

Adds a conditional alerts section to the workflow summary that appears when metrics exceed configurable thresholds. Uses GitHub's native markdown alert syntax for better visual prominence.

Changes

Alert Detection (src/post/lib.ts)

  • New detectAlerts() function checks three resource types:
    • Memory utilization > threshold (reports first occurrence with step)
    • Sustained CPU > threshold for specified duration (reports all affected steps)
    • Disk usage > threshold (reports first occurrence with step)
  • CPU detection tracks all steps during the sustained period, not just when threshold is met

Alert Configuration (action.yml)

  • memory_alert_threshold: Default 80%
  • cpu_alert_threshold: Default 85%
  • cpu_alert_duration: Default 60 seconds
  • disk_alert_threshold: Default 90%

Alert Rendering (src/post/renderer.ts)

  • Conditionally renders alerts section first in summary (before Workflow Steps)
  • Uses GitHub markdown alert syntax with [!WARNING] directive
  • Each alert shown as blockquote with emoji icon (⚠️ memory, 🔥 CPU, 💾 disk)

E2E Testing (.github/workflows/test-action.yml)

  • New test-alerts-e2e job with lowered thresholds (CPU 10%/10s, Memory 5%, Disk 10%)
  • Separate steps trigger each alert type to validate end-to-end functionality

Example Output

### Alerts

> [!WARNING]
> ⚠️ Memory utilization exceeded 80% in step **Memory Heavy Task** (85.3%)
> 🔥 Sustained CPU usage above 85% for more than 60 seconds in steps: **Build**, **Test** (92.7%)

@Claude Claude AI self-assigned this Feb 14, 2026
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Add conditional alerts section to summary report feat(alerts): add configurable threshold alerts to summary Feb 14, 2026
@Claude Claude AI requested a review from Garbee February 14, 2026 17:37
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
@Claude Claude AI changed the title feat(alerts): add configurable threshold alerts to summary feat(alerts): add configurable threshold alerts with GitHub markdown syntax Feb 14, 2026
@Garbee Garbee marked this pull request as ready for review February 14, 2026 17:57
@Garbee Garbee merged commit f596c0e into main Feb 14, 2026
8 checks passed
@Garbee Garbee deleted the claude/add-alerts-section-to-summary branch February 14, 2026 19:24
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.

2 participants