Skip to content

Commit 2545992

Browse files
huailiu1122claude
andcommitted
[Tool] unstable-case workflows: wire recovered-pool / drip (probation v2)
Companion to StarRocks/ci-tool probation-flow-v2 (§13.1/§13.2). Must merge together with it. - unstable-case-review.yml: report now passes --recovered-pool (discovery-only, drops --probation/--batch); the PR step commits unstable_case_recovered_pool.json and is retitled "update recovered pool" (review no longer grants probation). - unstable-case-promote-demote.yml: passes --recovered-pool + --target-probation (new optional input, default 30); git add includes the pool file so drip/pool maintenance is committed. The existing `git diff --quiet files/` gate already detects pool changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: huailiu1122 <liuhuaiyuan@starrocks.com>
1 parent 6e468ed commit 2545992

2 files changed

Lines changed: 24 additions & 19 deletions

File tree

.github/workflows/unstable-case-promote-demote.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ on:
3131
required: false
3232
default: '2'
3333
type: string
34+
target_probation:
35+
description: 'PROBATION target watermark — drip fills probation up to this many cases from the recovered pool'
36+
required: false
37+
default: '30'
38+
type: string
3439
dry_run:
3540
description: 'Only print decisions; do not write files or open a PR'
3641
required: false
@@ -73,6 +78,8 @@ jobs:
7378
--resolve-record files/unstable_case_resolve_record.json \
7479
--repo "${{ github.repository }}" --branch "${BRANCH}" \
7580
--k "${{ inputs.k || '5' }}" --min-days "${{ inputs.min_days || '2' }}" --q "${{ inputs.q || '2' }}" \
81+
--recovered-pool files/unstable_case_recovered_pool.json \
82+
--target-probation "${{ inputs.target_probation || '30' }}" \
7683
${DRY}
7784
7885
if [[ -n "${DRY}" ]]; then
@@ -100,7 +107,7 @@ jobs:
100107
# push is rejected non-fast-forward — making the workflow un-retriable.
101108
BR="auto/probation-promote-demote-$(date +%Y-%m-%d)-${ch_branch}-r${GITHUB_RUN_ID}.${GITHUB_RUN_ATTEMPT:-1}"
102109
git checkout -b "$BR"
103-
git add files/unstable_case.json files/unstable_case_probation.json files/unstable_case_details.json files/unstable_case_resolve_record.json
110+
git add files/unstable_case.json files/unstable_case_probation.json files/unstable_case_details.json files/unstable_case_resolve_record.json files/unstable_case_recovered_pool.json
104111
git commit -m "[Tool] probation promote/demote ${BRANCH} (auto)"
105112
git push origin "$BR"
106113
BODY=$(mktemp)

.github/workflows/unstable-case-review.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,7 @@ jobs:
275275
--be-oss-path "${BE_OSS}" \
276276
--sql-oss-path "${SQL_OSS}" \
277277
--output-dir "${WORK_DIR}" \
278-
--probation files/unstable_case_probation.json \
279-
--batch 30
278+
--recovered-pool files/unstable_case_recovered_pool.json
280279
281280
echo "WORK_DIR=${WORK_DIR}" >> $GITHUB_OUTPUT
282281
@@ -313,13 +312,12 @@ jobs:
313312
if-no-files-found: warn
314313
retention-days: 14
315314

