fix(orchestrator): keep installs off a running hub row and fail orphaned jobs
The runner records the hub row it runs in runner-job.json of the hub state directory (new --state flag, set by the runner unit) and drops it when the row ends. orchestrator.sh idle exits 1 with the row's task and job id while that file names a live pid; install, stop, runner and the home install.sh check it first, because stopping the runner would kill the row. A starting runner posts /api/runner/restart, and the hub fails every job an earlier runner left running, closing its row like a failed run with the reason that the runner restarted. 🎯 Fix: 92 % 💥 Break: 4 % 💸 Tokens: 100 % ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 88 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f8cb32198
commit
30862411f3
15 files changed
+411
-56
No files matched your search
+1
-1
@@ -208,7 +208,7 @@ class HubCase(unittest.TestCase):
|
||||
return json.loads(body)["jobs"]
|
||||
|
||||
def run_runner(self, register: bool = True, council: Path | None = None) -> None:
|
||||
trust = ["--approvers", str(self.approvers), "--replay", str(self.replay / "runner.json")]
|
||||
trust = ["--approvers", str(self.approvers), "--replay", str(self.replay / "runner.json"), "--state", str(self.state)]
|
||||
flags = ["--rasci", str(RASCI), "--council", str(council or self.council)] if register else []
|
||||
command = [sys.executable, str(RUNNER), "--port", str(self.port), "--interval", "0.1", *trust, *flags, "--operator", str(OPERATOR), "--once"]
|
||||
done = subprocess.run(command, capture_output=True, text=True, timeout=60, check=False, env={**os.environ, "SHELL": str(self.shell), "AGENTS_COUNCIL_ROOT": str(council or self.council)})
|
||||
|
||||
Reference in new issue
Block a user