Skip to content

fix: core-cli startup fix#1718

Open
mabels wants to merge 2 commits intomainfrom
mabels/core-cli-runtime
Open

fix: core-cli startup fix#1718
mabels wants to merge 2 commits intomainfrom
mabels/core-cli-runtime

Conversation

@mabels
Copy link
Copy Markdown
Contributor

@mabels mabels commented Mar 27, 2026

Summary by CodeRabbit

  • Bug Fixes
    • CLI invocation logic now recognizes additional invocation patterns and resolves the actual filesystem location of the invoked command before locating the project entry point. This improves detection of the run directory, ensuring the correct entry file is found and passthrough arguments are sliced and forwarded more reliably.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ea3aa8cd-6d33-4e88-aa85-9d2f89dc913e

📥 Commits

Reviewing files that changed from the base of the PR and between 2ac98a9 and 696a711.

📒 Files selected for processing (1)
  • cli/run.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • cli/run.js

Walkthrough

CLI logic for locating the run directory was changed to search process.argv for an argument ending with run.js or core-cli, resolve that argument via fs.realpathSync(...) to its real filesystem path, take its parent as the run directory, and recompute the passthrough argument slice and main entry resolution.

Changes

Cohort / File(s) Summary
CLI Argument Parsing
cli/run.js
Searches process.argv for entries ending with run.js or core-cli; uses fs.realpathSync(...) on the matched argument and takes its parent directory as the run directory; recomputes main.js/main.ts resolution and the passthrough process.argv slice.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: core-cli startup fix' is directly related to the changeset, which modifies cli/run.js to fix how the core-cli determines its run directory during startup.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mabels/core-cli-runtime

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant