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
+8
View File
@@ -37,6 +37,14 @@ def retried(who: str, attempt: typing.Callable[[], T | Failure | Limited], effec
effects.sleep(RETRY_DELAY)
def home_unready(effects: Effects, watched: bool) -> str | None:
"""Why no claude can run in the loop's Claude home, which effects.claude_home builds, or None where one can. Where nobody watches, as in a chunk's window or a reload, a failure is retried as a failed worker run is, since `claude` may fail while Claude Code's updater repoints it."""
if watched:
return effects.claude_home()
checked = retried("check of the loop's Claude home", lambda: Failure(reason) if (reason := effects.claude_home()) else None, effects)
return checked.reason if isinstance(checked, Stop) else None
def limit_wait(limited: Limited, now: float) -> float:
# The limit rejects every request until it resets, so wait for a known reset and poll rarely for an unknown one.
if limited.resets_at is not None and limited.resets_at + PAST_RESET > now: