Answer architecture round 1: 0 🔴, 4 🟡 (0 misread); move the shared loop state out of loop_claude, split ranking and routing, give the reviewer rung one rule
CI / tests (pull_request) Successful in 2m14s

This commit is contained in:
2026-11-10 22:03:16 +01:00
parent 8a80d452f2
commit 70a1b95086
70 changed files with 748 additions and 625 deletions
+5 -3
View File
@@ -2,13 +2,15 @@
import dataclasses
from model_routing.route import HIGHEST_ESCAPE_AND_IMPACT, Route
from model_routing.ladder import reviewers_rung, Rung
from model_routing.ladder import review_rung, reviewers_rung, Rung
@dataclasses.dataclass(frozen=True)
class ReviewChoice:
# The rung of each pass's reviewer.
reviewers: Rung
# The rung of each pass's reviewer where the branch changes only Markdown no agent follows.
markdown_only: Rung
seat: Rung
security: Rung
# Each rung a higher E + I than the route's picks for the reviewers, with the lowest E + I that picks it, in rising order.
@@ -22,5 +24,5 @@ def chosen(project: Rung, route: Route) -> ReviewChoice:
for escape_and_impact in range(route.reviewed_on() + 1, HIGHEST_ESCAPE_AND_IMPACT + 1):
if (rung := reviewers_rung(project, route.rung, escape_and_impact)) != reviewers:
higher.setdefault(rung, escape_and_impact)
# A seat and the security pass run on the project's rung, as ladder.review_rung says.
return ReviewChoice(reviewers, project, project, higher)
markdown_only = reviewers_rung(project, route.rung, route.reviewed_on(), markdown_only=True)
return ReviewChoice(reviewers, markdown_only, review_rung(project, route.rung, route.reviewed_on(), "seat"), review_rung(project, route.rung, route.reviewed_on(), "security"), higher)