u
This commit is contained in:
29
jtlsrv-cpp/.cursor/rules/no-background-servers.mdc
Normal file
29
jtlsrv-cpp/.cursor/rules/no-background-servers.mdc
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
description: Server testing must use isolated bind address and non-default ports
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# Server testing — isolated bind only
|
||||
|
||||
## Never use the user's ports
|
||||
|
||||
Do NOT start servers on:
|
||||
|
||||
- Ports from the project's `.env` (e.g. `PORT=4447`)
|
||||
- Well-known or project defaults (`4443`, `8080`, `3000`, etc.)
|
||||
- `0.0.0.0` when the user's server may already be running there
|
||||
|
||||
Do NOT leave test servers running in the background (`&`, `nohup`, etc.). Stop them before ending the turn.
|
||||
|
||||
## OK for agent runtime tests
|
||||
|
||||
When a live test is truly needed:
|
||||
|
||||
- Bind to **`127.0.0.2`** (or another non-default loopback alias), not `127.0.0.1` / `0.0.0.0`
|
||||
- Use a **high ephemeral port** (e.g. `19443`, `38447`) — never the project's configured port
|
||||
- Override via env, e.g. `BIND_ADDRESS=127.0.0.2 PORT=19443 ./build/jtlsrv`
|
||||
- Kill the test process when done
|
||||
|
||||
Prefer compile-only verification (`make`) when that is enough.
|
||||
|
||||
If the user is already running the real server, ask them to test and share logs rather than starting another listener.
|
||||
Reference in New Issue
Block a user