fix(ci): make the task repo resolve the ref its tasks name

Every task in tasks.scenarios.yaml names `ref: main`, and resolving it is
the first thing task binding does. actions/checkout only creates a local
ref for the ref it checked out, so `main^{commit}` resolves on a main run
and dies with "unknown revision" on any other — which is what a
workflow_dispatch from a branch hits, before a single session starts.

The step that points the benchmark at the checkout now also makes that
checkout able to answer for the refs the tasks name. On a main run the
fetch is a no-op.
This commit is contained in:
Gergo Magyar 2026-08-02 07:07:15 +00:00
parent 21eee1e20e
commit 2fbd5ee515

View file

@ -233,6 +233,14 @@ jobs:
# task `repo` path. The benchmark only clones the repo (copy-on-write)
# and mounts dependencies read-only, so the checkout is never mutated.
ln -sfn "${GITHUB_WORKSPACE}" "${HOME}/GitNexus"
# Every task in tasks.scenarios.yaml names `ref: main`, and resolving
# it is the first thing task binding does. actions/checkout only
# creates a local ref for the ref it checked out, so `main^{commit}`
# resolves on a main run and fails on any other — a no-op here when
# main is already what was checked out.
git -C "${GITHUB_WORKSPACE}" fetch --no-tags --quiet \
"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \
'+refs/heads/main:refs/heads/main'
- name: Seed the proposer with the previous run's evidence
id: seed