From ec643f4a3dcea96f1a9447a79363bfb32017f86c Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 23:55:51 -0700 Subject: [PATCH] ci(walk): reject a short sha input before checkout (TASK-728) A short sha is read by actions/checkout as a branch name, so the walk failed at checkout (run 41278291280). The first step now requires a full 40-character sha or an empty input, and fails with a clear error otherwise. Co-Authored-By: Claude Haiku 5.5 Co-authored-by: rivet Agent-Model: claude/claude-haiku-5-5/default --- .github/workflows/staging-e2e-walk.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/staging-e2e-walk.yml b/.github/workflows/staging-e2e-walk.yml index 89fb50736..fcb6f51f1 100644 --- a/.github/workflows/staging-e2e-walk.yml +++ b/.github/workflows/staging-e2e-walk.yml @@ -33,6 +33,18 @@ jobs: COMMONLY_WALK_PASSWORD: ${{ secrets.COMMONLY_WALK_PASSWORD }} GH_TOKEN: ${{ github.token }} steps: + # A short sha is read by checkout as a branch name and fails at checkout + # (run 41278291280, 2026-11-01). Reject anything that is not a full sha + # here, so the next bad dispatch fails at this step with a clear error. + - name: Validate the sha input + env: + SHA_INPUT: ${{ inputs.sha }} + run: | + if [ -n "$SHA_INPUT" ] && ! echo "$SHA_INPUT" | grep -Eq '^[0-9a-f]{40}$'; then + echo "::error::sha input must be a full 40-character commit SHA, got '$SHA_INPUT'. Leave it empty to walk main's head." + exit 1 + fi + - uses: actions/checkout@v4 with: ref: ${{ env.HEAD_SHA }}