Answer principles round 1: 1 🔴, 7 🟡 (0 misread); every effect is handed in as an argument, no test patches a global, and the traces principle scopes tools that run on their user's machine
CI / tests (pull_request) Successful in 3m43s

This commit is contained in:
2026-11-19 12:42:03 +01:00
parent 8ca612b7a4
commit cb3135bc8c
124 changed files with 1437 additions and 793 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
"""The human approval that `chunk-pr merge` waits for where the project's config sets `wait-for-approval`."""
import time
import typing
from forge.reviews import APPROVED, CHANGES_REQUESTED, github_decision, REVIEW_REQUIRED, waiting_threads
@@ -34,7 +33,7 @@ def approval(number: str, run: Run) -> bool | Failure:
return decision == APPROVED
def approved(number: str, run: Run, sleep: typing.Callable[[float], None] = time.sleep) -> Failure | None:
def approved(number: str, run: Run, sleep: typing.Callable[[float], None]) -> Failure | None:
"""None once GitHub reports pull request number approved; a Failure where `approval` fails, where a reviewer's comment waits for an answer, or where no approval came within WAIT_SECONDS."""
for waited in range(0, WAIT_SECONDS + 1, POLL_SECONDS):
read = approval(number, run)