Scale the blocker window by lane risk, converging with risk-nexus
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

risk-nexus accepted the offer to match their convention rather than grow a second
one, and published it: 14d critical/high, 30d medium, 60d low, nothing auto-closing
on staleness alone. Their preference — point warden route gaps at those windows and
the two registers agree without a shared mechanism — is better than a joint tool.

blocker_stale_days() now maps lane risk onto those windows. A flat 14 would have
been wrong in both directions: too aggressive for a low-risk pointer, and it treated
an admin PAT lane the same as one.

ungraded takes the shortest window, not the longest. ADR-0007 makes an absent grade
a defect and ADR-0008 makes a grade cover the whole path, so a lane nobody graded is
the one whose blocker deserves least trust. Encoding that as 60 days would have been
the fail-open default this repo already fixed once.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-08-21 13:29:29 +02:00
parent 55f0f47a02
commit e18894ee5b
7 changed files with 96 additions and 24 deletions

View file

@ -799,6 +799,25 @@ def test_blocker_cadence_is_separate_from_pointer_cadence():
assert DEFAULT_BLOCKER_STALE_DAYS < DEFAULT_STALE_DAYS
def test_blocker_window_scales_with_risk_and_matches_risk_nexus():
"""risk-nexus stall windows: 14d critical/high, 30d medium, 60d low.
They offered the convention instead of a joint tool, so the two registers
agree only for as long as these numbers do.
"""
from warden.routing.catalog import blocker_stale_days
assert blocker_stale_days("high") == 14
assert blocker_stale_days("standard") == 30
assert blocker_stale_days("low") == 60
# An ungraded lane gets the SHORTEST window, not the longest -- ADR-0007 makes
# an absent grade a defect, so its blocker is the least trustworthy of all.
assert blocker_stale_days("ungraded") == 14
assert blocker_stale_days(None) == 14
# An explicit --stale-days still wins.
assert blocker_stale_days("low", 7) == 7
def test_asked_and_waiting_is_not_verification():
"""The failure this whole change exists to catch.