make sure running prod backend only uses backend port#6346
Conversation
Greptile SummaryThis PR fixes a regression introduced by a "single port" change where running a production backend-only server would incorrectly select from frontend port values (including falling back to Confidence Score: 5/5Safe to merge — targeted one-function fix with no new dependencies or logic regressions. The change is narrow, directly addresses the stated bug (BACKEND_ONLY prod mode using frontend port/fallback), and preserves existing FULLSTACK behavior. No new test surface area is introduced, all branches are simple assignments. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["_run() — prod path"] --> B{running_mode?}
B -->|BACKEND_ONLY| C["requested_port = backend_port or config.backend_port\nfallback_port = DefaultPorts.BACKEND_PORT"]
B -->|FRONTEND_ONLY| D["requested_port = frontend_port or config.frontend_port\nfallback_port = DefaultPorts.FRONTEND_PORT"]
B -->|FULLSTACK| E["requested_port = frontend_port or backend_port\n or config.frontend_port or config.backend_port\nfallback_port = DefaultPorts.FRONTEND_PORT"]
C --> F["handle_port(port = requested_port or fallback_port,\nauto_increment = requested_port is None)"]
D --> F
E --> F
F --> G["_run_prod(running_mode, port, backend_host)"]
Reviews (1): Last reviewed commit: "make sure running prod backend only uses..." | Re-trigger Greptile |
previously it would try frontend port, introduced in the single port PR