Skip to content

Commit b966152

Browse files
solomonneascodex
andauthored
feat(run): add unified seat health probe (#590)
* feat(run): add unified seat health probe Co-Authored-By: Codex <codex@openai.com> * fix(run): support Python 3.10 timestamps Co-Authored-By: Codex <codex@openai.com> * fix(run): catch futures timeout on Python 3.10 Co-Authored-By: Codex <codex@openai.com> --------- Co-authored-by: Codex <codex@openai.com>
1 parent 7783ffb commit b966152

4 files changed

Lines changed: 959 additions & 0 deletions

File tree

src/brigade/roster_cmd.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from . import doctor as doctor_mod
1010
from . import model_inventory
1111
from . import roster as roster_mod
12+
from . import seat_health
1213
from . import templates
1314
from . import toml_compat
1415

@@ -323,6 +324,7 @@ def doctor(
323324
*,
324325
roster_path: Path | None = None,
325326
probe: roster_mod.CapabilityProbe | None = None,
327+
health_probe: seat_health.SeatHealthProbe | None = None,
326328
) -> int:
327329
target = target.expanduser()
328330

@@ -356,6 +358,20 @@ def doctor(
356358
else:
357359
checks.append((doctor_mod.WARN, "roster: allow_models", "not set; explicit model allow-list recommended"))
358360

361+
# Use the common coordinator for the health summary, but leave legacy
362+
# capability and per-model labels below intact for one compatibility
363+
# release. Doctor never sends model smoke prompts.
364+
shared_health = (health_probe or seat_health.SeatHealthProbe(collect_executable_version=False)).probe_roster(
365+
loaded, workspace=target, allow_model_smoke=False
366+
)
367+
for result in shared_health:
368+
status = doctor_mod.OK if result.status == "healthy" else doctor_mod.WARN
369+
detail = (
370+
"; ".join(f"{check.name}={check.status}" for check in result.checks if check.status != "passed")
371+
or "all applicable checks passed"
372+
)
373+
checks.append((status, f"agent: {result.seat} health", detail))
374+
359375
for name, agent in loaded.agents.items():
360376
if agent.stats is not None or name in local_stats:
361377
checks.append((doctor_mod.INFO, f"roster: stats {name}", _stats_detail(name, agent, local_stats)))

0 commit comments

Comments
 (0)