Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s

This commit is contained in:
2026-12-03 18:56:28 +01:00
parent 20c83f861f
commit 1ca2c8efe0
142 changed files with 1095 additions and 933 deletions
+7 -5
View File
@@ -6,12 +6,14 @@ Planning runs only in the `do-epic <EPIC-KEY>` the human starts. A chunk that fi
Planning holds no lock: one `do-epic <EPIC-KEY>` at a time is assumed. A second one started meanwhile finds the sub-tasks the first filed, since `split` reads them before it files, unless Jira's search lags."""
import dataclasses
from collections.abc import Mapping
import pathlib
import re
from loop_state.paths import CLAUDE_HOME
from loop_state.paths import CLAUDE_HOME, state_folder
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
@@ -22,7 +24,6 @@ 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 STATE, unblocks
from plan_store.scoring import weighing_texts
# The epic's formula, stated under its `## Scoring` as a todo.md states its own.
@@ -41,6 +42,7 @@ class Planned:
store: EpicStore
record: EpicRecord
home: pathlib.Path
env: Mapping[str, str]
effects: Effects
@@ -92,7 +94,7 @@ 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.home / STATE / epic.key
folder = epic_folder(state_folder(epic.env, epic.home), epic.key)
folder.mkdir(parents=True, exist_ok=True)
checkouts = tuple(str(place.checkout) for place in places.values())
for issue in unplaced:
@@ -151,7 +153,7 @@ def located(epic: Planned, picks: list[repo_pick.Repo]) -> dict[str, repos.Locat
"""Each picked repo's checkout and project config, by the repo's name."""
places: dict[str, repos.Located] = {}
for name in sorted({pick.name for pick in picks}):
place = repos.locate(name, [each.checkout for each in places.values()], epic.config, epic.home, epic.effects.git)
place = repos.locate(name, [each.checkout for each in places.values()], epic.config, epic.home, epic.env, epic.effects.git)
if isinstance(place, Failure):
return place
places[name] = place
@@ -210,7 +212,7 @@ 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.home / STATE / epic.key
folder = epic_folder(state_folder(epic.env, epic.home), epic.key)
folder.mkdir(parents=True, exist_ok=True)
for issue in bare:
say(f"scoring {issue.key}", epic.effects, stdout=True)