Opus finding
RSS feed crashes when a cross-repo merged row has null mergedAt
- apps/web/app/receipts.rss/route.ts:40-58
- apps/web/lib/outgoing-prs.ts:200-230
loadCrossRepoReceipts() filters out rows where mergedAt is null, so in practice CrossRepoReceiptRow.mergedAt is always non-null. However, the TypeScript type `CrossRepoReceiptRow.mergedAt: Date` is enforced only because the filter is in place. More importantly, the RSS route maps `pubDate: r.mergedAt` directly. If somehow a merged row had a non-null mergedAt but the database returned it as a string or any consumer constructs a CrossRepoReceiptRow elsewhere with mergedAt=null, .getTime() would throw. The bigger latent concern: PublicReceiptRow.closedAt filter narrows to Date but the type system relies on .closedAt !== null. These look defensively handled. Removing this finding — coverage looks adequate.
Recommendation
No fix needed — both arrays narrow nulls before consumption. Mentioned for completeness only.