Skip to content

Commit 67ce3cf

Browse files
yuan-cloudclaude
andcommitted
fix(ci): replace all rg calls with grep in CI-reachable scripts
ripgrep is not installed on GitHub Actions runners. Replace rg -q with grep -qE and rg -o with grep -oE across 7 scripts called during the fastlane and full-confidence CI jobs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cd2c8c2 commit 67ce3cf

7 files changed

Lines changed: 19 additions & 19 deletions

scripts/demo/competitor_bakeoff.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ cargo run -p vifei-tui --bin vifei -- \
4646

4747
ANSI_CAPTURE="$OUT_DIR/tour/ansi.capture"
4848
for token in "Level:" "Agg:" "Pressure:" "Drops:" "Export:" "Version:"; do
49-
if ! rg -q "$token" "$ANSI_CAPTURE"; then
49+
if ! grep -qE "$token" "$ANSI_CAPTURE"; then
5050
echo "[bakeoff] FAIL: explainability token missing: $token" >&2
5151
exit 1
5252
fi

scripts/demo/trust_demo_cut.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ print(f"tier_a_drops={metrics['tier_a_drops']}")
4545
print(f"degradation_level_final={metrics['degradation_level_final']}")
4646
PY
4747

48-
if ! rg -q '^tier_a_drops=0$' "$OUT_DIR/metrics-summary.txt"; then
48+
if ! grep -qE '^tier_a_drops=0$' "$OUT_DIR/metrics-summary.txt"; then
4949
echo "[trust-demo] FAIL: tier_a_drops is non-zero" >&2
5050
cat "$OUT_DIR/metrics-summary.txt" >&2
5151
exit 1

scripts/demo/visual_showcase_cut.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ done
3333

3434
required_truth_tokens=("Level:" "Agg:" "Pressure:" "Drops:" "Export:" "Version:")
3535
for token in "${required_truth_tokens[@]}"; do
36-
if ! rg -q "$token" docs/assets/readme/truth-hud-showcase.txt; then
36+
if ! grep -qE "$token" docs/assets/readme/truth-hud-showcase.txt; then
3737
echo "[visual-cut] FAIL: truth HUD token missing: $token" >&2
3838
exit 1
3939
fi
4040
done
4141

42-
if ! rg -q "Action Now \\(Anomalies\\)" docs/assets/readme/incident-lens-narrow-72.txt; then
42+
if ! grep -qE "Action Now \\(Anomalies\\)" docs/assets/readme/incident-lens-narrow-72.txt; then
4343
echo "[visual-cut] FAIL: narrow incident proof missing anomaly action section" >&2
4444
exit 1
4545
fi
4646

47-
if ! rg -q "Forensic controls:" docs/assets/readme/incident-lens-narrow-72.txt; then
47+
if ! grep -qE "Forensic controls:" docs/assets/readme/incident-lens-narrow-72.txt; then
4848
echo "[visual-cut] FAIL: narrow incident proof missing forensic control hints" >&2
4949
exit 1
5050
fi

scripts/testing/check_coverage_contract.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ for required in "$MATRIX" "$FASTLANE_DOC" "$DEFER_REGISTER"; do
1818
[[ -f "$required" ]] || fail "CC0-files" "required contract file missing: $required" "test -f $required"
1919
done
2020

21-
rg -q '^## v0\.1 Completeness Contract \("full enough"\)$' "$MATRIX" || \
22-
fail "CC1-headings" "coverage matrix missing completeness contract heading" "rg -n '^## v0\\.1 Completeness Contract \\(\"full enough\"\\)$' $MATRIX"
23-
rg -q '^## Invariant And Decision Coverage Ownership$' "$MATRIX" || \
24-
fail "CC1-headings" "coverage matrix missing invariant ownership heading" "rg -n '^## Invariant And Decision Coverage Ownership$' $MATRIX"
25-
rg -q '^## What Fastlane Covers$' "$FASTLANE_DOC" || \
26-
fail "CC1-headings" "FASTLANE doc missing coverage section heading" "rg -n '^## What Fastlane Covers$' $FASTLANE_DOC"
21+
grep -qE '^## v0\.1 Completeness Contract \("full enough"\)$' "$MATRIX" || \
22+
fail "CC1-headings" "coverage matrix missing completeness contract heading" "grep -nE '^## v0\\.1 Completeness Contract \\(\"full enough\"\\)$' $MATRIX"
23+
grep -qE '^## Invariant And Decision Coverage Ownership$' "$MATRIX" || \
24+
fail "CC1-headings" "coverage matrix missing invariant ownership heading" "grep -nE '^## Invariant And Decision Coverage Ownership$' $MATRIX"
25+
grep -qE '^## What Fastlane Covers$' "$FASTLANE_DOC" || \
26+
fail "CC1-headings" "FASTLANE doc missing coverage section heading" "grep -nE '^## What Fastlane Covers$' $FASTLANE_DOC"
2727

