Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:2akouwu Reverify doctor report

From Leeroopedia
Knowledge Sources
Domains Context_Engineering, Diagnostics
Last Updated 2026-10-24 12:00 GMT

Overview

Concrete tool for diagnosing rollover harness health across all four AI coding CLIs — checking hooks, compaction status, receipts, and stuck successors, provided by the Reverify library.

Description

The doctor_report function inspects all four harnesses (Claude, Codex, Gemini, OpenCode) and reports per-harness: on PATH, hooks wired and resolvable, native compaction off, unconsumed receipts, and stuck successor sessions. run_doctor renders the report to the console with ok/--/!! markers and exits 0 if no problems, 1 if problems found.

Usage

Use this function when you need to:

  • Verify that rollover hooks are correctly installed.
  • Diagnose why rollover is not working (missing hooks, compaction on, stuck receipts).
  • Check for unconsumed receipts or stuck successor sessions.

Code Reference

Source Location

  • Repository: Reverify
  • File: reverify/rollover_harness.py
  • Lines: doctor_report at L2034-2112; run_doctor at L2115-2143

Signature

def doctor_report() -> List[Dict[str, Any]]:
    """Per harness: on PATH, hooks, compaction off, problems, receipts, successors."""

def run_doctor(argv: List[str]) -> int:
    """Print doctor report; exit 0 if no problems, 1 if problems found."""

Import

from reverify.rollover_harness import doctor_report

I/O Contract

Inputs

Name Type Required Description
(none) — — Reads config files from disk for each harness

Outputs

Name Type Description
return List[Dict] Per-harness row: harness, on_path, hooks, compaction_off, problems, unconsumed_receipts, successor_jobs

Usage Examples

CLI Usage

reverify rollover doctor
# Output:
#   threshold  : 200000 tokens (step 100000); state dir ~/.reverify/rollover
#   ok claude    on PATH: yes  hooks: yes   native compaction off: yes
#   -- codex     on PATH: no   hooks: no    native compaction off: no
#   ...

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment