From a0aec84615e709cf4b43bd83340cd8f647f876fb Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Fri, 5 Jun 2026 19:29:39 +0800 Subject: [PATCH] fix(ci): drop ripgrep dependency from check-no-app-ffi.sh The Flutter verification lane runs on Ubuntu 22.04 without ripgrep installed, so the FFI integration guard silently fell through and printed 'No app-side Codex FFI integration artifacts found' on every run. Replace rg with the POSIX grep -RInE that ships with the runner, keep the same excludes (check-no-app-ffi.sh, Pods, ephemeral, build, .dart_tool) and emit the actual offending matches so the gate fails loudly when a forbidden reference reappears. --- scripts/check-no-app-ffi.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/scripts/check-no-app-ffi.sh b/scripts/check-no-app-ffi.sh index 721176fa..6533043d 100755 --- a/scripts/check-no-app-ffi.sh +++ b/scripts/check-no-app-ffi.sh @@ -22,16 +22,23 @@ for relative_path in "${forbidden_paths[@]}"; do fi done -if rg -n \ - "copy_ffi_framework|generate_ffi_bindings|integrate_rust_flutter|flutter_rust_bridge|libcodex_ffi|codex_ffi_generated|ffi-(copy|generate|integrate)|build-macos-ffi" \ +forbidden_ffi_pattern='copy_ffi_framework|generate_ffi_bindings|integrate_rust_flutter|flutter_rust_bridge|libcodex_ffi|codex_ffi_generated|ffi-(copy|generate|integrate)|build-macos-ffi' + +matches="$(grep -RInE \ + --binary-files=without-match \ + --exclude='check-no-app-ffi.sh' \ + --exclude-dir='Pods' \ + --exclude-dir='ephemeral' \ + --exclude-dir='build' \ + --exclude-dir='.dart_tool' \ + "$forbidden_ffi_pattern" \ "$ROOT_DIR/Makefile" \ "$ROOT_DIR/scripts" \ "$ROOT_DIR/lib" \ - "$ROOT_DIR/macos/Runner.xcodeproj" \ - --glob '!scripts/check-no-app-ffi.sh' \ - --glob '!**/Pods/**' \ - --glob '!**/Flutter/ephemeral/**' \ - --glob '!**/build/**'; then + "$ROOT_DIR/macos/Runner.xcodeproj" || true)" + +if [[ -n "$matches" ]]; then + echo "$matches" >&2 echo "Forbidden app-side FFI integration reference found." >&2 failures=$((failures + 1)) fi