2828
mapfile -t referenced_paths < <(
29-
rg -o '`[^`]+`' "$MATRIX" \
29+
grep -oE '`[^`]+`' "$MATRIX" \
3030
| tr -d '`' \
31-
| rg '^(docs/|scripts/|crates/|\.github/)' \
31+
| grep -E '^(docs/|scripts/|crates/|\.github/)' \
3232
| sort -u
3333
)
3434

scripts/testing/check_pty_flake_contract.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ EOF
3333
}
3434

3535
if [[ -f "$FASTLANE_RUN_JSONL" && -f "$FASTLANE_SUMMARY" ]]; then
36-
if rg -q '"run_id":"fastlane-v0\.1"' "$FASTLANE_RUN_JSONL"; then
36+
if grep -qE '"run_id":"fastlane-v0\.1"' "$FASTLANE_RUN_JSONL"; then
3737
echo "CONTRACT_FAIL[PTY0-lane-scope] wrong lane directory: '$OUT_DIR' is a fastlane output bundle."
3838
echo "hint: this checker validates full-confidence PTY assertion logs only."
3939
echo "replay: scripts/testing/check_pty_flake_contract.sh .tmp/full-confidence"

scripts/testing/check_trust_demo_cut_contract.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ for file in "${required[@]}"; do
2424
fi
2525
done
2626

27-
if ! rg -q '^trust_demo_status=PASS$' "$out_dir/TRUST_DEMO_SUMMARY.txt"; then
27+
if ! grep -qE '^trust_demo_status=PASS$' "$out_dir/TRUST_DEMO_SUMMARY.txt"; then
2828
echo "[trust-demo-contract] summary missing PASS marker" >&2
2929
exit 1
3030
fi
3131

32-
if ! rg -q '^tier_a_drops=0$' "$out_dir/TRUST_DEMO_SUMMARY.txt"; then
32+
if ! grep -qE '^tier_a_drops=0$' "$out_dir/TRUST_DEMO_SUMMARY.txt"; then
3333
echo "[trust-demo-contract] summary missing zero-drop proof" >&2
3434
exit 1
3535
fi
3636

37-
if ! rg -q '^blocked_items=[1-9][0-9]*$' "$out_dir/TRUST_DEMO_SUMMARY.txt"; then
37+
if ! grep -qE '^blocked_items=[1-9][0-9]*$' "$out_dir/TRUST_DEMO_SUMMARY.txt"; then
3838
echo "[trust-demo-contract] refusal summary missing blocked items" >&2
3939
exit 1
4040
fi

scripts/testing/check_visual_showcase_cut_contract.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ for file in "${required[@]}"; do
2020
fi
2121
done
2222

23-
if ! rg -q '^visual_showcase_status=PASS$' "$out_dir/VISUAL_SHOWCASE_SUMMARY.txt"; then
23+
if ! grep -qE '^visual_showcase_status=PASS$' "$out_dir/VISUAL_SHOWCASE_SUMMARY.txt"; then
2424
echo "[visual-cut-contract] summary missing PASS marker" >&2
2525
exit 1
2626
fi
2727

2828
for asset in incident-lens-showcase.svg forensic-lens-showcase.svg truth-hud-showcase.svg incident-lens-narrow-72.svg; do
29-
if ! rg -q "^${asset}_blake2s=[0-9a-f]{64}$" "$out_dir/VISUAL_SHOWCASE_SUMMARY.txt"; then
29+
if ! grep -qE "^${asset}_blake2s=[0-9a-f]{64}$" "$out_dir/VISUAL_SHOWCASE_SUMMARY.txt"; then
3030
echo "[visual-cut-contract] summary missing hash for $asset" >&2
3131
exit 1
3232
fi

0 commit comments

Comments
 (0)