Skip to content

fix: address RLMX release channel review feedback#104

Merged
namastex888 merged 1 commit into
mainfrom
drogo/rlmx-pr103-review-fixes
May 31, 2026
Merged

fix: address RLMX release channel review feedback#104
namastex888 merged 1 commit into
mainfrom
drogo/rlmx-pr103-review-fixes

Conversation

@namastex888
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #103. I reviewed the PR comments and accepted the ones that were valid runtime/robustness findings.

Accepted fixes:

  • Gemini: use git checkout -f during managed install refresh.
  • CodeRabbit: refresh existing install origin to RLMX_REPO_URL before fetching.
  • CodeRabbit: run SDK-only npm pack --dry-run assertion from repo root.
  • CodeRabbit: make rlmx update --force clean untracked files after reset.
  • Codex: use npm ci --include=dev in managed install/update paths so production NODE_ENV hosts can still build.

Smoke coverage extended:

  • Dirty update refusal now includes an untracked file.
  • Happy-path update uses rlmx update --force and asserts the untracked file was removed.

Verification

  • npm run build
  • npm run check
  • npm test — 377 passing, 0 failing
  • bash scripts/smoke-install-update.sh
  • push hook npm run check

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Warning

Review limit reached

@namastex888, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 43 minutes and 1 second. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 876bc835-6695-43ca-b820-a6b9d0d23fee

📥 Commits

Reviewing files that changed from the base of the PR and between 5143666 and a48efda.

⛔ Files ignored due to path filters (1)
  • dist/src/cli.js is excluded by !**/dist/**
📒 Files selected for processing (3)
  • scripts/install.sh
  • scripts/smoke-install-update.sh
  • src/cli.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch drogo/rlmx-pr103-review-fixes

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
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the update and installation scripts to perform a git clean and include development dependencies during the npm installation process. It also enhances the smoke tests to verify the force update behavior. The review feedback suggests improving robustness by using git clean -fxd instead of git clean -fd to ensure ignored files like compiled build outputs are properly removed, and using git checkout -f -B in the installation script to handle branch checkouts more reliably.

Comment thread scripts/install.sh
Comment on lines +21 to +23
git -C "$RLMX_INSTALL_DIR" checkout -f "$RLMX_BRANCH"
git -C "$RLMX_INSTALL_DIR" reset --hard "origin/$RLMX_BRANCH"
git -C "$RLMX_INSTALL_DIR" clean -fd
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Using git checkout -f followed by git reset --hard can be fragile if the target branch does not exist locally yet (e.g., when switching branches or on a fresh/custom branch checkout), which would cause the script to fail.

Additionally, using git clean -fd only removes untracked files but leaves ignored files/directories (like dist/ containing compiled JS files) untouched. Since tsc does not clean the output directory by default, stale JS files from deleted or renamed TS files can persist and cause unexpected runtime behavior.

We can make this process significantly more robust by:

  1. Using git checkout -f -B <branch> <start-point> to force-checkout and reset/create the branch in a single command.
  2. Using git clean -fxd to also clean ignored files/directories (like dist/ and node_modules/), ensuring a completely clean slate before running npm ci and npm run build.
Suggested change
git -C "$RLMX_INSTALL_DIR" checkout -f "$RLMX_BRANCH"
git -C "$RLMX_INSTALL_DIR" reset --hard "origin/$RLMX_BRANCH"
git -C "$RLMX_INSTALL_DIR" clean -fd
git -C "$RLMX_INSTALL_DIR" checkout -f -B "$RLMX_BRANCH" "origin/$RLMX_BRANCH"
git -C "$RLMX_INSTALL_DIR" clean -fxd

Comment thread src/cli.ts

runGit(root, ["reset", "--hard", "origin/main"]);
runCommand(root, "npm", ["ci"]);
runGit(root, ["clean", "-fd"]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Using git clean -fd only removes untracked files but leaves ignored files/directories (like dist/ containing compiled JS files) untouched. Since tsc does not clean the output directory by default, stale JS files from deleted or renamed TS files can persist in dist/ and cause unexpected runtime behavior or import issues.

Using git clean -fxd instead of git clean -fd will clean up ignored files/directories (like dist/ and node_modules/), ensuring a completely clean and reliable build. Since npm ci is run immediately after, deleting node_modules/ is perfectly safe and ensures a clean slate.

Suggested change
runGit(root, ["clean", "-fd"]);
runGit(root, ["clean", "-fxd"]);

Comment thread dist/src/cli.js
}
runGit(root, ["reset", "--hard", "origin/main"]);
runCommand(root, "npm", ["ci"]);
runGit(root, ["clean", "-fd"]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Using git clean -fd only removes untracked files but leaves ignored files/directories (like dist/ containing compiled JS files) untouched. Since tsc does not clean the output directory by default, stale JS files from deleted or renamed TS files can persist in dist/ and cause unexpected runtime behavior or import issues.

Using git clean -fxd instead of git clean -fd will clean up ignored files/directories (like dist/ and node_modules/), ensuring a completely clean and reliable build. Since npm ci is run immediately after, deleting node_modules/ is perfectly safe and ensures a clean slate.

Suggested change
runGit(root, ["clean", "-fd"]);
runGit(root, ["clean", "-fxd"]);

@namastex888
Copy link
Copy Markdown
Collaborator Author

Automated review follow-up

Reviewed the #103 automated comments. Valid findings were carried into this follow-up PR because #103 had already merged before the follow-up commit landed.

Accepted and fixed:

  • Gemini: installer refresh now uses git checkout -f for managed checkouts.
  • CodeRabbit: installer refresh now resets existing origin to RLMX_REPO_URL before fetch/reset.
  • CodeRabbit: SDK-only npm pack --dry-run check now runs from repo root.
  • CodeRabbit: rlmx update --force now runs git clean -fd after reset.
  • Codex: managed install/update now run npm ci --include=dev so production NODE_ENV hosts still get build tooling.

Coverage added/strengthened:

  • Smoke creates tracked + untracked dirty state.
  • Normal rlmx update must refuse dirty state.
  • rlmx update --force must advance to the new main commit and remove the untracked smoke file.

Validation:

  • npm run build
  • npm run check
  • npm test — 377 passing, 0 failing ✅
  • bash scripts/smoke-install-update.sh
  • GitHub PR checks: 8 passed, 0 failed ✅

Gate: GO / merge-ready.

@namastex888 namastex888 merged commit 47e1244 into main May 31, 2026
8 checks passed
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.

2 participants