Name each file of the setup as the setup's, and a config's as setup:<path>
CI / tests (pull_request) Successful in 4m42s
CI / tests (pull_request) Successful in 4m42s
This commit is contained in:
@@ -13,11 +13,12 @@ from git_cli.git_repo import Git, top
|
||||
from git_cli import git_repo
|
||||
from task_bench.bench_folder import held
|
||||
from review_rules.review_folder import made_review_folder
|
||||
from loop_state.paths import paths_from, with_release_tools
|
||||
from loop_state.paths import paths_from
|
||||
from transcript_archive.project_key import project_key
|
||||
from model_routing.ladder_file import project_ladder
|
||||
from chunk_driver.project.model_choice import read_models_file
|
||||
from model_routing.ladder import Rung
|
||||
from loop_effects.effects import system_effects
|
||||
|
||||
DIGEST = "digest.md"
|
||||
PROMPT = pathlib.Path(__file__).with_name("gather-prompt.md")
|
||||
@@ -58,7 +59,17 @@ def gather(env: typing.Mapping[str, str], home: pathlib.Path, claude: Claude) ->
|
||||
|
||||
|
||||
def run_claude(args: list[str], cwd: str, prompt: str) -> subprocess.CompletedProcess[str]:
|
||||
return subprocess.run(["claude", *args], capture_output=True, cwd=cwd, env=with_release_tools(os.environ), input=prompt, text=True)
|
||||
"""Runs the gathering claude as the loop runs each of its own: in the loop's Claude home, built or refreshed first, with the release's tools first on its `PATH`."""
|
||||
effects = system_effects(pathlib.Path.home(), os.environ)
|
||||
return once_ready(effects.claude_home, effects.claude)(args, cwd, prompt)
|
||||
|
||||
|
||||
def once_ready(unready: typing.Callable[[], str | None], claude: Claude) -> Claude:
|
||||
"""claude, started only where unready gives no reason why it cannot run yet; else a failed run that says the reason."""
|
||||
def run(args: list[str], cwd: str, prompt: str) -> subprocess.CompletedProcess[str]:
|
||||
reason = unready()
|
||||
return subprocess.CompletedProcess(args, 1, "", reason) if reason else claude(args, cwd, prompt)
|
||||
return run
|
||||
|
||||
|
||||
def project_rung(home: pathlib.Path, env: typing.Mapping[str, str], git: Git) -> Rung | Failure:
|
||||
|
||||
Reference in New Issue
Block a user