Skip to content

feat: auto-start TrueForge on Linux/macOS - #11

Merged
ADITYA-tp01 merged 1 commit into
mainfrom
feat/linux-setup
Aug 29, 2026
Merged

feat: auto-start TrueForge on Linux/macOS#11
ADITYA-tp01 merged 1 commit into
mainfrom
feat/linux-setup

Conversation

@ADITYA-tp01

@ADITYA-tp01 ADITYA-tp01 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

User description

Setup script now starts TrueForge automatically in background.


CodeAnt-AI Description

Start TrueForge automatically during Linux and macOS setup

What Changed

  • The setup script starts TrueForge in the background when npx is available
  • TrueForge output is saved to /tmp/missioncontrol-trueforge.log, and the setup reports its local URL
  • If npx is unavailable, setup completes and explains how to start TrueForge manually

Impact

✅ 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:

@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.

@ADITYA-tp01
ADITYA-tp01 merged commit 94e8d12 into main Aug 29, 2026
@codeant-ai

codeant-ai Bot commented Aug 29, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR b630e57 Aug 29, 2026 · 22:31 22:33

@codeant-ai

codeant-ai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Aug 29, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Auto-start TrueForge during Linux and macOS setup

✨ Enhancement 🕐 Less than 5 minutes

Grey Divider

AI Description

• Launches TrueForge automatically in the background during Linux and macOS setup.
• Captures runtime output in a temporary log and reports the local UI address.
• Falls back to a manual launch command when npx is unavailable.
Diagram

graph TD
  Setup["Setup script"] --> Check{"npx available?"}
  Check -->|Yes| Runtime["TrueForge runtime"] --> Log["Background log"]
  Check -->|No| Manual["Manual command"]
Loading
High-Level Assessment

The background nohup launch is appropriate for a lightweight local setup script because it completes onboarding without occupying the terminal and preserves diagnostics in a known log file. Keeping manual startup or adding a process manager would either retain user friction or add unnecessary complexity for this development workflow.

Files changed (1) +8 / -10

Enhancement (1) +8 / -10
setup.shStart TrueForge automatically during setup +8/-10

Start TrueForge automatically during setup

• Replaces manual runtime instructions with a guarded background launch through 'npx', redirecting output to '/tmp/missioncontrol-trueforge.log'. If 'npx' is unavailable, the script prints the command needed to start TrueForge manually.

scripts/setup.sh

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. False startup success 🐞 Bug ☼ Reliability
Description
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.
Code

scripts/setup.sh[R75-77]

+    nohup npx @truefoundry/trueforge >/tmp/missioncontrol-trueforge.log 2>&1 &
+    sleep 3
+    echo "  TrueForge starting on http://localhost:3000 (log: /tmp/missioncontrol-trueforge.log)"
Relevance

●● Moderate

Readiness concerns match existing health polling, but a close proposal to fail on health-check
failure was rejected.

PR-#5

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed code has no status or readiness check between launching the detached process and
announcing its URL. The repository's established startup flow polls TrueForge for HTTP 200 for up to
two minutes and reports a failure when it never becomes ready.

scripts/setup.sh[75-77]
scripts/setup.sh[83-90]
scripts/start-all.ps1[58-72]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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



Remediation recommended

2. Required setup steps removed 🐞 Bug ≡ Correctness
Description
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.
Code

scripts/setup.sh[L79-82]

-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."
+if command -v npx >/dev/null 2>&1; then
+    echo "  Starting TrueForge in background..."
+    nohup npx @truefoundry/trueforge >/tmp/missioncontrol-trueforge.log 2>&1 &
+    sleep 3
+    echo "  TrueForge starting on http://localhost:3000 (log: /tmp/missioncontrol-trueforge.log)"
+else
+    echo "  npx not found - run 'npx @truefoundry/trueforge' manually"
+fi
Relevance

●●● Strong

Removing documented MCP and agent provisioning leaves the auto-started runtime unusable; related
setup correctness fixes were accepted.

PR-#5

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The README defines adding the MCP endpoint and creating missioncontrol with the prompt, skill, and
approvals as required setup. The webhook hard-codes missioncontrol as its default agent and maps
inability to create its session to a 502 response, so merely starting the server is insufficient.

README.md[105-115]
apps/dashboard/app/api/webhook/route.ts[30-33]
apps/dashboard/app/api/webhook/route.ts[62-69]
scripts/setup.ps1[82-92]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

Context sources
✅ Web pages:
  +2 more
Review mode: ⚖️ Balanced

Grey Divider

Tip of the day
💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread scripts/setup.sh
Comment on lines +75 to +77
nohup npx @truefoundry/trueforge >/tmp/missioncontrol-trueforge.log 2>&1 &
sleep 3
echo " TrueForge starting on http://localhost:3000 (log: /tmp/missioncontrol-trueforge.log)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Comment thread scripts/setup.sh
Comment on lines -79 to -82
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."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

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

Comment thread scripts/setup.sh
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 &

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

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
👍 | 👎

Comment thread scripts/setup.sh
Comment on lines +76 to +77
sleep 3
echo " TrueForge starting on http://localhost:3000 (log: /tmp/missioncontrol-trueforge.log)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

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
👍 | 👎

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

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant