chore(deps): upgrade api to next@16.3.0

Merged
SW
4mo ago
+528-764

Part of recoupable/chat#1929 (PR 1 of 8). This is the fleet's canary: api is the only one of the three frontends that needs no lint or build-system work first, so it isolates "does 16.3 break us" from "is our tooling broken."

Draft. The canary did its job and found a real blocker: 16.3 changes which files next build type-checks, which surfaces 203 pre-existing test-fixture errors and fails the deploy. Full diagnosis in this comment. Needs a decision before it can land.

What changed

  • next 16.0.10 → 16.3.0, react/react-dom 19.2.1 → 19.2.8 (16.3 release notes).
  • Removed eslint-config-next@15.1.7. It was dead weight, not something to upgrade: eslint.config.js builds its own flat config out of @typescript-eslint, prettier, jsdoc, and import, and never extends the Next config or loads @next/eslint-plugin-next. The only mention anywhere in the repo was the package.json line this PR deletes.
  • Committed the <!-- BEGIN:nextjs-agent-rules --> block that next dev writes into AGENTS.md on Next 16.2+. Per the upgrade guide, next dev re-adds it on every run, so committing it is what keeps the tree clean.

What we get for free, with no application code changes: Turbopack disk caching for next build, up to 90% less dev-server memory, and native Node.js streams in the App Router render path (~22% more requests under load per Vercel's benchmarks).

Verification

GateBefore (16.0.10)After (16.3.0)
pnpm test797 files / 4329 tests passed797 files / 4329 tests passed✅ no change
pnpm lint:check—0 errors, 2 warnings (both pre-existing unused eslint-disable directives)✅
pnpm exec tsc --noEmit236 unique errors203 unique errors✅ 33 fixed, 0 introduced
next build type checkpassesfails, 203 errors❌ blocker
Preview deploy—state=failure❌ blocked by the above

The blocker. 16.3 changes the default type checker to the project-local tsc CLI, which per useTypeScriptCli checks "the complete project selected by the configured tsconfig file […] including test files." tsconfig.json here is "include": ["**/*.ts", ...], so every __tests__/** file is now in the build's type check for the first time. The errors are pre-existing fixture drift, not regressions — normalized to file(line,col): error TSxxxx, this bump introduces 0 new ones and fixes 33.

Two ways forward, costed very differently — see the diagnosis comment for the options. Holding here rather than picking one unilaterally, since it sets this repo's type-checking posture.

Notes

  • pnpm add reports x402-next@0.7.3 has an unmet peer next@^15.0.0. This is not new — that peer was already unmet on 16.0.10, since the package pins the v15 major. Flagging it because the last PR in this fleet renames middleware.ts → proxy.ts, which touches the same x402 payment path.
  • next dev on this branch emits ⚠ The "middleware" file convention is deprecated. Please use "proxy" instead. Tracked separately in chat#1929, sequenced last because it is the only change in the fleet touching a live payment path.
  • api has no build workflow in CI (format.yml, lint.yml, test.yml only), and none of the last 40 merged PRs touched package.json — which is how the type drift accumulated unnoticed.

🤖 Generated with Claude Code