Skip to content

ci(vendor-boundary): don't silently pass on grep exit 2 - #3

Merged
bqw371 merged 1 commit into
mainfrom
ci/vendor-boundary-grep-exit
Nov 28, 2026
Merged

bqw371 merged 1 commit into
mainfrom
ci/vendor-boundary-grep-exit

Conversation

@bqw371

@bqw371 bqw371 commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Summary

Both vendor-boundary call sites (the in-ci.yml job from #1, and the standalone workflow from #2) use

if grep …; then exit 1; fi

That only trips on grep exit 0. grep exits 2 on a missing directory, an unreadable file, or zsh word-splitting on some runners. Silent success on an exit-2 means the vendor-boundary enforcement decays to honor-system with no CI signal — the GPL carve-out and the process-boundary contract both lose their gate.

Fix: capture grep's exit code explicitly and switch on it.

  • 0 → violation; print matches, emit ::error::, exit 1
  • 1 → no match; pass
  • anything else → check failure; emit ::error::grep failed with exit $rc. The vendor-boundary check did NOT actually run., exit 1

Also pin shell: bash on both steps so a runner switched to dash/sh can't silently change semantics.

Grep regexes are unchanged in both files — only the exit-code handling moves.

Files touched

Pattern ported from motofreedom PR morluto#265, where the same shape was fixed upstream of the vendor-policy kit this repo adopted.

🤖 Generated with Claude Code

`if grep …; then exit 1; fi` only catches exit 0. grep exits 2 on
missing dir / unreadable file / zsh word-splitting on some runners.
Silent success on a grep error means the vendor-boundary enforcement
decays to honor-system with no CI signal.

Capture grep's exit code explicitly and treat 0=violation (exit 1),
1=no match (pass), anything else=check failure (exit 1 with a
descriptive message). Pin the step's shell to bash so a runner
switched to dash can't silently change semantics.

Fixes the same shape in both call sites added by #1
(in-ci.yml job) and #2 (standalone workflow).

Pattern from motofreedom PR morluto#265.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T08:19:03.189429Z
We couldn’t complete this review. Comment @codex review to try again.
9f9f71d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fd6f5fa1-625a-4222-af6f-c134e7a7c360
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@bqw371
bqw371 merged commit 6900d85 into main Nov 28, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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