@@ -55,24 +55,27 @@ permissions:
5555
5656jobs :
5757 clean-runtime-ab :
58- name : Paper runtime ABBA
58+ name : >-
59+ ${{ github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' && 'Dropped-item formal runtime gate' || github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-formal' && 'Paper runtime formal ABBA' || github.event_name == 'workflow_dispatch' && inputs.spark_profile_mode == 'alloc' && 'Allocation diagnostic runtime ABBA' || github.event_name == 'workflow_dispatch' && inputs.spark_profile_mode != 'none' && 'Profile diagnostic runtime ABBA' || github.event_name == 'workflow_dispatch' && inputs.ab_factor == 'dropped-item-section-candidates' && 'Dropped-item formal runtime gate' || 'Paper runtime ABBA smoke' }}
5960 if : >-
6061 github.event_name == 'workflow_dispatch' ||
6162 github.event.action != 'labeled' ||
62- github.event.label.name == 'phase2-runtime-formal'
63+ github.event.label.name == 'phase2-runtime-formal' ||
64+ github.event.label.name == 'phase2-runtime-dropped-item-formal'
6365 runs-on : ubuntu-latest
6466 timeout-minutes : 130
6567 env :
66- CAMPAIGN_AB_FACTOR : ${{ github.event_name == 'workflow_dispatch' && inputs.ab_factor || 'scenario-config' }}
68+ CAMPAIGN_AB_FACTOR : ${{ github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' && 'dropped-item-section-candidates' || github. event_name == 'workflow_dispatch' && inputs.ab_factor || 'scenario-config' }}
6769 CAMPAIGN_PAPER_VERSION : " 26.1.2"
68- CAMPAIGN_SCENARIO : ${{ github.event_name == 'workflow_dispatch' && inputs.scenario || 'static-steady' }}
69- CAMPAIGN_RUNS : ${{ github.event_name == 'workflow_dispatch' && inputs.runs || github.event.action == 'labeled' && '12' || '4' }}
70- CAMPAIGN_ITEMS : ${{ github.event_name == 'workflow_dispatch' && inputs.items || github.event.action == 'labeled' && '4096' || '1024' }}
70+ CAMPAIGN_PAPER_BUILD_ID : " 74"
71+ CAMPAIGN_SCENARIO : ${{ (github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' || github.event_name == 'workflow_dispatch' && inputs.ab_factor == 'dropped-item-section-candidates') && 'dropped-items' || github.event_name == 'workflow_dispatch' && inputs.scenario || 'static-steady' }}
72+ CAMPAIGN_RUNS : ${{ (github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' || github.event_name == 'workflow_dispatch' && inputs.ab_factor == 'dropped-item-section-candidates' && inputs.spark_profile_mode == 'none') && '12' || github.event_name == 'workflow_dispatch' && inputs.ab_factor == 'dropped-item-section-candidates' && '4' || github.event_name == 'workflow_dispatch' && inputs.runs || github.event.action == 'labeled' && '12' || '4' }}
73+ CAMPAIGN_ITEMS : ${{ (github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' || github.event_name == 'workflow_dispatch' && inputs.ab_factor == 'dropped-item-section-candidates') && '2048' || github.event_name == 'workflow_dispatch' && inputs.items || github.event.action == 'labeled' && '4096' || '1024' }}
7174 CAMPAIGN_DROPPED_NEARBY_ITEMS : " 128"
72- CAMPAIGN_WARMUP_SECONDS : ${{ github.event_name == 'workflow_dispatch' && inputs.warmup_seconds || github.event.action == 'labeled' && '120' || '10' }}
73- CAMPAIGN_SETTLE_SECONDS : ${{ github.event_name == 'workflow_dispatch' && inputs.settle_seconds || github.event.action == 'labeled' && '20' || '5' }}
74- CAMPAIGN_MEASURE_SECONDS : ${{ github.event_name == 'workflow_dispatch' && inputs.measure_seconds || github.event.action == 'labeled' && '180' || '10' }}
75- CAMPAIGN_SPARK_PROFILE_MODE : ${{ github.event_name == 'workflow_dispatch' && inputs.spark_profile_mode || 'none' }}
75+ CAMPAIGN_WARMUP_SECONDS : ${{ (github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' || github.event_name == 'workflow_dispatch' && inputs.ab_factor == 'dropped-item-section-candidates' && inputs.spark_profile_mode == 'none') && '120' || github.event_name == 'workflow_dispatch' && inputs.warmup_seconds || github.event.action == 'labeled' && '120' || '10' }}
76+ CAMPAIGN_SETTLE_SECONDS : ${{ (github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' || github.event_name == 'workflow_dispatch' && inputs.ab_factor == 'dropped-item-section-candidates' && inputs.spark_profile_mode == 'none') && '20' || github.event_name == 'workflow_dispatch' && inputs.settle_seconds || github.event.action == 'labeled' && '20' || '5' }}
77+ CAMPAIGN_MEASURE_SECONDS : ${{ (github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' || github.event_name == 'workflow_dispatch' && inputs.ab_factor == 'dropped-item-section-candidates' && inputs.spark_profile_mode == 'none') && '180' || github.event_name == 'workflow_dispatch' && inputs.measure_seconds || github.event.action == 'labeled' && '180' || '10' }}
78+ CAMPAIGN_SPARK_PROFILE_MODE : ${{ github.event.action == 'labeled' && github.event.label.name == 'phase2-runtime-dropped-item-formal' && 'none' || github. event_name == 'workflow_dispatch' && inputs.spark_profile_mode || 'none' }}
7679 CAMPAIGN_EVIDENCE_KIND : ${{ github.event_name == 'workflow_dispatch' && inputs.spark_profile_mode != 'none' && 'diagnostic' || 'clean' }}
7780
7881 steps :
@@ -112,28 +115,30 @@ jobs:
112115 env :
113116 PAPER_USER_AGENT : InteractionVisualizer-Phase2/1.0 (https://github.com/EllanServer/InteractionVisualizer)
114117 PAPER_VERSION : ${{ env.CAMPAIGN_PAPER_VERSION }}
118+ PINNED_PAPER_BUILD_ID : ${{ env.CAMPAIGN_PAPER_BUILD_ID }}
115119 run : |
116120 mkdir -p phase2-dependencies
117121 case "$PAPER_VERSION" in
118122 26.1.2) PAPER_CHANNEL=STABLE ;;
119- 26.2) PAPER_CHANNEL=BETA ;;
120123 *) echo "Unsupported Paper version: $PAPER_VERSION" >&2; exit 64 ;;
121124 esac
122125 BUILDS=$(curl --fail --silent --show-error \
123126 -H "User-Agent: $PAPER_USER_AGENT" \
124127 "https://fill.papermc.io/v3/projects/paper/versions/$PAPER_VERSION/builds")
125- PAPER_RECORD=$(echo "$BUILDS" | jq -c --arg channel "$PAPER_CHANNEL" \
126- 'first(.[] | select(.channel == $channel)) // empty')
128+ PAPER_RECORD=$(echo "$BUILDS" | jq -c \
129+ --arg channel "$PAPER_CHANNEL" --argjson build_id "$PINNED_PAPER_BUILD_ID" \
130+ 'first(.[] | select(.channel == $channel and .id == $build_id)) // empty')
127131 test -n "$PAPER_RECORD"
128132 PAPER_URL=$(echo "$PAPER_RECORD" | jq -r '.downloads."server:default".url')
129133 PAPER_SHA256=$(echo "$PAPER_RECORD" | jq -r '.downloads."server:default".checksums.sha256')
130- PAPER_BUILD_ID=$(echo "$PAPER_RECORD" | jq -r '.id')
134+ SELECTED_PAPER_BUILD_ID=$(echo "$PAPER_RECORD" | jq -r '.id')
135+ [[ "$SELECTED_PAPER_BUILD_ID" == "$PINNED_PAPER_BUILD_ID" ]]
131136 curl --fail --location --show-error \
132137 -H "User-Agent: $PAPER_USER_AGENT" \
133138 --output phase2-dependencies/paper.jar "$PAPER_URL"
134139 echo "$PAPER_SHA256 phase2-dependencies/paper.jar" | sha256sum --check
135140 echo "SELECTED_PAPER_CHANNEL=$PAPER_CHANNEL" >> "$GITHUB_ENV"
136- echo "SELECTED_PAPER_BUILD_ID=$PAPER_BUILD_ID " >> "$GITHUB_ENV"
141+ echo "SELECTED_PAPER_BUILD_ID=$SELECTED_PAPER_BUILD_ID " >> "$GITHUB_ENV"
137142
138143 - name : Prepare immutable protocol client artifact
139144 run : bash tools/perf/prepare-phase2-protocol-client.sh phase2-dependencies/protocol-client
@@ -199,11 +204,17 @@ jobs:
199204 echo "dropped-item-section-candidates A/B is isolated to dropped-items" >&2
200205 exit 64
201206 fi
202- if [[ "$SPARK_PROFILE_MODE" == none && "$RUNS" != 12 ]]; then
203- echo "clean dropped-item-section-candidates evidence is formal-only and requires runs=12" >&2
204- exit 64
205- fi
206- if [[ "$SPARK_PROFILE_MODE" != none && "$RUNS" != 4 ]]; then
207+ if [[ "$SPARK_PROFILE_MODE" == none ]]; then
208+ if [[ "$RUNS" != 12 ]]; then
209+ echo "clean dropped-item-section-candidates evidence is formal-only and requires runs=12" >&2
210+ exit 64
211+ fi
212+ if [[ "$WARMUP_SECONDS" != 120 || "$SETTLE_SECONDS" != 20 || \
213+ "$MEASURE_SECONDS" != 180 ]]; then
214+ echo "clean dropped-item-section-candidates evidence requires canonical 120/20/180 windows" >&2
215+ exit 64
216+ fi
217+ elif [[ "$RUNS" != 4 ]]; then
207218 echo "profiled dropped-item-section-candidates diagnostics require runs=4" >&2
208219 exit 64
209220 fi
0 commit comments