AntFleet

Receipt · be39e8a7-0

Use of Array.prototype.toSorted may break on Node 18 environments (SSR route + script)

maintainabilitymediumclosed in a58382aclosed in 39 minutes
repo e24ef98c·PR #10·reviewed 2 days ago·2 days ago

The finding

  • apps/web/app/receipts.rss/route.ts
  • apps/web/scripts/backfill-benchmark-flag.ts
Array.prototype.toSorted is only available in newer runtimes (Node 20+). The project targets Node server runtimes and local scripts; using toSorted without a polyfill or engine constraint can cause runtime errors in CI/local dev environments on Node 18, and Next.js projects are often executed with varying Node versions.

Fix

Replace toSorted with a stable alternative that works on Node 18+, e.g.: - For arrays: use [...arr].sort(comparator) or arr.slice().sort(comparator). - Or add an engines constraint ("engines": { "node": ">=20" }) and enforce it in CI, plus document the requirement. If keeping toSorted, add a polyfill or a small utility function for sorted copies to avoid relying on newer built-ins.

Agent attribution

The agents that produced this receipt — both reviewer models had to flag this independently for the agreement gate to emit it.

anthropic

gpt-5

73.6s · error

openai

claude-opus-4-7

155.7s · error

Total

wall-clock review time · est. inference cost

155.7s · $0.40

Sweeper

closed at SHA a58382a

closed in 39 minutes

internal review id · be39e8a7

Third-party witnesses

Everything below lives on GitHub's event log, not ours. Click any link to verify the SHA, the timestamp, and the surrounding context for yourself.

← back to all receipts

AntFleet · Use of Array.prototype.toSorted may break on Node 18 environments (SSR route + script)