Files
gbrain/test
Garry TanandClaude Fable 5 0431dfd67f fix(facts,cycle,doctor): three backlog fixes — fence stub-dup, probe self-mute, wedged-queue misdiagnosis
- #3069 (facts): writeFactsToFence resolved the entity file by slug only,
  so a page whose on-disk basename differs from its slug (vault files like
  '10-people/First Last.md' → slug '10-people/first-last') missed existsSync
  and stub-created a duplicate page whose empty fence restarted row_num at 1,
  colliding with the real page's DB rows on idx_facts_fence_key. Now resolves
  the real file via the page row (source_path, then import_filename) before
  stub-creating, and routes to the legacy DB-only path when a page row exists
  but its backing file can't be located (stub-creating there would both
  collide and let a later sync import the stub over the real content).

- #3064 (cycle): the nightly quality probe's 24h gate counted its own
  'rate_limited' skip audit rows, and autopilot ticks every ~5 min — each
  skip re-armed the window, so the probe ran exactly once and then self-muted
  forever (~288 skip rows/day, which also perma-warned doctor's
  nightly_quality_probe_health). The gate now filters skip rows (defends
  against historical rows on pre-fix brains) and the skip no longer logs an
  audit event.

- #3063 (doctor): computeWedgedQueueCheck unconditionally blamed a wedged DB
  pool ('worker alive but not claiming work ... rebuilds a fresh DB pool')
  without observing worker liveness. It now checks the supervisor's singleton
  DB lock per wedged queue: no live holder → 'no waiting jobs and no worker
  running' with the `gbrain jobs supervisor start` remedy; live holder →
  the existing wedged-pool message. Lock-table read errors keep the
  conservative wedged-pool message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 11:05:39 -07:00
..