Files
gbrain/test
Paolo BelcastroandClaude Fable 5 3265dc2c93 fix(autopilot,doctor): nightly quality probe honors gbrain config set (dual-plane flag read)
The doctor check prints a paste-ready enable hint — gbrain config set
autopilot.nightly_quality_probe.enabled true — which writes the DB config
plane. But the autopilot gate and the doctor check both read only the file
plane (~/.gbrain/config.json), so following the printed hint was a silent
no-op: the probe never ran and doctor kept reporting disabled.

Fix: resolveProbeEnabled / resolveProbeMaxUsd in nightly-quality-probe.ts
apply the dual-plane rule already used by mcp.publish_skills (serve-http.ts):
the DB row wins when present, the file plane is the fallback. Both call
sites (autopilot loop gate + doctor health check) now share the helpers, so
they can no longer diverge (doctor's old Boolean() read also disagreed with
autopilot's === true on string values).

Covers the max_usd cap with the same rule. Regression tests pin the helper
semantics and the new wiring shape.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FQgByq4aqQq2PP8UHCdnfk
2026-07-06 14:11:14 +02:00
..