Answer prose round 1: 0 🔴, 4 🟡 (0 misread); say what holds under an XDG variable in the decision and the path comments

This commit is contained in:
2026-12-03 19:25:40 +01:00
parent dc8504e4ca
commit 6df7bed25b
8 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ class Models:
# The environment variables that name the judge's and the worker's model for one run, over the model saved or configured.
JUDGE_MODEL = "BUILD_RELEASE_JUDGE_MODEL"
WORKER_MODEL = "BUILD_RELEASE_WORKER_MODEL"
# The file, in the claims folder, that save_model keeps locked with flock while it rereads and replaces the models file. The models file's own folder is the config folder, which a person backs up, so it takes no lock file.
# The file, in the claims folder, that save_model keeps locked with flock while it rereads and replaces the models file. The models file's own folder is the config folder, which a person backs up, so the lock file is kept out of it.
MODELS_LOCK = "models.lock"
+3 -3
View File
@@ -1,4 +1,4 @@
"""do-epic's machine-wide settings: `~/.config/build-release/do-epic/config.toml`, and `repo-rule.md` beside it.
"""do-epic's machine-wide settings: `do-epic/config.toml` in the config folder (`loop_state.paths.config_folder`), and `repo-rule.md` beside it.
One pair per machine, the same for every epic (docs/decisions.md → `do-epic: drives one Jira epic …`). The config is TOML:
@@ -12,7 +12,7 @@ One pair per machine, the same for every epic (docs/decisions.md → `do-epic: d
twu-4 = "tenant-web-ui-4"
- `jira-url` is the Jira site's address: https, a host, and no path.
- `env-file` is the file of Jira credentials: a path that starts with / or ~/, outside every folder of `~/.config/build-release` and outside the clone folder, which hold git checkouts. `~/.config/build-release/<key>.env` is fine.
- `env-file` is the file of Jira credentials: a path that starts with / or ~/, outside every folder of the config folder and outside the clone folder, which hold git checkouts. `<key>.env` in the config folder itself is fine.
- `repoless-model` is the model that works an epic item with no repo: a model on the routing ladder, `model_routing/routing-ladder.json`.
- `clone-folder` is the folder a missing repo is cloned into: a path that starts with / or ~/. `~/code` where left out.
- `language` is the default language of Jira text, by its English name. English where left out.
@@ -66,7 +66,7 @@ LISTED = f"The settings are {', '.join(SETTINGS)}, and optionally {listed(OPTION
@dataclasses.dataclass(frozen=True)
class DoEpicConfig:
"""folder is `~/.config/build-release/do-epic`; repo_rule is `repo-rule.md`'s text."""
"""folder is `do-epic` in the config folder; repo_rule is `repo-rule.md`'s text."""
folder: pathlib.Path
jira_url: str
env_file: pathlib.Path
+1 -1
View File
@@ -18,7 +18,7 @@ from chunk_pr.approval import PARKS
from loop_state.paths import state_folder
from agent_cycle import tmux
# In the state folder, where a folder per epic key holds the epic's lock file, which `claims.LOCK` names. A chunk without a repo works there.
# The folder in the state folder where a folder per epic key holds the epic's lock file, which `claims.LOCK` names. A chunk without a repo works there.
STATE = "do-epic"
+4 -4
View File
@@ -12,12 +12,12 @@ RELEASE_ROOT = pathlib.Path(__file__).resolve().parents[2]
# The Claude home: Claude Code's own folder, with its settings and transcripts. A release is deployed into it, so its CLAUDE.md, rules/ and agents/ are read from it.
CLAUDE_HOME = ".claude"
# The setup's own folder under each of the two below.
# The name of the setup's own folder, in the config home and in the state home.
SETUP = "build-release"
# Where the config folder is, unless the variable XDG_CONFIG_HOME names another place.
# The config home, which holds the config folder, unless the variable XDG_CONFIG_HOME names another.
CONFIG_HOME = ".config"
XDG_CONFIG_HOME = "XDG_CONFIG_HOME"
# Where the state folder is, unless the variable XDG_STATE_HOME names another place.
# The state home, which holds the state folder, unless the variable XDG_STATE_HOME names another.
STATE_HOME = ".local/state"
XDG_STATE_HOME = "XDG_STATE_HOME"
@@ -40,7 +40,7 @@ def config_folder(env: Mapping[str, str], home: pathlib.Path) -> pathlib.Path:
def state_folder(env: Mapping[str, str], home: pathlib.Path) -> pathlib.Path:
"""The state folder, which the tools write: one folder per tool."""
# Every tool keeps its state here, none beside it, so that deleting this folder removes all the state the setup wrote.
# Every tool keeps its state here, none beside it in the state home. Only an archive that BUILD_RELEASE_TRANSCRIPTS names is elsewhere.
return xdg_folder(env.get(XDG_STATE_HOME), home / STATE_HOME) / SETUP
+1 -1
View File
@@ -1,4 +1,4 @@
"""A project's settings, read from the one config that names its checkout: `<key>/config.toml` in the config folder, `~/.config/build-release/` unless `XDG_CONFIG_HOME` is set.
"""A project's settings, read from the one config that names its checkout: `<key>/config.toml` in the config folder, `~/.config/build-release/` unless `XDG_CONFIG_HOME` holds an absolute path.
No path setting has a default, so that a client's project never runs on another project's files: a missing config or setting is a Failure that names it."""
import dataclasses
+3 -1
View File
@@ -25,6 +25,8 @@ saved it after open read it or after save last wrote it, and the human decides w
until open runs again and writes the copy afresh.
Exit 2 on bad arguments, and 1, saying why, on any other failure.
Where XDG_STATE_HOME holds an absolute path, read ~/.local/state in this help as that path.
"""
import hashlib
import os
@@ -41,7 +43,7 @@ from loop_state.paths import state_folder
# Not git's verbs, such as checkout and commit: those read as acting on the repo.
COMMANDS = ("open", "save")
# Where the copy of a record kept outside files goes, under the user's home, in a folder per project and worktree.
# Where the copy of a record kept outside files goes, under the state folder, in a folder per project and worktree.
COPIES = "project-record"
# The goals file opens like a record, though it is a setting of its own.
GOALS = "goals-and-audience"
+1 -1
View File
@@ -5,7 +5,7 @@
<archive root>/<project key>/<chunk>/session/...
<archive root>/<project key>/<chunk>/judge/<sha256>.json
- The archive root is $BUILD_RELEASE_TRANSCRIPTS, or ~/.local/state/build-release/transcripts (location.archive_root).
- The archive root is $BUILD_RELEASE_TRANSCRIPTS, or `transcripts` in the state folder (location.archive_root).
- The project key is the checkout's path relative to ~/code, or to / outside it (project_key.project_key).
- <chunk> is the hash of the transcript's first line with a timestamp (location.chunk_folder). It is the
same for every cycle of a chunk, and differs between chunks, since a finished chunk's session is deleted