Skip to content

Commit c371cb4

Browse files
committed
refactor: Update diff processing limits and improve frontend submodule synchronization comments
1 parent 9d8e2fc commit c371cb4

3 files changed

Lines changed: 21 additions & 21 deletions

File tree

deployment/build/production-build.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ CONFIG_PATH="deployment/config"
1111

1212
cd "$(dirname "$0")/../../"
1313

14-
echo "--- 1. Ensuring frontend submodule is synchronized ---"
15-
if [ -d "$FRONTEND_DIR" ] && [ ! -f "$FRONTEND_DIR/.git" ]; then
16-
echo "Stale frontend directory detected (not a submodule). Removing and re-initializing..."
17-
rm -rf "$FRONTEND_DIR"
18-
git submodule update --init -- "$FRONTEND_DIR"
19-
elif [ ! -d "$FRONTEND_DIR" ]; then
20-
echo "Initializing frontend submodule..."
21-
git submodule update --init -- "$FRONTEND_DIR"
22-
else
23-
echo "Frontend submodule exists."
24-
fi
25-
echo "Fetching latest from origin and resetting to origin/$FRONTEND_BRANCH..."
26-
(cd "$FRONTEND_DIR" && git fetch origin "$FRONTEND_BRANCH" && git reset --hard "origin/$FRONTEND_BRANCH")
27-
echo "Frontend at: $(cd "$FRONTEND_DIR" && git log --oneline -1)"
14+
# echo "--- 1. Ensuring frontend submodule is synchronized ---"
15+
# if [ -d "$FRONTEND_DIR" ] && [ ! -f "$FRONTEND_DIR/.git" ]; then
16+
# echo "Stale frontend directory detected (not a submodule). Removing and re-initializing..."
17+
# rm -rf "$FRONTEND_DIR"
18+
# git submodule update --init -- "$FRONTEND_DIR"
19+
# elif [ ! -d "$FRONTEND_DIR" ]; then
20+
# echo "Initializing frontend submodule..."
21+
# git submodule update --init -- "$FRONTEND_DIR"
22+
# else
23+
# echo "Frontend submodule exists."
24+
# fi
25+
# echo "Fetching latest from origin and resetting to origin/$FRONTEND_BRANCH..."
26+
# (cd "$FRONTEND_DIR" && git fetch origin "$FRONTEND_BRANCH" && git reset --hard "origin/$FRONTEND_BRANCH")
27+
# echo "Frontend at: $(cd "$FRONTEND_DIR" && git log --oneline -1)"
2828

2929
echo "--- 2. Injecting Environment Configurations ---"
3030

deployment/config/inference-orchestrator/.env.sample

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ SERVICE_SECRET=change-me-to-a-random-secret
4444
# Maximum file size in bytes (default: 25KB - same as LargeContentFilter.DEFAULT_SIZE_THRESHOLD_BYTES)
4545
# DIFF_MAX_FILE_SIZE=25600
4646
# Maximum files to include in review (default: 100)
47-
# DIFF_MAX_FILES=100
48-
# Maximum total diff size in bytes (default: 500KB)
49-
# DIFF_MAX_TOTAL_SIZE=500000
47+
# DIFF_MAX_FILES=400
48+
# Maximum total diff size in bytes (default: 1MB)
49+
# DIFF_MAX_TOTAL_SIZE=1000000
5050
# Maximum lines per file (default: 1000)
51-
# DIFF_MAX_LINES_PER_FILE=1000
51+
# DIFF_MAX_LINES_PER_FILE=3000
5252

5353
# === LLM Reranking (for large PRs) ===
5454
# Enable LLM-based reranking for large PRs

python-ecosystem/inference-orchestrator/utils/diff_processor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
DEFAULT_FILE_SIZE_THRESHOLD_BYTES = 25 * 1024 # 25KB - same as LargeContentFilter.DEFAULT_SIZE_THRESHOLD_BYTES
2323

2424
MAX_FILE_SIZE_BYTES = int(os.environ.get("DIFF_MAX_FILE_SIZE", str(DEFAULT_FILE_SIZE_THRESHOLD_BYTES)))
25-
MAX_FILES_IN_DIFF = int(os.environ.get("DIFF_MAX_FILES", "100")) # Maximum files to process
26-
MAX_DIFF_SIZE_BYTES = int(os.environ.get("DIFF_MAX_TOTAL_SIZE", "500000")) # 500KB total diff size
27-
MAX_LINES_PER_FILE = int(os.environ.get("DIFF_MAX_LINES_PER_FILE", "1000")) # Maximum lines per file
25+
MAX_FILES_IN_DIFF = int(os.environ.get("DIFF_MAX_FILES", "400")) # Maximum files to process
26+
MAX_DIFF_SIZE_BYTES = int(os.environ.get("DIFF_MAX_TOTAL_SIZE", "1000000")) # 1MB total diff size
27+
MAX_LINES_PER_FILE = int(os.environ.get("DIFF_MAX_LINES_PER_FILE", "3000")) # Maximum lines per file
2828

2929
# Placeholder message matching LargeContentFilter.FILTERED_PLACEHOLDER
3030
FILTERED_PLACEHOLDER = "[CodeCrow Filter: file too large (>25KB), omitted from analysis]"

0 commit comments

Comments
 (0)