Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/ci/strix_quick_gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ backend/services/email_client.py
backend/services/email_parser.py
backend/services/embedding.py
backend/services/exceptions.py
backend/services/llm_provider_urls.py
backend/services/threading_service.py
EOF
fi
Expand Down
21 changes: 21 additions & 0 deletions scripts/ci/test_strix_quick_gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,20 @@ if [ -f "$target_path/backend/api/emails.py" ]; then
exit 0
fi

if [ -f "$target_path/backend/api/llm_providers.py" ]; then
if [ ! -f "$target_path/backend/services/llm_provider_urls.py" ]; then
echo "Error: LLM provider URL validation context missing from PR scope ($target_path)" >&2
exit 74
fi
if ! grep -Fq -- 'HEAD_LLM_PROVIDER_URLS_SHOULD_BE_SCANNED' "$target_path/backend/services/llm_provider_urls.py"; then
echo "Error: LLM provider URL validation context did not use PR-head content" >&2
cat -- "$target_path/backend/services/llm_provider_urls.py" >&2
exit 75
fi
echo "scan ok with PR-head LLM provider URL validation context"
exit 0
fi

echo "scan ok with non-email backend batch"
EOF
chmod +x "$fake_strix"
Expand All @@ -2102,6 +2116,8 @@ EOF
mkdir -p backend/api
printf '%s\n' 'BASE_AUTH_CONTENT_SHOULD_NOT_BE_SCANNED' >backend/api/auth.py
printf '%s\n' 'BASE_EMAILS_CONTENT_SHOULD_NOT_BE_SCANNED' >backend/api/emails.py
mkdir -p backend/services
printf '%s\n' 'BASE_LLM_PROVIDER_URLS_SHOULD_NOT_BE_SCANNED' >backend/services/llm_provider_urls.py
git add .
git commit -qm 'base commit'
)
Expand All @@ -2127,6 +2143,10 @@ HEAD_LLM_CONTENT_SHOULD_BE_SCANNED
EOF
cat >backend/api/llm_providers.py <<'EOF'
HEAD_LLM_PROVIDERS_CONTENT_SHOULD_BE_SCANNED
EOF
cat >backend/services/llm_provider_urls.py <<'EOF'
def validate_llm_provider_base_url_async():
return 'HEAD_LLM_PROVIDER_URLS_SHOULD_BE_SCANNED'
EOF
cat >backend/api/mailbox_accounts.py <<'EOF'
HEAD_MAILBOX_ACCOUNTS_CONTENT_SHOULD_BE_SCANNED
Expand Down Expand Up @@ -2169,6 +2189,7 @@ EOF

assert_equals "0" "$rc" "case=pull-request-target-changed-backend-context-uses-head-blob exit code"
assert_file_contains "$output_log" "scan ok with PR-head backend dependency context" "case=pull-request-target-changed-backend-context-uses-head-blob output"
assert_file_contains "$output_log" "scan ok with PR-head LLM provider URL validation context" "case=pull-request-target-changed-backend-context-includes-llm-provider-url-validation output"
assert_equals "3" "$(wc -l <"$call_log" | tr -d ' ')" "case=pull-request-target-changed-backend-context-uses-head-blob strix call count"

rm -rf "$tmp_dir"
Expand Down
Loading