Kill the mutants of the judged shells, the named process's lookup and a tool named as a third word
CI / tests (pull_request) Has been cancelled
CI / tests (pull_request) Has been cancelled
This commit is contained in:
@@ -43,7 +43,7 @@ PROMPT = f"""A headless Claude Code worker hasn't printed anything for {CHECK_EV
|
||||
|
||||
@dataclasses.dataclass
|
||||
class Watch:
|
||||
"""What checks a worker for stuck shells: the rung its investigations run on, the project's transcript archive, each shell's CPU seconds at the last check, and each judged shell's CPU seconds when it was judged."""
|
||||
"""What checks a worker for stuck shells: the rung its investigations run on, the project's transcript archive, each shell's CPU seconds at the last check, and the CPU seconds of each shell that showed a sign at the latest judgment."""
|
||||
rung: Rung
|
||||
archive: pathlib.Path
|
||||
cpu: dict[int, float] = dataclasses.field(default_factory=dict)
|
||||
@@ -62,7 +62,7 @@ class Watch:
|
||||
if isinstance(judged, Failure):
|
||||
line = f"stuck check: could not judge whether the worker is stuck: {judged.reason}"
|
||||
else:
|
||||
self.judged |= {shell.pid: shell.cpu for shell in shells if shell.pid in signs}
|
||||
self.judged = {shell.pid: shell.cpu for shell in shells if shell.pid in signs}
|
||||
line = f"stuck check: a headless claude judged the worker {judged['verdict']}, naming process {judged['process']} ({command_of(judged['process'], shells)}): {judged['why']}"
|
||||
line = " ".join(line.split()) + "".join(f"\n - {' '.join(sign.split())}" for sign in signs.values())
|
||||
say(line, effects, stdout=not isinstance(judged, Failure))
|
||||
@@ -96,7 +96,7 @@ def command_of(pid: int, shells: list[Shell]) -> str:
|
||||
if shell.pid == pid:
|
||||
return shell.command
|
||||
for line in shell.processes:
|
||||
if line.split(" ", 1)[0] == str(pid):
|
||||
if line.startswith(f"{pid} "):
|
||||
return line.split(" ", 4)[4] or "no command line"
|
||||
return "not in the evidence"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user