Opus finding
Cron sweep route returns 200 even when sweep results are degraded (no per-section status surfacing)
lowmaintainabilityhigh
- apps/web/app/api/cron/sweep/route.ts:78-92
The outgoing PR poll silently degrades to null on any failure (token missing, db down, GitHub 500). The cron response simply omits the field with no indication of degradation, making it impossible for monitoring/alerting to distinguish 'no work to do' from 'this subsystem is broken'. The runOutgoingPrsPoll wrapper does call logError, but the JSON response gives no signal.
Recommendation
Either include `outgoingPrs: null` explicitly with a `degraded: true` flag, or expose a structured `{status: 'ok'|'skipped'|'failed', reason}` field for each sub-section (sweep, onboarder, outgoingPrs) so observability tooling can alert on persistent silent failures.