feat: auto-start TrueForge on Linux/macOS - #11
Conversation
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
PR Summary by QodoAuto-start TrueForge during Linux and macOS setup
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
Failed to generate code suggestions for PR |
Code Review by Qodo
1. False startup success
|
| nohup npx @truefoundry/trueforge >/tmp/missioncontrol-trueforge.log 2>&1 & | ||
| sleep 3 | ||
| echo " TrueForge starting on http://localhost:3000 (log: /tmp/missioncontrol-trueforge.log)" |
There was a problem hiding this comment.
1. False startup success 🐞 Bug ☼ Reliability
The setup backgrounds TrueForge, waits a fixed three seconds, and reports its URL without checking the process or HTTP endpoint. Installation errors, startup crashes, and port conflicts therefore still lead to the later “MissionControl is ready” message.
Agent Prompt
## Issue description
The setup script reports TrueForge as started after a fixed sleep even if the detached process failed.
## Issue Context
The repository's existing Windows startup flow polls port 3000 and explicitly reports failure. The Unix setup should similarly retain the background PID and poll `http://127.0.0.1:3000`, failing with the log path when startup does not complete.
## Fix Focus Areas
- scripts/setup.sh[75-77]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| echo " b. Add an MCP server -> URL: http://localhost:8000/mcp" | ||
| echo " c. Create an agent named 'missioncontrol' using agent/system-prompt.md" | ||
| echo " as the system prompt and agent/skills/incident-response/SKILL.md" | ||
| echo " as a skill. Require approval for rollback_deploy / restart_service." |
There was a problem hiding this comment.
2. Required setup steps removed 🐞 Bug ≡ Correctness
The change deletes the only setup-script instructions for adding the MCP server and creating the required missioncontrol agent, yet still declares the system ready. A user following this one-command setup reaches a running UI whose incident webhook returns 502 because it creates sessions against that specifically named agent.
Agent Prompt
## Issue description
Auto-starting the TrueForge process does not configure the model provider, MCP server, agent prompt, skill, or approval policy, but the PR removes the instructions users need to perform those steps.
## Issue Context
Keep the automatic launch while restoring the post-start guidance, or automate the configuration before declaring MissionControl ready.
## Fix Focus Areas
- scripts/setup.sh[73-80]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| echo " as a skill. Require approval for rollback_deploy / restart_service." | ||
| if command -v npx >/dev/null 2>&1; then | ||
| echo " Starting TrueForge in background..." | ||
| nohup npx @truefoundry/trueforge >/tmp/missioncontrol-trueforge.log 2>&1 & |
There was a problem hiding this comment.
Suggestion: Running npx without -y can prompt for confirmation before installing @truefoundry/trueforge. Because the command is detached with nohup and its stdin is unavailable, a clean machine may never start the runtime. Use the non-interactive install option or preinstall and pin the package. [possible bug]
Severity Level: Major ⚠️
- ❌ Clean-machine setup may fail to start TrueForge.
- ⚠️ Dashboard incident webhooks cannot reach the runtime.
- ⚠️ Setup reports startup despite an interactive install prompt.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** scripts/setup.sh
**Line:** 75:75
**Comment:**
*Possible Bug: Running `npx` without `-y` can prompt for confirmation before installing `@truefoundry/trueforge`. Because the command is detached with `nohup` and its stdin is unavailable, a clean machine may never start the runtime. Use the non-interactive install option or preinstall and pin the package.
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.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix| sleep 3 | ||
| echo " TrueForge starting on http://localhost:3000 (log: /tmp/missioncontrol-trueforge.log)" |
There was a problem hiding this comment.
Suggestion: The script waits a fixed three seconds and then reports TrueForge as starting without checking whether the background process is still alive or whether port 3000 is accepting connections. Installation failures, configuration errors, or a port conflict therefore still produce a successful-looking setup, while webhook requests fail later with 502 responses. [logic error]
Severity Level: Major ⚠️
- ❌ Incident webhook requests fail when runtime startup fails.
- ⚠️ Setup falsely declares TrueForge available.
- ⚠️ Operators must inspect logs manually to detect failure.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** scripts/setup.sh
**Line:** 76:77
**Comment:**
*Logic Error: The script waits a fixed three seconds and then reports TrueForge as starting without checking whether the background process is still alive or whether port 3000 is accepting connections. Installation failures, configuration errors, or a port conflict therefore still produce a successful-looking setup, while webhook requests fail later with 502 responses.
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.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
User description
Setup script now starts TrueForge automatically in background.
CodeAnt-AI Description
Start TrueForge automatically during Linux and macOS setup
What Changed
npxis available/tmp/missioncontrol-trueforge.log, and the setup reports its local URLnpxis unavailable, setup completes and explains how to start TrueForge manuallyImpact
✅ Faster local setup✅ TrueForge starts without a separate terminal✅ Clearer startup and troubleshooting guidance💡 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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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.