chore: Improve rebase AI skill#763
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
Hi! I'm che-ai-assistant — I help with your pull requests. Available commands:
|
|
This PR contains changes to files in directories that are typically not intended to be committed:
Please verify these changes are intentional. |
Document the pattern for handling CVE fixes that upstream has already incorporated: revert the che-specific PR instead of creating rebase rules. Includes real example from DOMPurify 3.4.2 → upstream 3.4.8 (PR che-incubator#705). Also documents the automation gap in pre-rebase.sh: it doesn't compare against the TARGET upstream to detect superseded changes. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Document how to identify and handle changes that were introduced accidentally during previous rebases (no PR, no rule). These can be safely restored to upstream version. Example: authenticationService.ts try/catch added during 1.108 rebase without a PR. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Add "Pre-rebase integrity checks" section covering orphaned elif entries left behind when Che changes are reverted but the routing in rebase.sh is not cleaned up. Includes detection steps and automation opportunity. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
After fixing stale rules, the skill now explicitly requires: 1. Re-validate all from values against new upstream (fast sanity check) 2. Verify elif integrity (no orphan entries) 3. Optionally run full test suite This prevents proceeding to rebase.sh with broken rules that were missed or accidentally introduced during the fix phase. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Document the common failure mode where a previous failed rebase.sh run leaves a merge in progress, causing subsequent runs to fail with "working tree has modifications. Cannot add." Include the recovery steps (git merge --abort) and the clean-state check. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
- Split EOVERRIDE into two scenarios: upstream-surpassed (remove override) vs our-pin-higher (add to override/) - Add new section (e) for silent exits caused by set -e and deleted files, with bash -x debugging tip - Note that dependency audit should catch EOVERRIDE before rebase Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Upstream may bump the required Node.js major version between releases (e.g. v22 → v24). The preinstall.ts script enforces .nvmrc and npm install fails immediately with the wrong version. Document the check-and-switch step before attempting the build. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Reworded from "check and install if different" to "always switch before any npm commands" — clearer instruction for automation. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
The full mangled build takes ~40 min and can fail on upstream mixin patterns unrelated to Che changes. The non-mangled compilation (~2-3 min) is sufficient to verify rebase correctness. The mangled production build is handled separately in CI. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
After build verification with the new Node.js version, lock files may be regenerated (due to lockfileVersion or dependency tree changes). Document this as a sub-step of Step 12 with detection and commit instructions. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
rebase.sh runs npm install internally to regenerate lock files. Using the correct Node.js/npm version from the start ensures lock files are generated in the right format (e.g. npm 11 for Node 24) and no separate "regenerate locks" commit is needed after build verification. Removes the "Lock file regeneration after Node.js version switch" section from Step 12 as it becomes unnecessary with this approach. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Prevents agents from composing PR body from memory after long sessions with many context switches. Adds: - Bold directive at Phase 4 start to re-read the section before executing - Post-creation verification checklist to catch deviations from template Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
When a step has multiple commits, list each as a sub-item with commit message and short hash (instead of comma-separated hashes). Additional non-standard steps are added as separate checklist items in chronological order. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Documents the process for finding and updating Node.js base images in Dockerfiles during rebase: - How to determine required Node.js major version from .nvmrc - How to use skopeo to find latest image tags from Red Hat catalog and Docker Hub - Which 5 Dockerfiles need updating and their image patterns - Additional checks (comments, npm global install, CXXFLAGS) - Corresponding entry added to PR body template Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Relative paths like [Pre-rebase-report](.rebase/1.128/...) resolve against the base branch (main) on GitHub, not the PR branch. Since these report files only exist on the alignment branch, the links break. Switch to absolute URLs with the branch name placeholder. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Document forbidden patterns (grep -P, declare -A, readarray) that cause silent failures on macOS bash 3.2 / zsh, leading to incorrect analysis results. Include verification discipline guidelines. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
6a141a4 to
d514a34
Compare
What does this PR do?
elifentries, EOVERRIDE, silent exits, dirty merge state)rebase.sh, post-fix re-validation, faster compile verification (compile-build-without-mangling), Dockerfile image updates when Node major bumpsChanges:
elifdetection — pre-rebase integrity checks for orphaned routing inrebase.shrebase.shrebase.shbash -x).nvmrcbefore any npm/rebase.shworkWhat issues does this PR fix?
How to test this PR?
Does this PR contain changes that override default upstream Code-OSS behavior?
git rebasewere added to the .rebase folder