Add escalation package with multi-backend support - #13
Conversation
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
There was a problem hiding this comment.
💡 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".
| // Escalate writes the escalation to stderr | ||
| func (t *Terminal) Escalate(ctx context.Context, e Escalation) error { | ||
| prefix := "" | ||
| switch e.Severity { |
There was a problem hiding this comment.
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 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>
Summary
internal/escalatepackage withEscalatorinterface for notifying users when tasks need attentionTest plan
go test ./internal/escalate/...- all tests pass🤖 Generated with Claude Code