Skip to content

Add escalation package with multi-backend support - #13

Merged
RevCBH merged 9 commits into
mainfrom
RevCBH/escalators
Jan 19, 2026
Merged

Add escalation package with multi-backend support#13
RevCBH merged 9 commits into
mainfrom
RevCBH/escalators

Conversation

@RevCBH

@RevCBH RevCBH commented Jan 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add internal/escalate package with Escalator interface for notifying users when tasks need attention
  • Implement Terminal, Slack, Webhook, and Multi escalator backends
  • Add factory function to create escalators from configuration
  • Include comprehensive test coverage for all backends

Test plan

  • Run go test ./internal/escalate/... - all tests pass
  • Verify terminal output formatting with different severity levels
  • Test Slack webhook integration with a real webhook URL
  • Test generic webhook integration

🤖 Generated with Claude Code

Test User added 6 commits January 19, 2026 11:48
Automated commit by ralph.sh
Automated commit by ralph.sh
Automated commit by ralph.sh
Automated commit by ralph.sh
Automated commit by ralph.sh
Automated commit by ralph.sh

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c37ecfa25c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +17 to +20
// Escalate writes the escalation to stderr
func (t *Terminal) Escalate(ctx context.Context, e Escalation) error {
prefix := ""
switch e.Severity {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Respect cancellation in terminal escalator

The Escalate interface states implementations should respect context cancellation, but this implementation never checks ctx.Err() and always writes to stderr. If callers use timeouts/cancellation to suppress notifications (e.g., shutdown paths or a Multi escalator with a deadline), terminal output still appears after cancellation, which violates the contract and can produce noisy/late alerts. Consider returning early when the context is canceled.

Useful? React with 👍 / 👎.

Test User and others added 3 commits January 19, 2026 12:06
Test verifies that each severity level (critical, blocking, warning,
info) displays the correct emoji prefix and label in terminal output.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Check ctx.Err() at the start of Escalate() to honor the interface
contract and avoid noisy/late output during shutdown or when using
deadlines in Multi escalator.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@RevCBH
RevCBH merged commit 7cfe22d into main Jan 19, 2026
@RevCBH
RevCBH deleted the RevCBH/escalators branch January 19, 2026 17:08
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