Rename do-epic to build-epic, with no alias, and its config folder with it
CI / tests (pull_request) Successful in 4m34s

This commit is contained in:
2026-12-03 22:35:13 +01:00
parent e6b025caaa
commit cded873730
100 changed files with 919 additions and 910 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
"""What the entry points that drive chunks share: build-release and do-epic.
"""What the entry points that drive chunks share: build-release and build-epic.
Each runs a chunk as cycles of bin/agent_cycle/. cycle_start.py starts a cycle and chunk_run.py closes it, on the Loop this_loop.py holds, once claims.py has claimed the checkout. prompts.py words what every worker is told, project/ reads a checkout's premises, records and saved models, and drivers.py names the entry points. No module here imports an entry point's package, and bin/repo_checks/test_package_cycles.py fails on such an import.
"""
+1 -1
View File
@@ -31,7 +31,7 @@ class Run(typing.Protocol):
@dataclasses.dataclass(frozen=True)
class ChunkRun:
"""The run of one chunk, for an entry point that never hands it to another process, such as do-epic."""
"""The run of one chunk, for an entry point that never hands it to another process, such as build-epic."""
cycle_number: int = 0
# The evidence of the latest unfinished verdict; empty before the chunk's first one, and once it finishes.
unfinished_evidence: str = ""
+5 -5
View File
@@ -1,4 +1,4 @@
"""How entry points claim a checkout before they start a chunk in it, so that two never start the same chunk and do-epic never starts one where build-release runs.
"""How entry points claim a checkout before they start a chunk in it, so that two never start the same chunk and build-epic never starts one where build-release runs.
An entry point holds `starting` on `project_lock` while it lists the windows of the checkout's chunks and starts new ones. Where the lock cannot be taken, `starting` yields a Failure, and the entry point doesn't start any chunk. It starts each chunk in a tmux window with CHUNK_FLAG, and hands that window the variables `handed` picks.
"""
@@ -12,9 +12,9 @@ from loop_state.paths import Paths, XDG_CONFIG_HOME, XDG_STATE_HOME
from transcript_archive.project_key import project_key
from agent_cycle import tmux
# The file an entry point keeps locked with flock while it lists the windows of a project's chunks and starts new ones. Two loops whose chunks finish together then don't start a chunk twice, and do-epic, which holds the same lock, never starts a chunk in a checkout while build-release does.
# The file an entry point keeps locked with flock while it lists the windows of a project's chunks and starts new ones. Two loops whose chunks finish together then don't start a chunk twice, and build-epic, which holds the same lock, never starts a chunk in a checkout while build-release does.
LOCK = "starting"
# The flag that tells the entry point in a window its chunk, as `--chunk item-372` for build-release and `--chunk ABC-34 ABC-12` for do-epic. Nobody types it, so no panel picked it.
# The flag that tells the entry point in a window its chunk, as `--chunk item-372` for build-release and `--chunk ABC-34 ABC-12` for build-epic. Nobody types it, so no panel picked it.
CHUNK_FLAG = "--chunk"
# The prefix of the variables both entry points read.
OWN = "BUILD_RELEASE_"
@@ -29,7 +29,7 @@ def handed(env: typing.Mapping[str, str]) -> dict[str, str]:
@contextlib.contextmanager
def starting(folder: pathlib.Path) -> typing.Iterator[Failure | None]:
"""Holds the LOCK in folder: project_lock's for a project, or do-epic's for an epic. It yields a Failure, and doesn't hold any lock, where the file cannot be opened or locked."""
"""Holds the LOCK in folder: project_lock's for a project, or build-epic's for an epic. It yields a Failure, and doesn't hold any lock, where the file cannot be opened or locked."""
with locked(folder / LOCK) as failure:
yield failure
@@ -75,5 +75,5 @@ def loop_chunks(root: str, home: pathlib.Path, run: tmux.Tmux) -> list[tmux.List
def epic_chunks(root: str, run: tmux.Tmux) -> list[tmux.Placed]:
"""The windows of do-epic's sessions whose chunks run in the checkout root. A parked chunk doesn't run."""
"""The windows of build-epic's sessions whose chunks run in the checkout root. A parked chunk doesn't run."""
return [placed for placed in tmux.everywhere(run) if placed.session.startswith(f"{tmux.EPIC}-") and placed.root == root and not placed.window.dead and not placed.window.parked]
+1 -1
View File
@@ -1,3 +1,3 @@
"""The entry points that drive chunks, each by its name as its workers, its judge and the human read it. A prompt function that takes a driver takes one of these."""
BUILD_RELEASE = "build-release"
DO_EPIC = "do-epic"
BUILD_EPIC = "build-epic"
+1 -1
View File
@@ -72,7 +72,7 @@ def save_model(project_key: str, chosen: str, paths: Paths, replace: typing.Call
def read_models_file(saved: pathlib.Path) -> dict[str, str] | Failure:
"""Each project's model, as the models file at saved maps them; none where there is no such file. The entry points, build-release and do-epic, and the replay tools read it."""
"""Each project's model, as the models file at saved maps them; none where there is no such file. The entry points, build-release and build-epic, and the replay tools read it."""
try:
with open(saved, encoding="utf-8") as handle:
models = json.load(handle)
+1 -1
View File
@@ -154,5 +154,5 @@ class RecordNames(typing.NamedTuple):
def worker_prompts(driver: str, fresh: typing.Callable[[str, str, Route, ProjectRung | None, str], str], naming: str, names: RecordNames = RecordNames()) -> WorkerPrompts:
"""The prompts of an entry point's cycles: its own fresh prompt, and the resumed prompt and rung sentences every entry point shares, each naming driver. resumed says what naming is. names is build-release's unless the entry point keeps records elsewhere, as do-epic does."""
"""The prompts of an entry point's cycles: its own fresh prompt, and the resumed prompt and rung sentences every entry point shares, each naming driver. resumed says what naming is. names is build-release's unless the entry point keeps records elsewhere, as build-epic does."""
return WorkerPrompts(driver, fresh, functools.partial(resumed, driver, naming), functools.partial(rungs_held, driver), *names)
+1 -1
View File
@@ -10,7 +10,7 @@ from agent_cycle.tmux import Window
@dataclasses.dataclass(frozen=True)
class Loop:
"""What stays the same while an entry point drives one chunk in one process. build-release builds it once per process, so a reload builds it afresh; do-epic builds one per chunk."""
"""What stays the same while an entry point drives one chunk in one process. build-release builds it once per process, so a reload builds it afresh; build-epic builds one per chunk."""
# The checkout the loop runs in. build-release's LoopRun.root names it too, since a reload hands it on there.
root: str
# The worker's session.