Answer prose round 1: 0 🔴, 3 🟡 (0 misread); the docstrings claim head-pinning only where a call takes head, and the wait comments name the forge each covers
This commit is contained in:
@@ -201,7 +201,7 @@ Install puts only `loop-claude` on `PATH`; call the others by their path, such a
|
||||
- `branch_chunks/` cuts a default branch into chunks and finds, for each, the items it shipped and the later chunks that fixed its code, for `score_outcomes` and `routing_figures`. It imports `reading_cost`'s record path.
|
||||
- `command_lines/` reads a shell command: its simple commands, and a docker call's subcommand and memory limits, for `command_patterns`, `reading_cost`, `routing_figures`, `rule_hook` and `run_heavy`.
|
||||
- `deploy_release` imports `release_plan`'s `release_standing`.
|
||||
- `forge/` tells a GitHub origin from a Gitea one and runs its CLI (`commands.py`), and finds a pull request and waits for its checks (`pulls.py`), for `chunk_preflight`, `chunk_pr`, `deploy_release` and `larv_review`.
|
||||
- `forge/` tells a GitHub origin from a Gitea one and runs that forge's CLI (`commands.py`), and finds a pull request and waits for its checks (`pulls.py`), for `chunk_preflight`, `chunk_pr`, `deploy_release` and `larv_review`.
|
||||
- `git_cli/` runs git for every tool (`git_repo.py`), and reads the git calls in a shell command (`git_command.py`).
|
||||
- `judge_replay` imports `loop_claude`'s judge, verdicts, premises and records.
|
||||
- `loop_claude` runs `chunk-preflight` as a process of its own.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""The pull request steps of a cut. They run gh where origin is on GitHub and tea elsewhere, as `forge.commands` tells the two apart.
|
||||
"""Opening and merging a cut's pull request, with gh where origin is on GitHub and with tea elsewhere.
|
||||
|
||||
Each step is pinned to head, the commit origin's release branch points at: the cut takes only a pull request from origin itself whose head is that commit, and the forge merges it only while its head is still that commit. So a fork's pull request from a branch of the same name, or a push to the branch after its checks passed, is never merged.
|
||||
merge is pinned to head, the commit origin's release branch points at: the forge merges the pull request only while its head is still that commit, so a push to the branch after its checks passed is never merged.
|
||||
"""
|
||||
from failure import Failure
|
||||
from forge.commands import Forge, gitea, Run
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
"""The forge a checkout's origin is on, GitHub or Gitea, and the calls to it that several tools make: `commands.py` tells the two apart and runs their CLIs, `pulls.py` finds a pull request and waits for its checks."""
|
||||
|
||||
@@ -5,10 +5,10 @@ import typing
|
||||
|
||||
from failure import Failure
|
||||
|
||||
# The CLI that talks to a forge: gh for a github.com origin, tea for any other.
|
||||
# The CLI of the forge that origin is on, as forge_of picks it.
|
||||
Forge = typing.Literal["gh", "tea"]
|
||||
|
||||
# Runs a command in the clone: what it printed, or a Failure with its reason.
|
||||
# Runs a command in the checkout: what it printed, or a Failure with its reason.
|
||||
Run = typing.Callable[[list[str]], str | Failure]
|
||||
|
||||
|
||||
|
||||
+3
-6
@@ -1,7 +1,4 @@
|
||||
"""Finding a pull request from origin's own branch, and waiting for its checks.
|
||||
|
||||
Each call is pinned to head, a commit on that branch: it takes only a pull request from origin itself whose head is that commit. So a fork's pull request from a branch of the same name is never taken.
|
||||
"""
|
||||
"""Finding a pull request from origin's own branch, and waiting for the checks on its head commit."""
|
||||
import fnmatch
|
||||
import time
|
||||
import typing
|
||||
@@ -9,9 +6,9 @@ import typing
|
||||
from failure import Failure
|
||||
from forge.commands import Forge, gitea, Run
|
||||
|
||||
# How long checks_passed waits between two reads of the head commit's status on Gitea.
|
||||
# How long checks_passed waits between two reads: of the head commit's status on Gitea, or of gh's watch while it reports no checks.
|
||||
POLL_SECONDS = 10
|
||||
# How long checks_passed waits for the checks before it gives up; CI took about 3 minutes in 2026-11.
|
||||
# How long checks_passed waits on Gitea for the checks before it gives up; CI took about 3 minutes in 2026-11. gh's watch waits as long as the checks run.
|
||||
WAIT_SECONDS = 30 * 60
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from forge.pulls import checks_passed, open_pull, POLL_SECONDS, required_checks, WAIT_SECONDS
|
||||
from forge.commands import forge_of, gitea
|
||||
from forge.commands import forge_of
|
||||
|
||||
|
||||
class ForgeOf(unittest.TestCase):
|
||||
@@ -17,7 +16,7 @@ class ForgeOf(unittest.TestCase):
|
||||
self.assertEqual(forge_of("https://gitea.larvit.se/o/r.git"), "tea")
|
||||
|
||||
|
||||
# An answer longer than the 200 characters a failure quotes of it, in a shape no call reads.
|
||||
# An answer no call can read, longer than the 200 characters of it that a failure quotes.
|
||||
LONG = "[" + ", ".join(["1"] * 100) + "]"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user