diff --git a/.github/workflows/performance-ab.yml b/.github/workflows/performance-ab.yml index de4986388..61a8eed41 100644 --- a/.github/workflows/performance-ab.yml +++ b/.github/workflows/performance-ab.yml @@ -121,14 +121,14 @@ jobs: candidate_sha="$(git rev-parse HEAD)" if [[ "${{ github.event_name }}" == "schedule" ]]; then baseline_sha="${SCHEDULED_BASELINE_SHA:-$candidate_sha}" - if ! git merge-base --is-ancestor "$baseline_sha" "$candidate_sha"; then - echo "::error::scheduled baseline $baseline_sha is not an ancestor of candidate $candidate_sha" >&2 - exit 1 - fi else baseline_sha="$(git rev-parse origin/main)" fi git cat-file -e "${baseline_sha}^{commit}" + if ! git merge-base --is-ancestor "$baseline_sha" "$candidate_sha"; then + echo "::error::baseline $baseline_sha is not an ancestor of candidate $candidate_sha; update the selected ref before comparing" >&2 + exit 1 + fi echo "baseline_sha=$baseline_sha" >> "$GITHUB_OUTPUT" echo "candidate_sha=$candidate_sha" >> "$GITHUB_OUTPUT" echo "baseline commit: $baseline_sha" @@ -342,6 +342,10 @@ jobs: if: always() run: | status="${{ steps.ab.outputs.status }}" + if [[ -z "$status" ]]; then + echo "::error::warp A/B setup failed before the rig ran. Check the first failed workflow step." >&2 + exit 1 + fi if [[ "$status" != "0" ]]; then echo "::error::warp A/B budget gate failed (exit $status). See the step summary / gate.md artifact." >&2 exit "$status" diff --git a/scripts/hotpath_warp_ab_gate.sh b/scripts/hotpath_warp_ab_gate.sh index d184661d6..ec2e839f9 100755 --- a/scripts/hotpath_warp_ab_gate.sh +++ b/scripts/hotpath_warp_ab_gate.sh @@ -30,12 +30,16 @@ REQUIRE_TAIL_ERROR="false" MARKDOWN_OUT="" EXEMPTION_REASON="deliberate correctness tradeoff" declare -a COMPARE_CSVS=() +declare -a COMPARE_LABELS=() usage() { cat <<'USAGE' Usage: hotpath_warp_ab_gate.sh --compare-csv [--compare-csv ...] [options] --compare-csv baseline_compare.csv to evaluate (repeatable). + --labeled-compare-csv