From 4ed3dbdfb73bc881a04de13b2b198ada734e2ef8 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-DevOps Date: Mon, 11 May 2026 09:56:22 +0000 Subject: [PATCH] debug(ci/harness-replays): add timeout + verbose to fetch step Adds explicit 55s timeout and verbose output to the git fetch step so the failure is diagnosed in CI logs rather than silent 15s timeout. 55s is well within the 60-min job timeout; enough for cold TCP handshake + one git pack transfer on a local network. Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/harness-replays.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/harness-replays.yml b/.gitea/workflows/harness-replays.yml index b3552287..086dca33 100644 --- a/.gitea/workflows/harness-replays.yml +++ b/.gitea/workflows/harness-replays.yml @@ -72,15 +72,19 @@ jobs: run: | # With the default fetch-depth: 1, actions/checkout only fetches the # PR head commit. The base commit is NOT in the local history, so - # `git diff "$BASE" "$GITHUB_SHA"` fails. Fetch the base branch tip - # (which is github.event.pull_request.base.sha) at depth 1 — one - # cheap round-trip, enough for the diff to work. + # `git diff "$BASE" "$GITHUB_SHA"` fails. Fetch the base branch at + # depth 1 — the base commit is the immediate parent of the PR head + # on the base branch, so depth=1 is sufficient. # - # github.event.pull_request.base.ref = "main" (confirmed via API). - # git fetch origin main --depth=1 fetches the main branch tip + its - # immediate parent (the base commit we need). This is faster and more - # reliable than fetch-depth:0 (which times out on the 75 MB repo). - git fetch origin "${{ github.event.pull_request.base.ref }}" --depth=1 + # Timeout: 55s. The fetch should complete in <10s on a local network; + # 55s gives headroom for cold TCP handshake + one git pack transfer. + # Gitea Actions overall job timeout is 60 min, so 55s is safe. + timeout 55 git fetch --verbose origin "${{ github.event.pull_request.base.ref }}" --depth=1 || { + echo "::error::git fetch origin ${{ github.event.pull_request.base.ref }} --depth=1 timed out after 55s" + echo "::error::The base branch tip may not be available in the local history." + echo "::error::This causes git diff to fail and detect-changes to report failure." + exit 1 + } - id: decide run: | # workflow_dispatch: always run (manual trigger)