Primary finding
RSS feed crashes when a cross-repo receipt has null mergedAt due to NULLS LAST ordering
- apps/web/lib/outgoing-prs.ts:188-220
- apps/web/app/receipts.rss/route.ts:36-48
loadCrossRepoReceipts filters status='merged' but does not require mergedAt IS NOT NULL in SQL; it filters in the loop. However the result type `CrossRepoReceiptRow.mergedAt: Date` is non-null and the consumer in receipts.rss/route.ts passes r.mergedAt to RssItem.pubDate and calls .getTime() in the sort. The loop already drops null rows so this is fine in practice. However, the lastMergedAt typing: lastMergedAt: Date | null is consumed correctly. The real concern: receipts.rss sort comparator calls b.pubDate.getTime() - a.pubDate.getTime(). If any sameRepo row had a null closedAt it would already be filtered. So this is OK. Actually re-reading: there is no crash here. Withdrawing this finding internally — but the higher-severity finding remains.
Recommendation
No-op — verified safe.