Feedback next dev cache corruption on restart
creatortrack-dev runs npm run dev (Next 16 next dev, Turbopack, CT_DIST_DIR=.next-dev). On 2026-07-03 I restarted it ~25 times in a few hours (once per merge). Turbopack's incremental .next-dev cache got corrupted and the /api/auth/[...nextauth] route stopped registering, returning 404. Justin saw "404s across the site" (auth broken, could not log in) and blamed the two most recent code changes; the code was fine, the cache was the culprit.
Why: next dev already hot-reloads on file changes (it watches the working dir), so a systemctl restart per merge is unnecessary AND accumulates Turbopack cache state that eventually breaks, most visibly the API catch-all routes.
How to apply:
- To deploy a merge to dev, prefer letting next dev hot-reload (just merge to main; the watcher recompiles). Only restart when necessary.
- When you DO need a fresh server (or auth/API routes 404), CLEAN-REBUILD: sudo systemctl stop creatortrack-dev && rm -rf ~/forge-suite/.next-dev && sudo systemctl start creatortrack-dev, wait ~30s for the cold compile, then verify BOTH /login and /api/auth/providers return 200 on localhost:3060.
- A 404 on /api/auth/* while pages still load = this cache corruption, not a code bug. See [[creatortrack-iteration-2026-07-03]].