Answer stability round 1: 0 🔴, 2 🟡 (0 misread); name the signed-out check beside its message, and report a signal as a shell does; the 🟢 for a claude that cannot start is declined, as the home's build fails first
This commit is contained in:
@@ -19,7 +19,7 @@ LINKED = ("CLAUDE.md", "agents", "bin", "principles", "rules", "skills")
|
||||
CLONE = "{clone}"
|
||||
# Stands for the reports folder, which holds every chunk's review folder, in the clone's settings.json. Every value that holds it is a path, so unlike CLONE it isn't shell-quoted.
|
||||
REPORTS = "{reports}"
|
||||
# What `unready` says first where nobody has signed in to the home yet; `claude-release` runs there anyway, since /login is typed in that claude.
|
||||
# What `unready` says first where nobody has signed in to the home yet.
|
||||
SIGNED_OUT = "nobody is signed in to the loop's Claude home"
|
||||
# The file in the home that names the clone, its commit and the reports folder the home was built from.
|
||||
BUILT_FROM = "built-from"
|
||||
@@ -50,6 +50,11 @@ def unready(home: pathlib.Path, clone: pathlib.Path, reports: pathlib.Path, clau
|
||||
return f"{SIGNED_OUT}; run `CLAUDE_CONFIG_DIR={shlex.quote(str(home))} claude` and type /login there, once"
|
||||
|
||||
|
||||
def only_signed_out(reason: str) -> bool:
|
||||
"""Whether a reason `unready` gave is that nobody has signed in yet, which is typed away in a claude that runs in the home."""
|
||||
return reason.startswith(SIGNED_OUT)
|
||||
|
||||
|
||||
def signed_in(status: str) -> bool | None:
|
||||
"""Whether `claude auth status` printed that someone is signed in, by a /login or by a token in the environment; None where it printed no such answer."""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user