Conversation
The framework emitted raw signals but had no operational layer turning them into an SLO. Add evaluate_slo (SLI + error budget), burn_rate, and multi-window multi-burn-rate alerts (Google SRE workbook tiers) over outcome records. Records are plain data and the clock is injectable, so it is fully deterministic. Wired through the facade, AC_evaluate_slo/ AC_burn_alerts executor commands, MCP tools and the Script Builder.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 42 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
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
The framework emits raw signals (
observabilitymetrics,run_historydurations) but had no operational layer turning them into an SLO, an error budget, or burn-rate alerts. This adds that.evaluate_slo(records, target, *, window_s, now)→{sli, good, total, budget_total, budget_remaining, budget_remaining_fraction, burn_rate}.burn_rate(...)— the bare burn rate over a window.burn_alerts(records, target, *, rules, now)— multi-window multi-burn-rate alerts;default_burn_rules()are the Google SRE tiers (page 14.4×@1h/5m, page 6×@6h/30m, ticket 1×@3d/6h), firing only when both windows exceed the threshold.BurnRuleto customise.Records are plain data (
[{"timestamp", "ok"}]), clock injectable → fully deterministic. Pure stdlib.Five-layer wiring
je_auto_control/utils/slo/__init__.py+__all__AC_evaluate_slo,AC_burn_alertsac_evaluate_slo,ac_burn_alertsTests & docs
test/unit_test/headless/test_slo_batch.py(11 tests: budget math, burn rate, windowing, multi-window alerts fire/quiet, bad target)Lint clean: ruff / pylint / bandit / radon.