Score risk as L + E + I, and route a worker on its item's L and its reviewers on its E + I

This commit is contained in:
2026-10-16 07:53:48 +02:00
parent d1b0fe3a44
commit 152972d84b
34 changed files with 699 additions and 514 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
"""Refuse an Agent call that launches a review below the rung it needs, worked out from the two rungs loop-claude hands its worker: docs/decisions.md → `routing:`."""
"""Refuse an Agent call that launches a review below the rung it needs, worked out from the rungs loop-claude hands its worker: docs/decisions.md → `routing:`."""
import pathlib
import typing
@@ -18,11 +18,11 @@ SUBJECTS: dict[ReviewKind, str] = {"seat": "a comprehension seat", "security": "
def reviewer_breaches(call: Call, environ: typing.Mapping[str, str]) -> list[Breach]:
"""The breach of an Agent call that launches a review below its rung; none where loop-claude handed no rungs."""
project, worker = handed(environ)
project, worker, reviewers = handed(environ)
kind = review_kind(call.given)
if kind is None or project is None or worker is None:
if kind is None or project is None or worker is None or reviewers is None:
return []
required = review_rung(kind, project, worker)
required = review_rung(kind, project, reviewers)
named = named_rung(call.given, worker)
if position(named) >= position(required):
return []