This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new a1ebe9f8db73 ci: fix Scalpel shadow comparison asymmetry vs
EXCLUSION_LIST (#26705)
a1ebe9f8db73 is described below
commit a1ebe9f8db73b8cfec7508f7ad389fbc788aa1c0
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed Sep 23 14:22:34 2026 +0200
ci: fix Scalpel shadow comparison asymmetry vs EXCLUSION_LIST (#26705)
The shadow comment compared Scalpel's raw affectedModules list (unfiltered)
against current_reactor_ids (already filtered through EXCLUSION_LIST). This
caused EXCLUSION_LIST modules (camel-allcomponents, camel-catalog,
apache-camel,
docs, coverage, dummy-component, camel-jbang-*, etc.) to appear as ⚠️ "only
in
Scalpel" and to be listed in "Modules Scalpel would test" even though they
are
intentionally excluded from CI testing.
In the PR 26701 (braintree bump) shadow comment this produced 47 "only in
Scalpel"
modules with a warning badge, of which 28 were already in EXCLUSION_LIST,
and the
"would test" list showed 43 modules despite the summary saying 19.
Fix: apply EXCLUSION_LIST filtering symmetrically to the Scalpel side:
- Build excl_set_cmp once at writeScalpelComparison() entry
- Filter scalpel_sorted through excl_set_cmp before the comm set-diff
- Recompute scalpel_total from the filtered list
- Skip excluded modules when iterating scalpel_would_test for the comment
body
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
---
.../actions/incremental-build/incremental-build.sh | 24 ++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/.github/actions/incremental-build/incremental-build.sh
b/.github/actions/incremental-build/incremental-build.sh
index 1b9978519841..c7ef9fd857e5 100755
--- a/.github/actions/incremental-build/incremental-build.sh
+++ b/.github/actions/incremental-build/incremental-build.sh
@@ -429,11 +429,15 @@ checkManualItTests() {
# Write Scalpel shadow comparison section to the PR comment.
# Shows what Scalpel would detect vs what the current approach actually tests,
# with a one-line diff summary. Observation only — does not affect test
execution.
+# Both sides of the comparison are filtered through EXCLUSION_LIST for a
symmetric diff.
# Args: $1=comment_file, $2=tested_reactor_ids (newline-separated, already
filtered by EXCLUSION_LIST)
writeScalpelComparison() {
local comment_file="$1"
local current_reactor_ids="${2:-}"
local report="${3:-target/scalpel-report.json}"
+ # Build exclusion set from EXCLUSION_LIST (strip "!:" prefix) for symmetric
comparison
+ local excl_set_cmp
+ excl_set_cmp=$(echo "$EXCLUSION_LIST" | sed 's/!://g' | tr ',' '\n')
# If Scalpel failed, show why in the PR comment
if [ -n "$scalpel_failure_reason" ]; then
@@ -459,7 +463,9 @@ writeScalpelComparison() {
local scalpel_total=0
local scalpel_skip_count=0
if [ -n "$scalpel_module_ids" ]; then
- scalpel_total=$(echo "$scalpel_module_ids" | tr ',' '\n' | grep -c . ||
true)
+ # Count after EXCLUSION_LIST filter (scalpel_sorted is built below,
compute after)
+ # Defer: recomputed after scalpel_sorted is built
+ true
fi
if [ -n "$scalpel_would_skip" ]; then
scalpel_skip_count=$(echo "$scalpel_would_skip" | tr ',' '\n' | grep -c .
|| true)
@@ -475,7 +481,17 @@ writeScalpelComparison() {
fi
local scalpel_sorted=""
if [ -n "$scalpel_module_ids" ]; then
- scalpel_sorted=$(echo "$scalpel_module_ids" | tr ',' '\n' | sed 's/^://' |
sort)
+ # Filter through EXCLUSION_LIST so the set-diff is symmetric with
current_sorted,
+ # which is already filtered (lines ~992-1001 in the main function).
+ scalpel_sorted=$(echo "$scalpel_module_ids" | tr ',' '\n' | sed 's/^://' |
while read -r rid; do
+ if ! echo "$excl_set_cmp" | grep -qx "$rid"; then
+ echo "$rid"
+ fi
+ done | sort)
+ fi
+ # Recompute scalpel_total from the filtered sorted list
+ if [ -n "$scalpel_sorted" ]; then
+ scalpel_total=$(echo "$scalpel_sorted" | grep -c . || true)
fi
# Set differences: modules Scalpel found that current missed, and vice versa
@@ -561,6 +577,10 @@ writeScalpelComparison() {
echo "" >> "$comment_file"
echo "$scalpel_would_test" | tr ',' '\n' | while read -r m; do
if [ -n "$m" ]; then
+ # Skip modules that are in EXCLUSION_LIST — they are intentionally not
tested
+ if echo "$excl_set_cmp" | grep -qx "$m"; then
+ continue
+ fi
# Pull evidence[] for this module from the report (explain=true
populates it)
local evidence=""
evidence=$(jq -r --arg art "$m" '