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

This commit is contained in:
2026-12-04 02:45:02 +01:00
parent 71865e0479
commit 3519922f01
19 changed files with 153 additions and 69 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import pathlib
import typing
from failure import Failure
from loop_state.paths import Paths, XDG_CONFIG_HOME, XDG_STATE_HOME
from loop_state.paths import Paths, XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_STATE_HOME
from transcript_archive.project_key import project_key
from agent_cycle import tmux
@@ -22,9 +22,9 @@ OWN = "BUILD_RELEASE_"
# A window gets the tmux server's environment, not the starting terminal's. With another XDG value than its starter's, a window would lock and write in other folders. So each is handed even where the starter lacks it, as empty: an empty value moves no folder.
def handed(env: typing.Mapping[str, str]) -> dict[str, str]:
"""The variables an entry point hands each window it starts: those of env that both entry points read, and the two that move the config folder and the state folder."""
"""The variables an entry point hands each window it starts: those of env that both entry points read, and the three that move the config folder, the state folder and the loop's Claude home."""
own = {name: value for name, value in env.items() if name.startswith(OWN)}
return {**own, XDG_CONFIG_HOME: env.get(XDG_CONFIG_HOME, ""), XDG_STATE_HOME: env.get(XDG_STATE_HOME, "")}
return {**own, **{name: env.get(name, "") for name in (XDG_CONFIG_HOME, XDG_STATE_HOME, XDG_DATA_HOME)}}
@contextlib.contextmanager