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
CI / tests (pull_request) Successful in 6m34s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Every state.CYCLES_PER_CHECK cycles across all projects, measure the archive's routing figures, keep them at its root, and interrupt the human with each call for a routing change not raised before: docs/decisions.md → `routing: build-release measures review rounds…`."""
|
||||
from collections.abc import Mapping
|
||||
import pathlib
|
||||
|
||||
from routing_figures import archive
|
||||
@@ -20,14 +21,14 @@ from text_files.utc_stamp import utc
|
||||
def check_routing(root: pathlib.Path, rung: Rung, loop: Loop) -> Stop | None:
|
||||
"""Stops only when claude cannot start for the calls; a figure it cannot measure or keep is said on stderr, and the loop goes on. root is the archive's, and rung is the rung of the claude that puts the calls to the human."""
|
||||
with archive.locked(root) as held:
|
||||
new = new_calls(root, loop.paths, loop.effects) if held else []
|
||||
new = new_calls(root, loop.paths, loop.env, loop.effects) if held else []
|
||||
if isinstance(new, Failure):
|
||||
say(f"routing figures: {new.reason}", loop.effects)
|
||||
return None
|
||||
return raise_calls(root, new, rung, loop) if new else None
|
||||
|
||||
|
||||
def new_calls(root: pathlib.Path, paths: Paths, effects: Effects) -> list[Call] | Failure:
|
||||
def new_calls(root: pathlib.Path, paths: Paths, env: Mapping[str, str], effects: Effects) -> list[Call] | Failure:
|
||||
"""Once due, measures and keeps the figures, and returns their calls not raised since the latest reset; none while not due."""
|
||||
cycle = archive.cycles(root)
|
||||
if isinstance(cycle, Failure):
|
||||
@@ -39,7 +40,7 @@ def new_calls(root: pathlib.Path, paths: Paths, effects: Effects) -> list[Call]
|
||||
if isinstance(raised, Failure):
|
||||
return raised
|
||||
say(f"\n=== cycle {cycle} across build-release's archive: measuring the routing figures ===", effects, stdout=True)
|
||||
measured = archive.measure_archive(root, str(paths.home), raised.since, effects.git)
|
||||
measured = archive.measure_archive(root, str(paths.home), env, raised.since, effects.git)
|
||||
if isinstance(measured, Failure):
|
||||
return measured
|
||||
# The shipped ladder, not the project's: the figures span every project.
|
||||
|
||||
Reference in New Issue
Block a user