316-
- name: Open PR granting probation eligibility
317-
# Opt-in via the grant_probation input (default false = off, same as
318-
# before). Needs SYNC_PAT (configured on CelerData) and the ubuntu/ai
319-
# runners (CelerData only), so in practice this only fires on CelerData.
320-
# The earlier blockers are resolved: SYNC_PAT is now set, and the
321-
# runner's /var/lib/ci-tool is a bind-mount real dir so the per-job
322-
# `cp` is a true isolated copy.
315+
- name: Open PR updating recovered pool
316+
# §13.1/§13.2: review is discovery-only — it writes recovered candidates to
317+
# unstable_case_recovered_pool.json; the promote-demote workflow drips them
318+
# into probation. This step opens a PR carrying the pool update.
319+
# Opt-in via the grant_probation input (kept for backward compat — same
320+
# cron/dispatch flag). Needs SYNC_PAT (CelerData) and ubuntu/ai runners.
323321
if: ${{ inputs.grant_probation == 'true' }}
324322
id: open_pr
325323
env:
@@ -329,9 +327,9 @@ jobs:
329327
git config user.name "wanpengfei-git"
330328
git config user.email "wanpengfei91@163.com"
331329
332-
# Grant-eligibility touches these three files; skip if none changed.
333-
if git diff --quiet files/unstable_case.json files/unstable_case_probation.json files/unstable_case_details.json; then
334-
echo "No probation-eligibility changes this run — skipping PR"
330+
# Discovery-only now touches just the recovered pool; skip if unchanged.
331+
if git diff --quiet files/unstable_case_recovered_pool.json; then
332+
echo "No recovered-pool changes this run — skipping PR"
335333
echo "pr_url=" >> $GITHUB_OUTPUT
336334
exit 0
337335
fi
@@ -340,10 +338,10 @@ jobs:
340338
# RUN_ATTEMPT increments), so include RUN_ATTEMPT or a retry after a
341339
# partial failure reuses the branch and the push is rejected
342340
# non-fast-forward.
343-
BR="auto/probation-eligibility-$(date +%Y-%m-%d)-${COMMIT_SHA:0:8}-r${GITHUB_RUN_ID}.${GITHUB_RUN_ATTEMPT:-1}"
341+
BR="auto/recovered-pool-$(date +%Y-%m-%d)-${COMMIT_SHA:0:8}-r${GITHUB_RUN_ID}.${GITHUB_RUN_ATTEMPT:-1}"
344342
git checkout -b "$BR"
345-
git add files/unstable_case.json files/unstable_case_probation.json files/unstable_case_details.json
346-
git commit -m "[Tool] grant probation eligibility ${BRANCH} ${COMMIT_SHA:0:8} (auto)"
343+
git add files/unstable_case_recovered_pool.json
344+
git commit -m "[Tool] update recovered pool ${BRANCH} ${COMMIT_SHA:0:8} (auto)"
347345
git push origin "$BR"
348346
349347
# YAML's run: | block strips the common indent, so the heredoc body and EOF
@@ -352,16 +350,16 @@ jobs:
352350
cat > "$BODY_FILE" <<EOF
353351
Auto-generated by [unstable-case-review run #${GITHUB_RUN_ID}](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}).
354352
355-
Cases that passed all 3 isolation rounds are **moved into probation** (not removed): they leave \`unstable_case.json\`, enter \`unstable_case_probation.json\` (stamped \`probation_since\`), and must now earn promotion from real PR-concurrency evidence. An isolated green is not PR-concurrency stable, so this only grants a trial — promotion/demotion is decided by the promote-demote workflow.
353+
Cases that passed all 3 isolation rounds are added to the **recovered pool** (\`unstable_case_recovered_pool.json\`). Review is now discovery-only: the pool is the durable candidate list, and the **promote-demote workflow drips** cases from it into probation up to the target watermark (no re-running this regression per batch). An isolated green is not PR-concurrency stable, so probation + promote-demote still decide the final outcome.
356354
357-
Please sanity-check the diff — cases with a high \`add_count\` (yo-yo counter) are riskier.
355+
Please sanity-check the diff.
358356
EOF
359357
360358
PR_URL=$(gh pr create \
361359
--repo StarRocks/ci-tool \
362360
--base main \
363361
--head "$BR" \
364-
--title "[Tool] grant probation eligibility $(date +%Y-%m-%d) (auto)" \
362+
--title "[Tool] update recovered pool $(date +%Y-%m-%d) (auto)" \
365363
--body-file "$BODY_FILE")
366364
rm -f "$BODY_FILE"
367365
echo "pr_url=${PR_URL}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)