GPT-5 finding
Use of Array.prototype.toSorted may break on Node runtimes that don’t support it
- apps/web/app/receipts.rss/route.ts:33-38
- apps/web/scripts/backfill-benchmark-flag.ts:171-177
Array.prototype.toSorted is only available in newer Node versions (Node 20+). The app route runs server-side and the script runs via tsx; if executed on Node 18 (common in some environments), this will throw at runtime (TypeError: toSorted is not a function). No engines field or runtime version pin is visible here to guarantee support.
Recommendation
Replace calls with stable alternatives or ensure Node >= 20 everywhere: - In receipts.rss route: use [...sameRepoItems, ...crossRepoItems].sort((a,b)=>...). - In the script: use Array.from(byKey.values()).sort((a,b)=>...). Alternatively, add an engines.node constraint (>=20) and enforce in CI, or polyfill toSorted.