Answer architecture round 1: 3 🔴, 4 🟡; hand interrupts the rungs, derive the rung rule once, and give each rung one spelling
This commit is contained in:
@@ -5,7 +5,7 @@ import typing
|
||||
from rule_hook.rules import Breach
|
||||
from rule_hook.call import Call, text
|
||||
from model_routing.worker_rungs import handed
|
||||
from model_routing.ladder import highest, LADDER, position, Rung
|
||||
from model_routing.ladder import position, review_rung, Rung
|
||||
|
||||
# larv-review §3's reviewers, by the subagent type its passes launch.
|
||||
REVIEWERS = frozenset(("override-reviewer", "principles-auditor", "product-owner-reviewer", "prose-reviewer", "stability-reviewer", "systems-architect"))
|
||||
@@ -22,8 +22,7 @@ def reviewer_breaches(call: Call, environ: typing.Mapping[str, str]) -> list[Bre
|
||||
kind = review_kind(call.given)
|
||||
if kind is None or project is None or worker is None:
|
||||
return []
|
||||
# A reviewer runs on the higher of the worker's rung and the project's; a seat or the security pass on the project's.
|
||||
required = highest(project, worker) if kind == "reviewer" else project
|
||||
required = review_rung(kind, project, worker)
|
||||
named = named_rung(call.given, worker)
|
||||
if position(named) >= position(required):
|
||||
return []
|
||||
@@ -48,7 +47,4 @@ def named_rung(given: dict[str, typing.Any], worker: Rung) -> Rung:
|
||||
model, effort = text(given, "model"), text(given, "effort")
|
||||
if not model:
|
||||
return Rung(worker.model, effort or worker.effort)
|
||||
family = [rung for rung in LADDER if rung.family() == model]
|
||||
if not family:
|
||||
return Rung(model, effort)
|
||||
return Rung(family[0].model, effort) if effort else family[0]
|
||||
return Rung.from_agent(model, effort)
|
||||
|
||||
Reference in New Issue
Block a user