Repository navigation
Use the standalone AI gateway in production, staging, and development - #7173
chrarnoldus wants to merge 4 commits into
Conversation
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (6 files)
Fix these issues in Kilo Cloud Previous Review Summaries (5 snapshots, latest commit c8487c2)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c8487c2)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (5 files)
Fix these issues in Kilo Cloud Previous review (commit 4900696)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryDevelopment-only gateway rewrites assume the standalone AI gateway is always running, so web dev entry points that skip Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Previous review (commit 706196f)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryDevelopment-only gateway rewrites assume the standalone AI gateway is always running, so web dev entry points that skip Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Previous review (commit d5f420d)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryDevelopment-only gateway rewrites assume the standalone AI gateway is always running, so web dev entry points that skip Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Previous review (commit 500eadf)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryDevelopment-only gateway rewrites assume the standalone AI gateway is always running, so web dev entry points that skip Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (7 files)
Reviewed by deepseek-v4.1-flash · Input: 92.5K · Output: 32.1K · Cached: 1.3M Review guidance: REVIEW.md from base branch |
500eadf to
d5f420d
Compare
706196f to
4900696
Compare
| const child = spawn(app.command, app.args, { | ||
| cwd: app.cwd, | ||
| stdio: 'inherit', | ||
| detached: true, |
There was a problem hiding this comment.
WARNING: The web server is spawned detached, so it leaves the tmux pane's process group and escapes dev:stop.
pnpm dev:stop shuts the stack down with tmux kill-session, which only signals the pane's foreground process group. A detached child calls setsid() and lives in its own session, so it never receives that SIGHUP; and because this launcher only registers SIGINT/SIGTERM handlers, a SIGHUP terminates web-dev.mjs without stopping the child. The next dev process is then orphaned (reparented to init), keeps the worktree's web port bound, and makes the next dev:start collide or auto-increment. Previously scripts/dev.sh exec'd next dev inside the pane's group, so kill-session reaped it. Handle SIGHUP as well (e.g. process.on('SIGHUP', () => stop(129))), or avoid detaching and signal each child directly.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Summary
Route web AI requests to the standalone gateway app while preserving existing client URLs. The rewrites run before web filesystem routes and map gateway/OpenRouter aliases, FIM/edit, System One, and organization model endpoints to /api/v1.
Local development takes precedence over pulled deployment variables, and staging takes precedence over VERCEL_ENV=production. Existing Exa/marketplace routing and unrelated organization/cron endpoints remain unchanged.
Automatic Development Startup
Latest Verification
Verification Limits
The full repository test suite and authenticated upstream inference were not run. An earlier broader E2E attempt hit two existing signed-in auth-flow timeouts; those tests were not changed. An earlier full dev-tool suite also had a tmux client-attachment failure. These are separate from the passing focused gateway/startup checks.
Rollout
Ensure the production and staging gateway domains point to the corresponding deployments and the gateway project has the equivalent gateway-inference firewall rate-limit rule. Scheduled releases deploy the gateway with the web apps. This PR does not mutate external Vercel configuration.