diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml index 6306bda167a..38b351333dd 100644 --- a/.github/workflows/claude-review.yml +++ b/.github/workflows/claude-review.yml @@ -289,28 +289,31 @@ jobs: git fetch origin "$PREVIOUS_HEAD" || echo "Previous head ${PREVIOUS_HEAD} is not fetchable, reviewing the full diff." fi - # The model's knowledge of the kernel, glibc, and musl can be wrong or out of - # date. The review agents therefore check kernel and libc details in the - # cloned source trees. A review without a source tree is still useful, so a + # The model's knowledge of the kernel, glibc, musl, and UAPI specifications can + # be wrong or out of date. The review agents therefore check details in the + # cloned repositories. A review without a repository is still useful, so a # failed clone does not fail the job. git clones into a temporary directory # first. If the timeout kills git, the final directory does not exist, and # the agents are not told about it. - - name: Clone the Linux kernel, glibc, and musl + - name: Clone the Linux kernel, glibc, musl, and UAPI specifications continue-on-error: true timeout-minutes: 10 run: | clone() { local name=$1 url=$2 dir="$RUNNER_TEMP/claude-review/$1" - git clone --quiet --depth 1 --single-branch "$url" "$dir.tmp" && + shift 2 + git clone --quiet "$@" "$url" "$dir.tmp" && mv "$dir.tmp" "$dir" && git -C "$dir" log -1 --format="Cloned $name at %H (%s)" } pids=() - clone linux https://github.com/torvalds/linux.git & + clone linux https://github.com/torvalds/linux.git --depth 1 --single-branch & pids+=($!) - clone glibc https://sourceware.org/git/glibc.git & + clone glibc https://sourceware.org/git/glibc.git --depth 1 --single-branch & pids+=($!) - clone musl https://git.musl-libc.org/git/musl & + clone musl https://git.musl-libc.org/git/musl --depth 1 --single-branch & + pids+=($!) + clone uapi https://github.com/uapi-group/specifications.git & pids+=($!) status=0 for pid in "${pids[@]}"; do @@ -544,6 +547,16 @@ jobs: lists the changes in each musl release." fi + uapi="$RUNNER_TEMP/claude-review/uapi" + if [[ -d "$uapi" ]]; then + context+=" + + A clone of the latest UAPI Group specifications with full history is at ${uapi}. + When a finding depends on a UAPI specification, such as the Boot Loader Specification, + Discoverable Partitions Specification, Unified Kernel Images, or extension images, check + the specification in ${uapi}/specs instead of relying on memory." + fi + previous="" if [[ -n "$PREVIOUS_HEAD" ]] && git -C "$SOURCE" cat-file -e "$PREVIOUS_HEAD" 2>/dev/null; then git -C "$SOURCE" diff "$PREVIOUS_HEAD" "$HEAD_SHA" >"$INPUT/incremental.patch"