docs(logger): document three-tier failure-handling model#3701
Merged
Conversation
Extends the convention added in #3650 with the third tier that emerged during the alert-noise cleanup: - Tier 1: logger.error — unexpected, pages on-call - Tier 2: logger.warn — expected third-party state we accept - Tier 3: logger.warn + createEscalation({ category, dedup_key }) — actionable but not page-worthy, queued for batch triage Docs-only. Future authors picking between error and warn for a third-party failure now have a single reference, and the escalation tier (introduced in #3672) is discoverable from the same JSDoc instead of being implicit in PR history. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the
loggerJSDoc convention added in #3650 with the third tier that emerged across this session's noise cleanup (PRs #3578 → #3672).The model
logger.error#aao-errors+ PostHog$exceptionlogger.warnlogger.warn+createEscalation({ category: 'needs_human_action', dedup_key })Why
After the convention doc in #3650, we discovered that "expected failure" splits into "shrug" vs "needs human action eventually." Without the third tier in the JSDoc, a future author has to read PR history to figure out the right pattern for a Slack
not_in_channel-style condition.Example call site for tier 3 lives in
slack/client.ts:inviteToChannel(added in #3672).Test plan
test:unit + test-dynamic-imports + typecheck) — passed🤖 Generated with Claude Code