Answer architecture round 2: 0 🔴, 3 🟡 (0 misread); the cycle's and the chunk run's suites sit beside their modules, and the claim rule and the model override have one home each
CI / tests (pull_request) Successful in 3m23s

This commit is contained in:
2026-11-19 11:29:32 +01:00
parent b8595db647
commit df210aaeca
31 changed files with 807 additions and 657 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ A gate is something only time or a person passes: checks that still run, an appr
import dataclasses
import typing
from forge.reviews import ANSWERED, review_decision, waiting_threads
from forge.reviews import ANSWERED, APPROVED, CHANGES_REQUESTED, review_decision, REVIEW_REQUIRED, waiting_threads
from forge.pulls import CheckFailed, checks_now, open_pull, Pending, required_checks
from failure import Failure
from forge.commands import forge_of, Run
@@ -62,16 +62,16 @@ def gate(branch: str, checkout: str, at: typing.Callable[[str], Run]) -> Gate |
return checks
if isinstance(checks, Pending):
return Gate(worktree, pull, CHECKS)
if decision == "CHANGES_REQUESTED":
if decision == CHANGES_REQUESTED:
return Open(f"a reviewer requested changes on pull request #{pull}")
waiting = waiting_threads(pull, run) if forge == "gh" else []
if isinstance(waiting, Failure):
return waiting
if waiting:
return Open(f"a reviewer's comment on pull request #{pull} waits for an answer, in {', '.join(waiting)}")
if decision in (ANSWERED, "REVIEW_REQUIRED"):
if decision in (ANSWERED, REVIEW_REQUIRED):
return Gate(worktree, pull, NEW_REVIEW if decision == ANSWERED else APPROVAL)
return Open(f"pull request #{pull} passed its checks" + (" and is approved" if decision == "APPROVED" else ""))
return Open(f"pull request #{pull} passed its checks" + (" and is approved" if decision == APPROVED else ""))
def worktree_of(branch: str, run: Run) -> str | None | Failure: