Skip to content

Simplify execution of main.py by removing command checks#1251

Merged
sbryngelson merged 3 commits intoMFlowCode:masterfrom
sbryngelson:test-claude-06
Feb 23, 2026
Merged

Simplify execution of main.py by removing command checks#1251
sbryngelson merged 3 commits intoMFlowCode:masterfrom
sbryngelson:test-claude-06

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Feb 22, 2026

User description

Removed the command handling logic for main.py execution.

Description

Summarize your changes and the motivation behind them.

Fixes #(issue)

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other: describe

Testing

How did you test your changes?

Checklist

  • I added or updated tests for new behavior
  • I updated documentation if user-facing behavior changed

See the developer guide for full coding standards.

GPU changes (expand if you modified src/simulation/)
  • GPU results match CPU results
  • Tested on NVIDIA GPU or AMD GPU

CodeAnt-AI Description

Remove automatic execution of the Python bootstrap (toolchain/main.py) from mfc.sh

What Changed

  • mfc.sh no longer runs toolchain/main.py for any arguments; the script now only bootstraps the environment (and exits for the "init" command)
  • The script stops showing or propagating main.py exit codes and messages
  • The Python virtual environment deactivation still runs when the script finishes

Impact

✅ No automatic Python commands when running mfc.sh
✅ Fewer unexpected main.py error messages during environment bootstrap
✅ Faster script return when only environment setup is needed

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

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow configuration for improved clarity in automated code review processes.

Removed the command handling logic for main.py execution.
Copilot AI review requested due to automatic review settings February 22, 2026 23:42
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 22, 2026

CodeAnt AI is reviewing your PR.


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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 22, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Updated the Claude Code Review GitHub workflow configuration by removing the show_full_output debug flag and refining the failure message prompt from "explain what was blocked" to "explain what is blocking access."

Changes

Cohort / File(s) Summary
GitHub Workflow Configuration
.github/workflows/claude-code-review.yml
Removed optional show_full_output: true debug flag and updated failure-message prompt text for improved clarity.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

size:M

Poem

🐰 A workflow refined with a careful touch,
Debug flags gone, but clarity means much,
"What blocks you now?" the prompt asks with care,
Simpler configs make the air more fair! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Comment on lines 87 to 88
if [ $code -ne 0 ]; then
error "main.py finished with a $code exit code."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Safely handle the exit status by defaulting to zero when it is unset and avoid unquoted numeric comparison. [custom_rule]

Severity Level: Minor ⚠️

Suggested change
if [ $code -ne 0 ]; then
error "main.py finished with a $code exit code."
if [ "${code:-0}" -ne 0 ]; then
error "main.py finished with a ${code:-0} exit code."
Why it matters? ⭐

The existing numeric test can fail with "integer expression expected" when $code is unset or empty; the improved code uses a safe default ("${code:-0}") and quotes the expansion so the test is robust. This directly fixes a correctness/robustness issue in the shell script (avoid unquoted/unset variable in numeric comparison), which is in line with the repository's emphasis on correctness over style.

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** mfc.sh
**Line:** 87:88
**Comment:**
	*Custom Rule: Safely handle the exit status by defaulting to zero when it is unset and avoid unquoted numeric comparison.

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

@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 22, 2026

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies the execution logic in mfc.sh by removing the command argument detection mechanism used before invoking main.py.

Changes:

  • Removed command-line argument parsing logic that determined whether a command was provided
  • Removed the conditional execution of main.py based on command presence
  • Streamlined script execution flow


echo

if [ $code -ne 0 ]; then
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The variable $code is referenced but never set after the removal of the python3 execution block. This will cause the script to fail or behave unexpectedly. Either remove this conditional check or ensure $code is set by adding back the main.py execution with proper exit code capture.

Copilot uses AI. Check for mistakes.
Removed the option to show full output in logs and updated prompt wording for clarity.
@sbryngelson sbryngelson merged commit 5e08029 into MFlowCode:master Feb 23, 2026
20 of 21 checks passed
@github-actions
Copy link

Claude Code Review

No issues found. Checked for bugs and CLAUDE.md compliance.

@sbryngelson sbryngelson deleted the test-claude-06 branch February 23, 2026 01:49
@coderabbitai coderabbitai bot mentioned this pull request Feb 23, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants