Diagnoses and routes failures by analyzing error patterns, classifying severity, and applying retry logic, suppression budgets, and escalation rules. Use when handling errors, troubleshooting failures, recovering from API errors or timeouts, deciding whether to retry or escalate an issue, or managing service outages and tool dependency failures. Applies to any scenario where a check has failed, evidence of success is missing, or an unresolved error needs a structured response. Includes explicit untrusted-content/prompt-injection guardrails for third-party inputs.
98
Quality
94%
Does it follow best practices?
Impact
100%
1.16xAverage score across 9 eval scenarios
A developer tools company ships a CLI that generates HTML documentation from Python docstrings. Their build pipeline uses a popular documentation generator that has recently started emitting deprecation warnings about an old configuration key — the warnings appear in stderr but the documentation output is always correct and complete. These warnings are cluttering the CI logs and the team wants to handle them systematically.
The team also anticipates they'll need to handle other minor build warnings in the future (e.g., missing optional metadata fields, non-fatal rendering hints). They want a Python module that categorizes and handles these low-severity warnings in a consistent way, with a clear policy on when to keep retrying the build step vs. when to just log and move on.
Write a Python module build_warning_handler.py that:
WarningReport dataclass or similar result structure capturing what happenedPOLICY.md explaining the retry/log strategy usedThe module should be importable without any external dependencies beyond the standard library.