-
Notifications
You must be signed in to change notification settings - Fork 0
Claude/plan v3 deployment vp mpw #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c3ce323
1c1d19c
92e93e6
3d4befe
41c2083
c279f5f
81ff2af
86a6e1d
b6e211c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,6 +19,34 @@ if [ "$NODE_MAJOR" -lt 20 ] 2>/dev/null; then | |||||||||||||||
| exit 1 | ||||||||||||||||
| fi | ||||||||||||||||
|
|
||||||||||||||||
| # Pull latest code | ||||||||||||||||
| echo "[dev-run] Pulling latest code from origin main..." | ||||||||||||||||
| git -C "$ROOT_DIR" fetch origin main 2>&1 \ | ||||||||||||||||
| && git -C "$ROOT_DIR" reset --hard origin/main 2>&1 \ | ||||||||||||||||
| || echo "[dev-run] WARN: git pull failed — starting with local copy" | ||||||||||||||||
|
|
||||||||||||||||
| # Refresh tooltips | ||||||||||||||||
| TOOLTIP_SCRIPT="$ROOT_DIR/generate_tooltips.sh" | ||||||||||||||||
| if [ -x "$TOOLTIP_SCRIPT" ]; then | ||||||||||||||||
| echo "[dev-run] Refreshing tooltips..." | ||||||||||||||||
| RUNEWAGER_DIR="$ROOT_DIR" sh "$TOOLTIP_SCRIPT" >/dev/null 2>&1 \ | ||||||||||||||||
| || echo "[dev-run] WARN: generate_tooltips.sh failed (non-fatal)" | ||||||||||||||||
| fi | ||||||||||||||||
|
|
||||||||||||||||
| # Kill anything blocking port 3000 (or PORT from .env) | ||||||||||||||||
| DEV_PORT=$(grep -E '^PORT=' "$ROOT_DIR/.env" 2>/dev/null | head -1 | cut -d= -f2 | tr -d '"' | tr -d "'" || true) | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Similar to the deploy script, if Severity Level: Major
|
||||||||||||||||
| DEV_PORT=$(grep -E '^PORT=' "$ROOT_DIR/.env" 2>/dev/null | head -1 | cut -d= -f2 | tr -d '"' | tr -d "'" || true) | |
| DEV_PORT=$(grep -E '^PORT=' "$ROOT_DIR/.env" 2>/dev/null \ | |
| | head -1 \ | |
| | cut -d= -f2- \ | |
| | sed 's/[[:space:]]*#.*$//' \ | |
| | tr -d '"' \ | |
| | tr -d "'" || true) |
Steps of Reproduction ✅
1. In the project root `/workspace/Runewager`, create or edit `.env` so the port line
includes an inline comment, e.g. `PORT=3000 # dev`, matching the pattern read by
`dev-run.sh:37` (`grep -E '^PORT=' "$ROOT_DIR/.env"`).
2. Start a process that listens on TCP port 3000, e.g. by running `node index.js` once and
leaving it running, so that port 3000 is already in use before running the dev script.
3. Run the dev helper script `./dev-run.sh`; after the Node version check at
`dev-run.sh:15-20`, the script parses the port at `dev-run.sh:37-38`, assigning
`DEV_PORT="3000 # dev"` because `cut -d= -f2` returns the entire `3000 # dev` value
without stripping the comment.
4. The script then attempts to kill processes on that port via `lsof`/`fuser` at
`dev-run.sh:39-42`, but because `DEV_PORT` contains `3000 # dev`, the arguments to
`lsof`/`fuser` are malformed and no process on TCP port 3000 is actually killed; the
subsequent `exec node index.js` at `dev-run.sh:52` may then fail to bind with an
`EADDRINUSE` error even though `dev-run.sh` claimed to free the port.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** dev-run.sh
**Line:** 37:37
**Comment:**
*Logic Error: Similar to the deploy script, if `PORT` in `.env` includes an inline comment (e.g., `PORT=3000 # dev`), the current parsing leaves the comment in `DEV_PORT`, so the lsof/fuser invocation cannot parse it as a valid port and the script may fail to kill the process blocking the dev server port, causing confusing startup failures.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: When
PORTin.envincludes an inline comment (e.g.,PORT=3000 # dev), the current parsing stores the entire3000 # devstring inDEPLOY_PORT, so the lsof/fuser call cannot interpret it as a valid port and the script silently fails to kill the blocking process, potentially leaving the deploy unable to start the bot on the intended port. [logic error]Severity Level: Major⚠️
Steps of Reproduction ✅
Prompt for AI Agent 🤖