# Upgrade Guide — v0.10.7

<!-- bump: patch -->

## What Changed

The System Reviewer is now fully wired into the server startup. Previously, the orchestrator, probes, API routes, and CLI command existed but SystemReviewer was never instantiated — all 4 API endpoints returned 503 and `instar review` couldn't reach anything.

**Server Bootstrap Wiring:**
- SystemReviewer is instantiated during server startup with real dependencies
- All 14 Tier 1 probes are registered automatically (session, scheduler, messaging, lifeline)
- Alert callback routes critical failures through the notification batcher to Telegram
- Feedback callback wired to FeedbackManager for auto-submission of probe failures

**Config Schema:**
- New `monitoring.systemReview` config section added to `MonitoringConfig`
- Configurable: `enabled`, `scheduleMs`, `scheduledTiers`, `autoSubmitFeedback`, `feedbackConsentGiven`, `alertOnCritical`, `alertCooldownMs`, `disabledProbes`
- Defaults are sensible: enabled by default, 6-hour schedule, alert on critical

**Health Endpoint Integration:**
- `/health` now includes `systemReview` section (authenticated callers only)
- Shows latest review status, pass/fail counts, probe count, and health classification
- Critical review status contributes to overall degradation flag

**Probe Dependencies:**
- Session probes: wired to SessionManager (listRunningSessions, getSessionDiagnostics, maxSessions)
- Scheduler probes: wired to JobScheduler (getJobs mapped from slug→id, getStatus, jobsFilePath)
- Messaging probes: wired to TelegramAdapter (getStatus, message log path) — only registered when Telegram is configured
- Lifeline probes: file-based detection via lock file — `isEnabled` returns true only when lifeline.lock exists (lifeline runs as separate process)

**New Method:**
- `SystemReviewer.getProbeCount()` — returns the number of registered probes (used by health endpoint)

## What to Tell Your User

- **System self-monitoring is now live**: "Your agent now monitors its own health automatically. Session management, job scheduling, Telegram messaging, and crash recovery are all verified periodically. If something breaks, you'll get a Telegram alert instead of silent degradation."

- **Check health anytime**: "Run `instar review` to see a full system health check, or check the `/health` endpoint for a summary."

## Summary of New Capabilities

| Capability | How to Use |
|-----------|-----------|
| System self-monitoring | Automatic — runs on startup and every 6 hours |
| On-demand health check | `instar review` CLI or `POST /system-reviews` API |
| Health endpoint integration | `GET /health` (authenticated) includes `systemReview` section |
| Configure monitoring | Set `monitoring.systemReview` in config.json |
| Disable specific probes | Set `monitoring.systemReview.disabledProbes: ["probe.id"]` |
