Skip to content

Commit de52bca

Browse files
committed
fix: make operator-scoped memory/bootstrap tool checks advisory, not workspace failures
1 parent 277f778 commit de52bca

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- `content-guard` attached to the `guard` station.
1414
- New `tokens` station with `tokenjuice` for output compaction.
1515
- `brigade doctor` folds installed managed tools into its report and surfaces each tool's own health. Tools that are not installed are reported as non-failing `[todo]` hints, so doctor stays green on a bare host.
16+
- `memory-doctor` and `bootstrap-doctor` inspect the operator's canonical memory and bootstrap files (host-global), so their findings are labeled operator-scoped and treated as advisory `[warn]`, never failing a workspace `brigade doctor` run.
1617

1718
## [0.5.0] - 2026-05-24
1819

src/brigade/managed.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,36 @@ def _noop_wire(ctx: DoctorContext) -> List[CheckResult]:
3535
return []
3636

3737

38+
# memory-doctor and bootstrap-doctor inspect the operator's canonical memory and
39+
# bootstrap files (host-global), not a per-target workspace, so their findings are
40+
# advisory: labeled operator-scoped and never FAIL a workspace doctor run.
3841
def _memory_doctor_doctor(ctx: DoctorContext) -> List[CheckResult]:
42+
name = "memory-doctor (operator memory)"
3943
r = proc.run(["memory-doctor", "status", "--json"])
4044
if r.code == 2:
41-
return [(WARN, "memory-doctor", "installed but unwired (memory/handoffs dir missing)")]
45+
return [(WARN, name, "installed but unwired (memory/handoffs dir missing)")]
4246
data = r.json()
4347
if data is None:
44-
return [(WARN, "memory-doctor", f"unexpected output (exit {r.code})")]
48+
return [(WARN, name, f"unexpected output (exit {r.code})")]
4549
dead = data.get("dead_links", 0)
4650
status = WARN if dead else OK
47-
return [(status, "memory-doctor", f"cards={data.get('cards')}, dead_links={dead}, pending={data.get('pending_handoffs')}")]
51+
return [(status, name, f"cards={data.get('cards')}, dead_links={dead}, pending={data.get('pending_handoffs')}")]
4852

4953

5054
def _bootstrap_doctor_doctor(ctx: DoctorContext) -> List[CheckResult]:
55+
name = "bootstrap-doctor (operator files)"
5156
r = proc.run(["bootstrap-doctor", "status", "--json"])
5257
data = r.json()
5358
if data is None:
54-
return [(WARN, "bootstrap-doctor", f"installed but unwired or errored (exit {r.code})")]
59+
return [(WARN, name, f"installed but unwired or errored (exit {r.code})")]
5560
rows = data.get("rows", [])
5661
bad = [row for row in rows if row.get("severity") in ("hard", "missing", "unreadable")]
5762
soft = [row for row in rows if row.get("severity") == "soft"]
5863
if bad:
59-
return [(FAIL, "bootstrap-doctor", f"{len(bad)} file(s) over hard limit / missing")]
64+
return [(WARN, name, f"{len(bad)} file(s) over hard limit / missing (advisory)")]
6065
if soft:
61-
return [(WARN, "bootstrap-doctor", f"{len(soft)} file(s) in soft band")]
62-
return [(OK, "bootstrap-doctor", f"{len(rows)} bootstrap file(s) within limits")]
66+
return [(WARN, name, f"{len(soft)} file(s) in soft band")]
67+
return [(OK, name, f"{len(rows)} bootstrap file(s) within limits")]
6368

6469

6570
def _content_guard_doctor(ctx: DoctorContext) -> List[CheckResult]:

0 commit comments

Comments
 (0)