fix: address RLMX release channel review feedback#104
Conversation
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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:
- Using
git checkout -f -B <branch> <start-point>to force-checkout and reset/create the branch in a single command. - Using
git clean -fxdto also clean ignored files/directories (likedist/andnode_modules/), ensuring a completely clean slate before runningnpm ciandnpm run build.
| 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 |
|
|
||
| runGit(root, ["reset", "--hard", "origin/main"]); | ||
| runCommand(root, "npm", ["ci"]); | ||
| runGit(root, ["clean", "-fd"]); |
There was a problem hiding this comment.
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.
| runGit(root, ["clean", "-fd"]); | |
| runGit(root, ["clean", "-fxd"]); |
| } | ||
| runGit(root, ["reset", "--hard", "origin/main"]); | ||
| runCommand(root, "npm", ["ci"]); | ||
| runGit(root, ["clean", "-fd"]); |
There was a problem hiding this comment.
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.
| runGit(root, ["clean", "-fd"]); | |
| runGit(root, ["clean", "-fxd"]); |
Automated review follow-upReviewed 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:
Coverage added/strengthened:
Validation:
Gate: GO / merge-ready. |
Summary
Follow-up to #103. I reviewed the PR comments and accepted the ones that were valid runtime/robustness findings.
Accepted fixes:
git checkout -fduring managed install refresh.origintoRLMX_REPO_URLbefore fetching.npm pack --dry-runassertion from repo root.rlmx update --forceclean untracked files after reset.npm ci --include=devin managed install/update paths so productionNODE_ENVhosts can still build.Smoke coverage extended:
rlmx update --forceand asserts the untracked file was removed.Verification
npm run buildnpm run checknpm test— 377 passing, 0 failingbash scripts/smoke-install-update.shnpm run check