fix(mcb): stabilize from clean origin/main with conflict marker CI check - #218
fix(mcb): stabilize from clean origin/main with conflict marker CI check#218marlon-costa-dc wants to merge 1 commit into
Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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.
3 issues found across 1 file
Confidence score: 2/5
- In
.github/workflows/conflict-marker-check.yml,=======$matches ordinary lines ending in seven or more=characters, so the check can fail clean branches and block CI; restrict the pattern to actual conflict separators. - The same workflow splits tracked filenames containing whitespace into separate
git greparguments, while2>/dev/null || truecan conceal failures and missed markers; pass paths without shell splitting and avoid masking grep errors. actions/checkout@v4is mutable while existing workflows use immutable action SHAs, leaving this workflow exposed to unexpected upstream changes; pin checkout to the repository-approved commit.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/conflict-marker-check.yml">
<violation number="1" location=".github/workflows/conflict-marker-check.yml:11">
P2: `actions/checkout@v4` is mutable, unlike the SHA-pinned actions in the existing workflows. Pin this step to the repository’s approved immutable checkout commit.</violation>
<violation number="2" location=".github/workflows/conflict-marker-check.yml:16">
P1: The grep pattern `=======$` matches any line that ends with 7 or more `=` characters, not just conflict separators. On this repo's clean `main` (which per the PR title has no conflict markers), the command flags 75 files — including every `# ====...` comment banner in Cargo.toml, .env.example, .github/setup-ci.sh, .pr_agent.toml, and the workspace crates — so `exit 1` fires and this job fails on every PR. Anchor the pattern at line start and match the full marker set `^(<<<<<<<|=======|>>>>>>>)` (conflict markers always start at column 0). This also restores detection of `>>>>>>>` and `<<<<<<< branchname` markers that the current literal `<<<<<<< HEAD` alternative misses. Note the repo already has this exact correct pattern in scripts/lib/mcb.sh:121.</violation>
<violation number="3" location=".github/workflows/conflict-marker-check.yml:17">
P2: A tracked filename containing whitespace is split into multiple `git grep` arguments, and the redirected error plus `|| true` can hide markers in that file. Pass paths without shell splitting.</violation>
</file>
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
| submodules: true | ||
| - name: Check for merge conflict markers | ||
| run: | | ||
| markers=$(git grep -l '<<<<<<< HEAD\|=======$' -- \ |
There was a problem hiding this comment.
P1: The grep pattern =======$ matches any line that ends with 7 or more = characters, not just conflict separators. On this repo's clean main (which per the PR title has no conflict markers), the command flags 75 files — including every # ====... comment banner in Cargo.toml, .env.example, .github/setup-ci.sh, .pr_agent.toml, and the workspace crates — so exit 1 fires and this job fails on every PR. Anchor the pattern at line start and match the full marker set ^(<<<<<<<|=======|>>>>>>>) (conflict markers always start at column 0). This also restores detection of >>>>>>> and <<<<<<< branchname markers that the current literal <<<<<<< HEAD alternative misses. Note the repo already has this exact correct pattern in scripts/lib/mcb.sh:121.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/conflict-marker-check.yml, line 16:
<comment>The grep pattern `=======$` matches any line that ends with 7 or more `=` characters, not just conflict separators. On this repo's clean `main` (which per the PR title has no conflict markers), the command flags 75 files — including every `# ====...` comment banner in Cargo.toml, .env.example, .github/setup-ci.sh, .pr_agent.toml, and the workspace crates — so `exit 1` fires and this job fails on every PR. Anchor the pattern at line start and match the full marker set `^(<<<<<<<|=======|>>>>>>>)` (conflict markers always start at column 0). This also restores detection of `>>>>>>>` and `<<<<<<< branchname` markers that the current literal `<<<<<<< HEAD` alternative misses. Note the repo already has this exact correct pattern in scripts/lib/mcb.sh:121.</comment>
<file context>
@@ -0,0 +1,23 @@
+ submodules: true
+ - name: Check for merge conflict markers
+ run: |
+ markers=$(git grep -l '<<<<<<< HEAD\|=======$' -- \
+ $(git ls-files | grep -vE '\.venv/|target/|dist/|\.cache/|_vendor/' | tr '\n' ' ') 2>/dev/null || true)
+ if [ -n "$markers" ]; then
</file context>
| - name: Check for merge conflict markers | ||
| run: | | ||
| markers=$(git grep -l '<<<<<<< HEAD\|=======$' -- \ | ||
| $(git ls-files | grep -vE '\.venv/|target/|dist/|\.cache/|_vendor/' | tr '\n' ' ') 2>/dev/null || true) |
There was a problem hiding this comment.
P2: A tracked filename containing whitespace is split into multiple git grep arguments, and the redirected error plus || true can hide markers in that file. Pass paths without shell splitting.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/conflict-marker-check.yml, line 17:
<comment>A tracked filename containing whitespace is split into multiple `git grep` arguments, and the redirected error plus `|| true` can hide markers in that file. Pass paths without shell splitting.</comment>
<file context>
@@ -0,0 +1,23 @@
+ - name: Check for merge conflict markers
+ run: |
+ markers=$(git grep -l '<<<<<<< HEAD\|=======$' -- \
+ $(git ls-files | grep -vE '\.venv/|target/|dist/|\.cache/|_vendor/' | tr '\n' ' ') 2>/dev/null || true)
+ if [ -n "$markers" ]; then
+ echo "::error::Merge conflict markers found in tracked files:"
</file context>
| conflict-markers: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
P2: actions/checkout@v4 is mutable, unlike the SHA-pinned actions in the existing workflows. Pin this step to the repository’s approved immutable checkout commit.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/conflict-marker-check.yml, line 11:
<comment>`actions/checkout@v4` is mutable, unlike the SHA-pinned actions in the existing workflows. Pin this step to the repository’s approved immutable checkout commit.</comment>
<file context>
@@ -0,0 +1,23 @@
+ conflict-markers:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: true
</file context>
Stabiliza mcb a partir de origin/main clean.
Análise:
Summary by cubic
Adds a CI workflow that fails pull requests targeting
mainwhen tracked files contain merge conflict markers, preventing accidental merges of unresolved conflicts..venv/,target/,dist/,.cache/,_vendor/) to avoid false positives.Written for commit daeaff2. Summary will update on new commits.