Answer stability round 1: 1 🔴, 6 🟡 (2 misread); read the scoring rule from the clone, hand windows XDG_DATA_HOME, retry the home check where nobody watches, tell an unreadable sign-in status and settings file apart, and bound the claude commands that build the home
CI / tests (pull_request) Successful in 4m35s
CI / tests (pull_request) Successful in 4m35s
This commit is contained in:
@@ -14,7 +14,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from build_epic.config import BuildEpicConfig
|
||||
from build_epic.parking import CHUNK_PR
|
||||
from build_epic import chunk_prompt, epic_run, main, planning
|
||||
from build_epic import chunk_prompt, epic_run, main
|
||||
from chunk_driver.chunk_run import ChunkRun
|
||||
from project_config.doubles import configured
|
||||
from project_config.settings import Epic, Finish
|
||||
@@ -162,7 +162,7 @@ class TheCommand(BuildEpicTest):
|
||||
self.assertIn("started ABC-21 in the tmux session epic-ABC-12\n", out)
|
||||
self.assertIn("ABC-20 waits: it is a human's task\n", out)
|
||||
started = [args for args in fake.tmux_calls if args[0] == "new-session"]
|
||||
self.assertEqual(started, [["new-session", "-d", "-s", "epic-ABC-12", "-n", "ABC-21", "-c", str(self.home / ".local/state/build-release/build-epic/ABC-12"), "-e", "BUILD_RELEASE_WORKER_MODEL=m", "-e", "XDG_CONFIG_HOME=", "-e", "XDG_STATE_HOME=", "-e", "CHUNK_PR_PARKS=1", "-P", "-F", "#{window_id}", "--", "/b/build-epic", "--chunk", "ABC-21", "ABC-12"]])
|
||||
self.assertEqual(started, [["new-session", "-d", "-s", "epic-ABC-12", "-n", "ABC-21", "-c", str(self.home / ".local/state/build-release/build-epic/ABC-12"), "-e", "BUILD_RELEASE_WORKER_MODEL=m", "-e", "XDG_CONFIG_HOME=", "-e", "XDG_STATE_HOME=", "-e", "XDG_DATA_HOME=", "-e", "CHUNK_PR_PARKS=1", "-P", "-F", "#{window_id}", "--", "/b/build-epic", "--chunk", "ABC-21", "ABC-12"]])
|
||||
# The session is no checkout's, so nothing marks it as one's.
|
||||
self.assertNotIn(tmux.OWNER, [args[3] for args in fake.tmux_calls if args[0] == "set-option"])
|
||||
|
||||
@@ -203,6 +203,15 @@ class TheCommand(BuildEpicTest):
|
||||
self.assertIn("--chunk is how build-epic starts itself in a tmux window; run build-epic <EPIC-KEY>\n", err)
|
||||
self.assertEqual(fake.dms, ["build-epic --chunk ABC-21 ABC-12 stopped: --chunk is how build-epic starts itself in a tmux window; run build-epic <EPIC-KEY>"])
|
||||
|
||||
def test_a_chunk_retries_a_failed_check_of_the_loops_claude_home_as_a_failed_worker_run_is(self) -> None:
|
||||
fake = FakeEffects()
|
||||
fake.home_unready = "could not build it"
|
||||
code, _, err = self.run_main(["--chunk", "ABC-21", "ABC-12"], fake, {"TMUX_PANE": "%1"})
|
||||
self.assertEqual(code, 1)
|
||||
self.assertEqual(err.count("retrying the check of the loop's Claude home in a minute: could not build it\n"), 2)
|
||||
self.assertEqual(fake.dms, ["build-epic --chunk ABC-21 ABC-12 stopped: the check of the loop's Claude home failed three times running: could not build it"])
|
||||
self.assertEqual(fake.calls, [("sleep", 60), ("sleep", 60)])
|
||||
|
||||
def test_a_chunk_of_an_issue_the_epic_lacks_stops(self) -> None:
|
||||
code, _, err = self.run_main(["--chunk", "ABC-99", "ABC-12"], FakeEffects(), {"TMUX_PANE": "%1"})
|
||||
self.assertEqual(code, 1)
|
||||
@@ -1477,8 +1486,6 @@ class TheDryRun(BuildEpicTest):
|
||||
self.assertEqual([what for seam, what in fake.calls if seam == "git" and "clone" in what], [])
|
||||
|
||||
def test_prints_the_scores_it_would_write_and_the_order_the_issues_would_start_in(self) -> None:
|
||||
(self.home / planning.RULE).parent.mkdir(parents=True, exist_ok=True)
|
||||
(self.home / planning.RULE).write_text("L is how much the item changes.\n", encoding="utf-8")
|
||||
self.description = DESCRIPTION.replace("Ship the import.", "1. **Achieve:** Ship the import.") + "\n## Scoring\n`Score = V`\n"
|
||||
self.issues = [issue("ABC-20", "build-epic-claude"), issue("ABC-21", "build-epic-claude")]
|
||||
answer = {"L": 2, "E": 1, "I": 2, "S": 3, "comment": "Scored to decide what starts first."}
|
||||
|
||||
Reference in New Issue
Block a user