Implementation:2akouwu Reverify doctor report
| 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_reportat L2034-2112;run_doctorat 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
# ...