Run every claude the loop starts in a Claude home generated outside the clone
CI / tests (pull_request) Successful in 4m45s
CI / tests (pull_request) Successful in 4m45s
This commit is contained in:
@@ -24,6 +24,7 @@ from transcript_archive.read import latest_worker
|
||||
from chunk_driver.this_loop import Loop
|
||||
from transcript_archive.project_key import project_key
|
||||
from model_routing.ladder_file import project_ladder_file, read_ladder
|
||||
from loop_state.paths import RELEASE_ROOT
|
||||
from model_routing.route import Route, route_from
|
||||
from loop_effects.effects import say
|
||||
from agent_cycle.stop import Stop
|
||||
@@ -95,13 +96,13 @@ def archived_route(archive_folder: pathlib.Path, loop: Loop) -> Route | None:
|
||||
|
||||
def cycle_of(loop: Loop, routing: Routing, route: Route, archive_folder: pathlib.Path, *, task: str, facts: str, premises: str, records: str, unfinished_evidence: str, prompts: WorkerPrompts, taken_in: typing.Callable[[list[Entry]], TakenIn]) -> Cycle:
|
||||
"""The cycle that runs in the loop's window on route. The keyword arguments are what the entry point alone knows; Cycle says what each is."""
|
||||
return Cycle(config=setup_version(loop.paths.claude_dir, loop.effects.git), effects=loop.effects, facts=facts, judge=judge_rung(routing.ladder, routing.models.judge), premises=premises, project=routing.project, project_archive=archive_folder, records=records, root=loop.root, route=route, session=loop.session, task=task, prompts=prompts, taken_in=taken_in, unfinished_evidence=unfinished_evidence, window=loop.window)
|
||||
return Cycle(config=setup_version(RELEASE_ROOT, loop.effects.git), effects=loop.effects, facts=facts, judge=judge_rung(routing.ladder, routing.models.judge), premises=premises, project=routing.project, project_archive=archive_folder, records=records, root=loop.root, route=route, session=loop.session, task=task, prompts=prompts, taken_in=taken_in, unfinished_evidence=unfinished_evidence, window=loop.window)
|
||||
|
||||
|
||||
def setup_version(claude_dir: pathlib.Path, git: Git) -> str:
|
||||
"""The release and commit of this setup that the worker's claude reads, as `v0.8.0 (<sha>)`; a commit past the latest release reads as git describe gives it, such as `v0.8.0-3-g1a2b3c4 (<sha>)`. Where git can't tell, `unknown` and why."""
|
||||
described = git("describe", "--tags", "--match", "v*", "--always", cwd=str(claude_dir))
|
||||
commit = git("rev-parse", "HEAD", cwd=str(claude_dir))
|
||||
def setup_version(clone: pathlib.Path, git: Git) -> str:
|
||||
"""The release and commit of clone, the setup the worker's claude reads through its home's links, as `v0.8.0 (<sha>)`; a commit past the latest release reads as git describe gives it, such as `v0.8.0-3-g1a2b3c4 (<sha>)`. Where git can't tell, `unknown` and why."""
|
||||
described = git("describe", "--tags", "--match", "v*", "--always", cwd=str(clone))
|
||||
commit = git("rev-parse", "HEAD", cwd=str(clone))
|
||||
if isinstance(described, Failure):
|
||||
return unknown_version(described)
|
||||
if isinstance(commit, Failure):
|
||||
|
||||
Reference in New Issue
Block a user