Skip to content

Merge main into clause - #53

Merged
gamblecodezcom merged 0 commit into
claude/update-prod-runner-script-Lq2gSfrom
main
Feb 21, 2026
Merged

Merge main into clause#53
gamblecodezcom merged 0 commit into
claude/update-prod-runner-script-Lq2gSfrom
main

Conversation

@gamblecodezcom

@gamblecodezcom gamblecodezcom commented Feb 21, 2026

Copy link
Copy Markdown
Owner

CodeAnt-AI Description

Add in-chat deploys, smart username linking, and safer production startup/restart

What Changed

  • Admins can run /deploy in-chat: bot pulls main, installs dependencies, reports each step, notifies all admins before restarting, and triggers a restart (prefers systemd; falls back to exit/nohup).
  • Bot now detects a Runewager username typed casually (no prior prompt), asks for confirmation, links the account on approval, and resumes interrupted flows (e.g., the 30 SC bonus request) automatically after linking.
  • Startup now notifies all admins that the bot is online (silent notifications) so deployments/restarts are visibly confirmed.
  • Server helper script uses a reliable project path fallback, only attempts systemd/logrotate/cron actions when available, and always performs a safe restart to apply code changes (prefers systemctl restart; otherwise kills old PID and relaunches via nohup).

Impact

✅ Remote deploys with visible progress and safer restarts
✅ Shorter signup: users can link usernames by just typing them
✅ Clearer deploy confirmation for admins

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Feb 21, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Feb 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@codeant-ai

codeant-ai Bot commented Feb 21, 2026

Copy link
Copy Markdown

Sequence Diagram

Shows the new /deploy command added to the bot which pulls latest code, installs dependencies, and triggers a safe restart via systemd (with a nohup fallback). This captures the main success path introduced in the PR.

sequenceDiagram
    participant Admin
    participant Bot
    participant Shell as "Shell (git/npm)"
    participant Manager as "Service Manager (systemctl / fallback)"

    Admin->>Bot: /deploy (admin-only)
    Bot->>Shell: git pull origin main (PROJECT_DIR)
    Shell-->>Bot: git pull result (ok)
    Bot->>Shell: npm ci --omit=dev
    Shell-->>Bot: npm result (ok)
    Bot->>Manager: systemctl restart runewager (spawned, detached)
    Manager-->>Bot: restart triggered (process exits / restarts handled)
Loading

Generated by CodeAnt AI

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Feb 21, 2026
@gamblecodezcom
gamblecodezcom merged commit 0025ada into claude/update-prod-runner-script-Lq2gS Feb 21, 2026
2 checks passed
@gamblecodezcom
gamblecodezcom force-pushed the claude/update-prod-runner-script-Lq2gS branch from 813b15c to 9e1b9ed Compare February 21, 2026 06:52
@codeant-ai

codeant-ai Bot commented Feb 21, 2026

Copy link
Copy Markdown

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Use of plain node in nohup launch
    The nohup launch uses the bare node binary (e.g. nohup node "$PROJECT_DIR/index.js" ...).
    If the script runs with a restricted PATH (cron, different service user, or minimal root PATH), node may not be found and the app will fail to start. Prefer an absolute path to the node binary (resolved via command -v node) or reuse an already-resolved node_bin.

  • PROJECT_DIR fallback assumptions
    The script falls back to a single hardcoded VPS path (/var/www/html/Runewager) when the script dir doesn't contain index.js. If neither location contains index.js, the script still cd's into the (original) PROJECT_DIR and continues; downstream steps may misbehave. Consider explicitly erroring or warning earlier if no index.js is found in either location.

  • Hardcoded logrotate path in cron fallback
    The cron fallback uses /usr/sbin/logrotate explicitly. On systems where logrotate is installed in a different location, the cron job may fail. Resolve logrotate path dynamically (e.g. command -v logrotate) and fall back to a sane default if needed.

@codeant-ai

codeant-ai Bot commented Feb 21, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant