From 4d5cde46265dbabbccfdcdc909dd4aa28bcc3991 Mon Sep 17 00:00:00 2001 From: lucarlig Date: Mon, 7 Sep 2026 13:47:51 +0100 Subject: [PATCH] Fix conformance artifacts to use PR head commits Signed-off-by: lucarlig --- .github/workflows/ci.yml | 7 +++++-- .github/workflows/conformance.yml | 4 ++-- _context/wiki/testing.md | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 450c945..923a569 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6.0.2 + with: + # Match the PR revision selected by /conformance. + ref: ${{ github.event.pull_request.head.sha || github.sha }} - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2.9.1 - name: Build the workspace @@ -87,10 +90,10 @@ jobs: - name: Upload the conformance binary uses: actions/upload-artifact@v7.0.1 with: - name: contextforge-data-plane-conformance-${{ github.sha }} + name: contextforge-data-plane-conformance-${{ github.event.pull_request.head.sha || github.sha }} path: target/debug/contextforge-data-plane if-no-files-found: error - retention-days: 1 + retention-days: 90 bench: runs-on: ubuntu-latest diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 02edce0..6654fd9 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -35,7 +35,7 @@ jobs: REPOSITORY: ${{ github.repository }} run: >- gh api "repos/$REPOSITORY/pulls/$PR_NUMBER" - --jq '"head_sha=\(.head.sha)\nmerge_sha=\(.merge_commit_sha)"' + --jq '"head_sha=\(.head.sha)"' >> "$GITHUB_OUTPUT" - name: Publish the pending PR status @@ -56,7 +56,7 @@ jobs: with: fetch-depth: 0 persist-credentials: false - ref: ${{ steps.revision.outputs.merge_sha }} + ref: ${{ steps.revision.outputs.head_sha }} - uses: taiki-e/install-action@v2.75.27 with: diff --git a/_context/wiki/testing.md b/_context/wiki/testing.md index 1f35043..a8b8566 100644 --- a/_context/wiki/testing.md +++ b/_context/wiki/testing.md @@ -74,8 +74,10 @@ repository keeps only the CI invocation, Make targets, and expected findings. Comment exactly `/conformance` on a pull request to run the **Conformance** Actions workflow. Only repository owners, members, and collaborators can start -it. The workflow acknowledges the command, tests the pull request merge commit, -and reports the final result back to the pull request. It runs the modern client +it. The workflow acknowledges the command, tests the pull request head commit, +and reports the final result back to the pull request. CI builds and names the +conformance binary artifact using that same head SHA and retains it for 90 days, +so changes to `main` do not invalidate the artifact. It runs the modern client and modern server eras through the external dataplane in standalone mode. This starts Redis, the dataplane, nginx, and the official fixture without the control plane. The harness discovers the fixture's tools, resources, templates, and