Files
mev-beta/scripts/ci-watch.sh
Krypto Kajun 850223a953 fix(multicall): resolve critical multicall parsing corruption issues
- Added comprehensive bounds checking to prevent buffer overruns in multicall parsing
- Implemented graduated validation system (Strict/Moderate/Permissive) to reduce false positives
- Added LRU caching system for address validation with 10-minute TTL
- Enhanced ABI decoder with missing Universal Router and Arbitrum-specific DEX signatures
- Fixed duplicate function declarations and import conflicts across multiple files
- Added error recovery mechanisms with multiple fallback strategies
- Updated tests to handle new validation behavior for suspicious addresses
- Fixed parser test expectations for improved validation system
- Applied gofmt formatting fixes to ensure code style compliance
- Fixed mutex copying issues in monitoring package by introducing MetricsSnapshot
- Resolved critical security vulnerabilities in heuristic address extraction
- Progress: Updated TODO audit from 10% to 35% complete

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 00:12:55 -05:00

59 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Watch for file changes and run CI automatically
# Usage: ./scripts/ci-watch.sh [quick|precommit]
set -euo pipefail
MODE="${1:-precommit}"
case $MODE in
quick)
CI_SCRIPT="./scripts/ci-quick.sh"
echo "👀 Watching for changes - will run quick CI..."
;;
precommit)
CI_SCRIPT="./scripts/ci-precommit.sh"
echo "👀 Watching for changes - will run pre-commit validation..."
;;
*)
echo "Usage: $0 [quick|precommit]"
echo " precommit - Fast build/test only"
echo " quick - Quick CI pipeline"
exit 1
;;
esac
# Check if inotifywait is available
if ! command -v inotifywait >/dev/null 2>&1; then
echo "❌ inotifywait not found. Install with:"
echo "sudo apt install inotify-tools"
exit 1
fi
echo "Watching: pkg/ internal/ cmd/ *.go"
echo "Press Ctrl+C to stop"
echo ""
# Run initial check
$CI_SCRIPT
echo ""
echo "👀 Watching for changes..."
# Watch for changes and re-run
while inotifywait -q -r -e modify,move,create,delete \
--include='.*\.go$' \
pkg/ internal/ cmd/ . 2>/dev/null; do
echo ""
echo "🔄 Files changed, running $MODE validation..."
echo ""
if $CI_SCRIPT; then
echo ""
echo "✅ Validation passed - watching for changes..."
else
echo ""
echo "❌ Validation failed - fix issues and save files to retry"
fi
done