fix(probe): give the availability gate a failure budget #157
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/availability-failure-budget"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The release availability gate failed on one bad sample. Across the 21 retained
runs in
workflows, 11 of 21 failed. Ten were noise:The separation is clean. Noise reached 2 consecutive failures and a 9.1 percent
rate. The one true outage reached 25 consecutive and 100 percent, and it never
passed preflight (
preflight_successes: 0).A gate that fails half the time stops being read as a signal.
Change
A check fails the gate only when either holds:
Both thresholds sit inside the empty gap above. At the measured cycle time of
2.5 to 4.5 seconds, 3 consecutive failures is 8 to 13 seconds of sustained
outage.
The rule applies to every check. The two flakiest checks
(
production-dashboard-activity,production-service-health) are cluster-localand account for 9 of the 15 flaky results, so a carve-out for in-cluster checks
would keep half the false failures. Their errors are
connection refusedandconnection reset by peer, which is pod churn during rollout.Preflight is unchanged. A sustained outage still never enters the measurement
window.
Second defect fixed
The measurement loop read:
One blip both failed the gate and stopped the run extending to its sample
floor. Recorded failing runs show 25 to 37 samples against 75 for healthy runs.
Since the controller rejects any run under 60 samples, tolerating a blip without
this fix would have converted a false failure into
:availability_insufficient_samples.Compatibility
failureskeeps its meaning: every failed check result. Addedtolerated_failures,max_consecutive_failures, and per-checkcheck_stats.This change is inert on its own.
availability_gate.ex:131still rejects arun with
evidence["failures"] != 0, so a tolerated run is still refused. Thatgate moves in a follow-up binjovi PR. Ordering is fail-closed: this ships first
and changes nothing, then the controller change activates it.
Tests
Red first. New cases cover a single blip, a streak of two, a streak of three, a
rate above budget, a short run below the absolute floor, and three sequences
recorded from real runs (
445d425a9422,1c5d24fc7228,1546c96d8ad4).scripts/check-availability-probe.shpasses;VERSION7 to 8 with the scriptpin and new symbol assertions.
https://claude.ai/code/session_016qGissozRbgkyNM5DnTQJ5