Answer architecture round 1: 0 🔴, 4 🟡 (0 misread); chunks_to_start and the epic's folder take the resolved paths; branch_summaries and reviewer_breaches wait for item 300
CI / tests (pull_request) Successful in 5m19s
CI / tests (pull_request) Successful in 5m19s
This commit is contained in:
@@ -36,6 +36,10 @@ class EpicRun:
|
||||
def session(self) -> str:
|
||||
return tmux.session_name(tmux.EPIC, self.key)
|
||||
|
||||
@property
|
||||
def folder(self) -> pathlib.Path:
|
||||
return scheduler.epic_folder(self.paths.state_folder, self.key)
|
||||
|
||||
|
||||
def chunks_started(epic: EpicRun, issues: list[EpicIssue], own: str | None, told: str = "") -> scheduler.Started | Failure:
|
||||
"""scheduler.start_chunks on the epic's issues, as read, in order of score, and its cap, read afresh; own is the issue of the chunk that asks, and told is the reason the planning just gave for stopping, which isn't said twice. Where no issue is open, the chunk to start is the epic's finishing, unless the epic is closed."""
|
||||
@@ -57,7 +61,7 @@ def chunks_started(epic: EpicRun, issues: list[EpicIssue], own: str | None, told
|
||||
|
||||
def planned_epic(epic: EpicRun) -> planning.Planned:
|
||||
"""The epic as planning reads and writes it."""
|
||||
return planning.Planned(epic.key, epic.config, epic.store, epic.record, epic.paths.home, epic.env, epic.effects)
|
||||
return planning.Planned(epic.key, epic.config, epic.store, epic.record, epic.paths.home, epic.env, epic.folder, epic.effects)
|
||||
|
||||
|
||||
def scheduled_epic(epic: EpicRun, order: tuple[str, ...]) -> scheduler.Epic | Failure:
|
||||
@@ -75,7 +79,7 @@ def scheduled_epic(epic: EpicRun, order: tuple[str, ...]) -> scheduler.Epic | Fa
|
||||
seen.append(found.checkout)
|
||||
return real(found.checkout), found.config.parallel_chunks
|
||||
|
||||
return scheduler.Epic(epic.key, cap, located, epic.paths.home, epic.launcher, epic.env, epic.config.label_repos, order, epic.config.unblocking)
|
||||
return scheduler.Epic(epic.key, cap, located, epic.paths, epic.launcher, epic.env, epic.config.label_repos, order, epic.config.unblocking)
|
||||
|
||||
|
||||
def real(checkout: pathlib.Path) -> pathlib.Path:
|
||||
|
||||
+2
-2
@@ -144,7 +144,7 @@ def status_printed(epic: EpicRun) -> Stop:
|
||||
reading = dataclasses.replace(epic, effects=dataclasses.replace(epic.effects, git=dry_run.without_clones(epic.effects.git)))
|
||||
order = issues if isinstance(issues, Failure) else planning.start_order(planned_epic(reading), issues)
|
||||
# Where the issues cannot be put in order of score, they start in the backlog's order, as a run says.
|
||||
lines = issues if isinstance(issues, Failure) else status.lines(epic.key, epic.paths.state_folder, issues, epic.config.label_repos, epic.config.unblocking, epic.effects.tmux, () if isinstance(order, Failure) else tuple(order))
|
||||
lines = issues if isinstance(issues, Failure) else status.lines(epic.key, epic.folder, issues, epic.config.label_repos, epic.config.unblocking, epic.effects.tmux, () if isinstance(order, Failure) else tuple(order))
|
||||
return Stop(1, lines.reason) if isinstance(lines, Failure) else Stop(0, "\n".join(lines) or f"the epic {epic.key} has no open issue")
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ def chunk_root(key: str, issue: EpicIssue | None, epic: EpicRun) -> tuple[str, s
|
||||
if isinstance(pick, Failure):
|
||||
return Stop(1, pick.reason)
|
||||
if isinstance(pick, ClaudeWork):
|
||||
return str(scheduler.epic_folder(epic.paths.state_folder, epic.key)), None
|
||||
return str(epic.folder), None
|
||||
if not isinstance(pick, Repo):
|
||||
return Stop(1, f"{key} is no chunk: no label names its repo")
|
||||
found = locate(pick.name, [], epic.config, epic.paths.home, epic.env, epic.effects.git)
|
||||
|
||||
@@ -30,15 +30,15 @@ def parked_through(repo: str, loop: Loop, epic: EpicRun, told: str | None, finis
|
||||
|
||||
A chunk parks in three steps: its file is written, its window is shown as parked, and the epic's next chunks start in the slot it frees. It resumes in the reverse order: `scheduler.resume` gives it a running slot, then its file is removed. So a window that ends in between finds the chunk parked when it starts again.
|
||||
"""
|
||||
key, folder = loop.window.name, scheduler.epic_folder(epic.paths.state_folder, epic.key)
|
||||
recorded_as = parked.parked_chunks(folder)
|
||||
key = loop.window.name
|
||||
recorded_as = parked.parked_chunks(epic.folder)
|
||||
if isinstance(recorded_as, Failure):
|
||||
return Stop(1, recorded_as.reason)
|
||||
config = config_located(loop.root, epic.paths.home, epic.env)
|
||||
if isinstance(config, Failure):
|
||||
return Stop(1, config.reason)
|
||||
# A pull request into an epic's working branch merges without a person, whatever `merge` says. The base recorded says so, not the config: the gate fails where the forge merges the pull request elsewhere.
|
||||
poll = Poll(key, repo, config.merge == "human" and based is None, folder, loop, epic)
|
||||
poll = Poll(key, repo, config.merge == "human" and based is None, epic.folder, loop, epic)
|
||||
if key in recorded_as:
|
||||
return resumed_news(poll, recorded_as[key].on, shown=None)
|
||||
entered = None if told is None else poll.first_gate(again=finished)
|
||||
|
||||
@@ -10,10 +10,9 @@ from collections.abc import Mapping
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
from loop_state.paths import CLAUDE_HOME, state_folder
|
||||
from loop_state.paths import CLAUDE_HOME
|
||||
from do_epic.config import DoEpicConfig
|
||||
from loop_effects.effects import Effects, say
|
||||
from do_epic.scheduler import epic_folder, unblocks
|
||||
from do_epic.backend.protocol import EpicIssue, EpicStore, no_scores
|
||||
from do_epic.epic_record import EpicRecord
|
||||
from failure import Failure
|
||||
@@ -24,6 +23,7 @@ from claude_code.reply import Limited
|
||||
from plan_store.jira_epic import number
|
||||
from model_routing.ladder_file import read_ladder, SHIPPED
|
||||
from model_routing.ladder import Rung
|
||||
from do_epic.scheduler import unblocks
|
||||
from plan_store.scoring import weighing_texts
|
||||
|
||||
# The epic's formula, stated under its `## Scoring` as a todo.md states its own.
|
||||
@@ -43,6 +43,8 @@ class Planned:
|
||||
record: EpicRecord
|
||||
home: pathlib.Path
|
||||
env: Mapping[str, str]
|
||||
# The epic's folder, where claude plans and scores its issues.
|
||||
folder: pathlib.Path
|
||||
effects: Effects
|
||||
|
||||
|
||||
@@ -94,17 +96,16 @@ def placed(epic: Planned, issues: list[EpicIssue], unplaced: list[EpicIssue], ad
|
||||
if failed := next((each for each in (rung, language, places) if isinstance(each, Failure)), None):
|
||||
return failed
|
||||
assert isinstance(rung, Rung) and not isinstance(language, Failure) and isinstance(places, dict)
|
||||
folder = epic_folder(state_folder(epic.env, epic.home), epic.key)
|
||||
folder.mkdir(parents=True, exist_ok=True)
|
||||
epic.folder.mkdir(parents=True, exist_ok=True)
|
||||
checkouts = tuple(str(place.checkout) for place in places.values())
|
||||
for issue in unplaced:
|
||||
say(f"planning {issue.key}", epic.effects, stdout=True)
|
||||
parts = split.split(epic.store, issue, epic.config.label_repos, not issue.by_loop, epic.config.repo_rule, language or epic.config.language, checkouts, rung, epic.effects.claude, str(folder), epic.config.sub_task_summary)
|
||||
parts = split.split(epic.store, issue, epic.config.label_repos, not issue.by_loop, epic.config.repo_rule, language or epic.config.language, checkouts, rung, epic.effects.claude, str(epic.folder), epic.config.sub_task_summary)
|
||||
if isinstance(parts, split.Split) and parts.repos:
|
||||
added[issue.key] = split.SPLIT_LABEL
|
||||
say(f"{issue.key} is split into a sub-task for each of {', '.join(parts.repos)}", epic.effects, stdout=True)
|
||||
continue
|
||||
pick: repo_pick.Pick | repo_pick.Unclear | Failure | Limited | None = parts if not isinstance(parts, split.Split) else repo_pick.picked(epic.store, issue, epic.config.label_repos, epic.config.repo_rule, rung, epic.effects.claude, str(folder))
|
||||
pick: repo_pick.Pick | repo_pick.Unclear | Failure | Limited | None = parts if not isinstance(parts, split.Split) else repo_pick.picked(epic.store, issue, epic.config.label_repos, epic.config.repo_rule, rung, epic.effects.claude, str(epic.folder))
|
||||
if isinstance(pick, repo_pick.Unclear):
|
||||
pick = answered(epic, issue, pick.question)
|
||||
if isinstance(pick, Limited):
|
||||
@@ -212,13 +213,12 @@ def scored(epic: Planned, issues: list[EpicIssue]) -> tuple[list[EpicIssue], Fai
|
||||
if failed := next((each for each in (rung, language, rule, weighed) if isinstance(each, Failure)), None):
|
||||
return issues, failed
|
||||
assert isinstance(rung, Rung) and not isinstance(language, Failure) and isinstance(rule, str) and isinstance(weighed, Weighing)
|
||||
folder = epic_folder(state_folder(epic.env, epic.home), epic.key)
|
||||
folder.mkdir(parents=True, exist_ok=True)
|
||||
epic.folder.mkdir(parents=True, exist_ok=True)
|
||||
for issue in bare:
|
||||
say(f"scoring {issue.key}", epic.effects, stdout=True)
|
||||
repo = repo_of(epic, issue)
|
||||
goals = ranking.goals_named(weighed.goals, repo, weighed.repos.get(repo) if repo else None)
|
||||
answer = goals if isinstance(goals, Failure) else issue_scores.asked(issue, rule, goals, language or epic.config.language, rung, epic.effects.claude, str(folder))
|
||||
answer = goals if isinstance(goals, Failure) else issue_scores.asked(issue, rule, goals, language or epic.config.language, rung, epic.effects.claude, str(epic.folder))
|
||||
if isinstance(answer, Limited):
|
||||
return issues, answer
|
||||
held = answer if isinstance(answer, Failure) else scores_set(epic, issue, answer, weighed)
|
||||
|
||||
@@ -15,18 +15,18 @@ from text_files.markdown_text import listed
|
||||
from project_config.settings import PARALLEL_CHUNKS
|
||||
from do_epic.parked import parked_chunks
|
||||
from chunk_pr.approval import PARKS
|
||||
from loop_state.paths import state_folder
|
||||
from loop_state.paths import Paths
|
||||
from agent_cycle import tmux
|
||||
|
||||
# The folder in the state folder where a folder per epic key holds the epic's lock file, which `claims.LOCK` names. A chunk without a repo works there.
|
||||
STATE = "do-epic"
|
||||
# Why a human's task with a live window waits, as the epic's status says.
|
||||
HUMAN_WAIT = "it is a human's task; do-epic polls Jira until you close it"
|
||||
|
||||
|
||||
def epic_folder(state: pathlib.Path, key: str) -> pathlib.Path:
|
||||
"""The folder of the epic called key, in the state folder state."""
|
||||
return state / STATE / key
|
||||
# Why a human's task with a live window waits, as the epic's status says.
|
||||
HUMAN_WAIT = "it is a human's task; do-epic polls Jira until you close it"
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
@@ -74,7 +74,7 @@ class Epic:
|
||||
cap: int
|
||||
# The checkout of the repo with this name and its `parallel-chunks`, or why the repo cannot be used.
|
||||
locate: typing.Callable[[str], tuple[pathlib.Path, int] | Failure]
|
||||
home: pathlib.Path
|
||||
paths: Paths
|
||||
# The do-epic script each window runs.
|
||||
launcher: pathlib.Path
|
||||
env: typing.Mapping[str, str]
|
||||
@@ -87,7 +87,7 @@ class Epic:
|
||||
|
||||
@property
|
||||
def folder(self) -> pathlib.Path:
|
||||
return epic_folder(state_folder(self.env, self.home), self.key)
|
||||
return epic_folder(self.paths.state_folder, self.key)
|
||||
|
||||
|
||||
def unblocks(status: str, unblocking: tuple[str, ...]) -> bool:
|
||||
@@ -233,10 +233,10 @@ def start_chunk(epic: Epic, chunk: Chunk, own: str | None, windows: list[tmux.Li
|
||||
if isinstance(located, Failure):
|
||||
return Waits(chunk.issue, located.reason)
|
||||
checkout, limit = located
|
||||
with starting(project_lock(str(checkout), epic.home, epic.env)) as unlocked:
|
||||
with starting(project_lock(str(checkout), epic.paths)) as unlocked:
|
||||
if unlocked:
|
||||
return unlocked
|
||||
if reason := refusal(chunk.repo, room_in(str(checkout), limit, (session, own), epic.home, run)):
|
||||
if reason := refusal(chunk.repo, room_in(str(checkout), limit, (session, own), epic.paths.home, run)):
|
||||
return Waits(chunk.issue, reason)
|
||||
return tmux.start_chunk(tmux.Window(session, chunk.issue, ""), str(checkout), handed, command, windows, False, run)
|
||||
|
||||
@@ -259,10 +259,10 @@ def resume(epic: Epic, repo: str, window: tmux.Window, run: tmux.Tmux) -> str |
|
||||
if isinstance(located, Failure):
|
||||
return located.reason
|
||||
checkout, limit = located
|
||||
with starting(project_lock(str(checkout), epic.home, epic.env)) as unlocked:
|
||||
with starting(project_lock(str(checkout), epic.paths)) as unlocked:
|
||||
if unlocked:
|
||||
return unlocked.reason
|
||||
if reason := refusal(repo, room_in(str(checkout), limit, (window.session, window.name), epic.home, run)):
|
||||
if reason := refusal(repo, room_in(str(checkout), limit, (window.session, window.name), epic.paths.home, run)):
|
||||
return reason
|
||||
tmux.unpark(window, str(checkout), run)
|
||||
return None
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import datetime
|
||||
import pathlib
|
||||
|
||||
from do_epic.scheduler import chunks, epic_folder, HUMAN_WAIT
|
||||
from do_epic.scheduler import chunks, HUMAN_WAIT
|
||||
from do_epic.backend.protocol import EpicIssue
|
||||
from failure import Failure
|
||||
from do_epic.parked import file_of, Parked, parked_chunks, SLOT
|
||||
@@ -20,10 +20,9 @@ def since(folder: pathlib.Path, chunk: Parked) -> str:
|
||||
return ""
|
||||
|
||||
|
||||
def lines(key: str, state: pathlib.Path, issues: list[EpicIssue], team: LabelRepos, unblocking: tuple[str, ...], run: tmux.Tmux, order: tuple[str, ...]) -> list[str] | Failure:
|
||||
def lines(key: str, folder: pathlib.Path, issues: list[EpicIssue], team: LabelRepos, unblocking: tuple[str, ...], run: tmux.Tmux, order: tuple[str, ...]) -> list[str] | Failure:
|
||||
"""A line per open issue of the epic called key, in the tracker's rank order: that its chunk runs or asks the human, or why it waits. order holds the keys of the issues that start by score, as planning.start_order puts them; a chunk it leaves out says that it starts after them. It doesn't start anything or check any limit, so the line of a chunk that has yet to start doesn't say which limit holds it back."""
|
||||
found, waits = chunks(issues, team, unblocking)
|
||||
folder = epic_folder(state, key)
|
||||
parked = parked_chunks(folder)
|
||||
if isinstance(parked, Failure):
|
||||
return parked
|
||||
|
||||
@@ -36,12 +36,16 @@ def scored(key: str, moves: str, *labels: str, blockers: tuple[str, ...] = (), b
|
||||
|
||||
|
||||
class Planning(DoEpicTest):
|
||||
def setUp(self) -> None:
|
||||
super().setUp()
|
||||
self.folder = self.home / ".local/state/build-release/do-epic/ABC-12"
|
||||
|
||||
def plan(self, fake: FakeEffects) -> tuple[list[EpicIssue] | Failure | Limited, MemoryEpic, str]:
|
||||
"""What planning answers for self.issues, the store it changed and what it printed on stdout. self.asked holds what it asked the human, on stderr."""
|
||||
config = load(self.home, {})
|
||||
assert not isinstance(config, Failure), config
|
||||
store = MemoryEpic("ABC-12", list(self.issues))
|
||||
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, fake.effects()) # type: ignore[arg-type]
|
||||
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, self.folder, fake.effects()) # type: ignore[arg-type]
|
||||
out, self.asked = io.StringIO(), io.StringIO()
|
||||
with contextlib.redirect_stdout(out), contextlib.redirect_stderr(self.asked):
|
||||
read = store.read()
|
||||
@@ -152,11 +156,10 @@ class Planning(DoEpicTest):
|
||||
folders.append(cwd)
|
||||
return effects.claude(args, cwd, stdin) # type: ignore[arg-type]
|
||||
config = load(self.home, {})
|
||||
epic = planning.Planned("ABC-12", config, MemoryEpic("ABC-12", list(self.issues)), EpicRecord(Description("")), self.home, {}, dataclasses.replace(effects, claude=claude)) # type: ignore[arg-type]
|
||||
epic = planning.Planned("ABC-12", config, MemoryEpic("ABC-12", list(self.issues)), EpicRecord(Description("")), self.home, {}, self.folder, dataclasses.replace(effects, claude=claude)) # type: ignore[arg-type]
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
planning.planned(epic, list(self.issues))
|
||||
folder = self.home / ".local" / "state" / "build-release" / "do-epic" / "ABC-12"
|
||||
self.assertEqual((folders, folder.is_dir()), ([str(folder)] * 2, True))
|
||||
self.assertEqual((folders, self.folder.is_dir()), ([str(self.folder)] * 2, True))
|
||||
|
||||
def test_a_model_off_the_routing_ladder_has_no_rung(self) -> None:
|
||||
found = planning.planning_rung("claude-nope-1")
|
||||
@@ -379,7 +382,7 @@ class Planning(DoEpicTest):
|
||||
self.description = RANKED
|
||||
self.issues = [scored("ABC-20", "epic 1 by 2", "do-epic-claude", by_loop=False), issue("ABC-21", "do-epic-claude")]
|
||||
# An earlier run made the folder the scoring runs in.
|
||||
(self.home / ".local/state/build-release/do-epic/ABC-12").mkdir(parents=True, exist_ok=True)
|
||||
self.folder.mkdir(parents=True, exist_ok=True)
|
||||
fake = FakeEffects(claude=[says(ANSWER)])
|
||||
found, store, out = self.plan(fake)
|
||||
assert not isinstance(found, Failure | Limited), found
|
||||
@@ -447,10 +450,10 @@ class Planning(DoEpicTest):
|
||||
folders.append(cwd)
|
||||
return effects.claude(args, cwd, stdin) # type: ignore[arg-type]
|
||||
config = load(self.home, {})
|
||||
epic = planning.Planned("ABC-12", config, MemoryEpic("ABC-12", list(self.issues)), EpicRecord(Description(RANKED)), self.home, {}, dataclasses.replace(effects, claude=claude)) # type: ignore[arg-type]
|
||||
epic = planning.Planned("ABC-12", config, MemoryEpic("ABC-12", list(self.issues)), EpicRecord(Description(RANKED)), self.home, {}, self.folder, dataclasses.replace(effects, claude=claude)) # type: ignore[arg-type]
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
planning.planned(epic, list(self.issues))
|
||||
self.assertEqual(folders, [str(self.home / ".local" / "state" / "build-release" / "do-epic" / "ABC-12")] * 2)
|
||||
self.assertEqual(folders, [str(self.folder)] * 2)
|
||||
|
||||
self.rule()
|
||||
self.description = RANKED
|
||||
@@ -469,7 +472,7 @@ class Planning(DoEpicTest):
|
||||
out = io.StringIO()
|
||||
config = load(self.home, {})
|
||||
assert not isinstance(config, Failure), config
|
||||
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, FakeEffects(claude=[says(ANSWER)]).effects()) # type: ignore[arg-type]
|
||||
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, self.folder, FakeEffects(claude=[says(ANSWER)]).effects()) # type: ignore[arg-type]
|
||||
with contextlib.redirect_stdout(out):
|
||||
found, stopped = planning.scored(epic, list(self.issues))
|
||||
self.assertEqual((found, stopped, out.getvalue()), (self.issues, None, "<1790000000> scoring ABC-20\n<1790000000> ABC-20 is not scored: Jira answered 503\n"))
|
||||
@@ -520,7 +523,7 @@ class Planning(DoEpicTest):
|
||||
"""What planning answers for self.issues on a store that doesn't read as MemoryEpic does."""
|
||||
config = load(self.home, {})
|
||||
assert not isinstance(config, Failure), config
|
||||
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, fake.effects()) # type: ignore[arg-type]
|
||||
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, self.folder, fake.effects()) # type: ignore[arg-type]
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
return planning.planned(epic, list(self.issues))
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ from do_epic.backend.protocol import EpicIssue
|
||||
from failure import Failure
|
||||
from do_epic.parked import file_of, park, Parked
|
||||
from do_epic.epic_record import parallel_chunks_in
|
||||
from loop_state.paths import paths_from
|
||||
from chunk_driver import prompts
|
||||
from model_routing.route import Route
|
||||
from model_routing.ladder import Rung
|
||||
@@ -210,7 +211,7 @@ class StartingAnEpicsChunks(unittest.TestCase):
|
||||
"""An epic whose repos are checked out under the home folder, each with its `parallel-chunks`."""
|
||||
def locate(name: str) -> tuple[pathlib.Path, int] | Failure:
|
||||
return (self.home / "code" / name, limits[name]) if name in limits else Failure(f"no project config names {name}")
|
||||
return Epic("ABC-12", cap, locate, self.home, pathlib.Path("/bin/do-epic"), {"BUILD_RELEASE_X": "1", "OTHER": "2"}, {}, self.order)
|
||||
return Epic("ABC-12", cap, locate, paths_from(self.home, {}), pathlib.Path("/bin/do-epic"), {"BUILD_RELEASE_X": "1", "OTHER": "2"}, {}, self.order)
|
||||
|
||||
def start(self, epic: Epic, issues: list[EpicIssue], run: Tmux, own: str | None = None) -> Started:
|
||||
found = start_chunks(epic, issues, False, own, run)
|
||||
|
||||
@@ -7,7 +7,6 @@ import unittest
|
||||
from failure import Failure
|
||||
from do_epic.test_scheduler import issue, Tmux
|
||||
from do_epic import parked, status
|
||||
from do_epic.scheduler import STATE
|
||||
|
||||
SINCE = 1_700_000_000
|
||||
# SINCE as the status prints it.
|
||||
@@ -17,15 +16,14 @@ EPIC = "epic-ABC-12"
|
||||
|
||||
class TheStatusLines(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
self.home = pathlib.Path(tempfile.mkdtemp())
|
||||
self.folder = self.home / STATE / "ABC-12"
|
||||
self.folder = pathlib.Path(tempfile.mkdtemp())
|
||||
|
||||
def park(self, key: str, on: str) -> None:
|
||||
parked.park(self.folder, parked.Parked(key, f"/code/api-{key}", "7", "s", on))
|
||||
os.utime(parked.file_of(self.folder, key), (SINCE, SINCE))
|
||||
|
||||
def lines(self, issues: list, *windows: tuple[str, str, bool, str], unblocking: tuple[str, ...] = ()) -> list[str] | Failure:
|
||||
return status.lines("ABC-12", self.home, issues, {}, unblocking, Tmux(*windows), ())
|
||||
return status.lines("ABC-12", self.folder, issues, {}, unblocking, Tmux(*windows), ())
|
||||
|
||||
def test_a_chunk_that_asks_says_where_to_answer_and_one_that_works_runs(self) -> None:
|
||||
found = self.lines([issue("ABC-20", "repo:api"), issue("ABC-21", "repo:api")], (EPIC, "ABC-20 ?", False, ""), (EPIC, "ABC-21", False, ""))
|
||||
@@ -54,7 +52,7 @@ class TheStatusLines(unittest.TestCase):
|
||||
def test_an_issue_without_scores_says_that_it_starts_after_each_that_holds_them(self) -> None:
|
||||
held = dataclasses.replace(issue("ABC-21", "repo:api"), scores={"L": 1, "E": 1, "I": 1, "S": 1})
|
||||
room = "it has not started; `do-epic ABC-12` starts it once the epic and its repo have room"
|
||||
found = status.lines("ABC-12", self.home, [issue("ABC-20", "repo:api"), held], {}, (), Tmux(), ("ABC-21",))
|
||||
found = status.lines("ABC-12", self.folder, [issue("ABC-20", "repo:api"), held], {}, (), Tmux(), ("ABC-21",))
|
||||
self.assertEqual(found, [f"ABC-20 waits: {room}, after each issue that holds every score, since it doesn't", f"ABC-21 waits: {room}"])
|
||||
# Where no issue starts by score, each starts in the tracker's rank order.
|
||||
self.assertEqual(self.lines([issue("ABC-20", "repo:api"), held]), [f"ABC-20 waits: {room}", f"ABC-21 waits: {room}"])
|
||||
|
||||
Reference in New Issue
Block a user