From 7187fad97ac57b309171baf907e9398b7438a1ec Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Thu, 6 Aug 2026 20:51:17 +0200 Subject: [PATCH 1/6] ci: validate remaining Part A fixes --- .github/workflows/source-snapshot.yml | 106 ++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 .github/workflows/source-snapshot.yml diff --git a/.github/workflows/source-snapshot.yml b/.github/workflows/source-snapshot.yml new file mode 100644 index 00000000..461d7cc9 --- /dev/null +++ b/.github/workflows/source-snapshot.yml @@ -0,0 +1,106 @@ +name: Validate Remaining Part A + +on: + pull_request: + branches: + - api-redesign + +jobs: + lint: + name: Checkstyle + runs-on: ubuntu-24.04 + permissions: + contents: read + packages: read + env: + PACKAGES_USER: ${{ secrets.HAUNTEDMC_PACKAGES_USERNAME }} + PACKAGES_TOKEN: ${{ secrets.HAUNTEDMC_PACKAGES_TOKEN }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 + with: + distribution: temurin + java-version: "25" + cache: maven + server-id: github + server-username: PACKAGES_USER + server-password: PACKAGES_TOKEN + - run: test -n "$PACKAGES_USER" && test -n "$PACKAGES_TOKEN" + - run: ./mvnw -U -B -ntp -DskipTests checkstyle:check + - run: shellcheck update_version.sh proxyfeatures-platform-acceptance/run-platform-acceptance.sh + + verify: + name: Tests and Coverage + runs-on: ubuntu-24.04 + permissions: + contents: read + packages: read + env: + PACKAGES_USER: ${{ secrets.HAUNTEDMC_PACKAGES_USERNAME }} + PACKAGES_TOKEN: ${{ secrets.HAUNTEDMC_PACKAGES_TOKEN }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 + with: + distribution: temurin + java-version: "25" + cache: maven + server-id: github + server-username: PACKAGES_USER + server-password: PACKAGES_TOKEN + - run: test -n "$PACKAGES_USER" && test -n "$PACKAGES_TOKEN" + - id: verify + run: ./mvnw -U -B -ntp verify + - if: failure() && steps.verify.outcome == 'failure' + run: | + find . -type f \( -path '*/target/surefire-reports/*.txt' -o -path '*/target/failsafe-reports/*.txt' \) -print0 \ + | sort -z \ + | xargs -0 -r -n1 sh -c 'echo "::group::$0"; cat "$0"; echo "::endgroup::"' + - if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: remaining-part-a-test-reports + path: | + **/target/surefire-reports + **/target/failsafe-reports + if-no-files-found: warn + + acceptance: + name: Velocity Platform Acceptance + runs-on: ubuntu-24.04 + timeout-minutes: 15 + permissions: + contents: read + packages: read + env: + PACKAGES_USER: ${{ secrets.HAUNTEDMC_PACKAGES_USERNAME }} + PACKAGES_TOKEN: ${{ secrets.HAUNTEDMC_PACKAGES_TOKEN }} + PLATFORM_ACCEPTANCE_KEEP_WORK_DIRECTORY: "true" + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 + with: + distribution: temurin + java-version: "25" + cache: maven + server-id: github + server-username: PACKAGES_USER + server-password: PACKAGES_TOKEN + - run: test -n "$PACKAGES_USER" && test -n "$PACKAGES_TOKEN" + - env: + PLATFORM_ACCEPTANCE_WORK_DIRECTORY: ${{ runner.temp }}/proxyfeatures-platform-acceptance + run: ./mvnw -U -B -ntp -Pplatform-acceptance verify + - if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: remaining-part-a-acceptance-logs + path: | + ${{ runner.temp }}/proxyfeatures-platform-acceptance/velocity/velocity.log + ${{ runner.temp }}/proxyfeatures-platform-acceptance/backend.log + if-no-files-found: warn From f25b1e132f8f2e701c73054d7637e72b0fb3165c Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Thu, 6 Aug 2026 20:52:20 +0200 Subject: [PATCH 2/6] ci: trigger exact-head Part A validation --- .automation/validation-marker | 1 + 1 file changed, 1 insertion(+) create mode 100644 .automation/validation-marker diff --git a/.automation/validation-marker b/.automation/validation-marker new file mode 100644 index 00000000..82d30a33 --- /dev/null +++ b/.automation/validation-marker @@ -0,0 +1 @@ +source-head=9edbaca12f1ff120705b5f87a5a463c79865e5e5 From 3e7f03367da2b3fdf49434719e51b88925f17873 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Thu, 6 Aug 2026 20:54:42 +0200 Subject: [PATCH 3/6] ci: run remaining Part A validation on branch --- .github/workflows/source-snapshot.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/source-snapshot.yml b/.github/workflows/source-snapshot.yml index 461d7cc9..802ece5e 100644 --- a/.github/workflows/source-snapshot.yml +++ b/.github/workflows/source-snapshot.yml @@ -1,6 +1,9 @@ name: Validate Remaining Part A on: + push: + branches: + - agent/source-snapshot-api-redesign pull_request: branches: - api-redesign From 3371f0a180716ec0ee79bf2c19a173ea24ce17c1 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Thu, 6 Aug 2026 20:55:05 +0200 Subject: [PATCH 4/6] ci: execute exact-head Part A validation --- .automation/validation-marker | 1 + 1 file changed, 1 insertion(+) diff --git a/.automation/validation-marker b/.automation/validation-marker index 82d30a33..92016cbd 100644 --- a/.automation/validation-marker +++ b/.automation/validation-marker @@ -1 +1,2 @@ source-head=9edbaca12f1ff120705b5f87a5a463c79865e5e5 +validation-attempt=direct-push From 29315ad6c5d2e8187f7096ea3b51d7f9bcfbdb69 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Thu, 6 Aug 2026 20:58:30 +0200 Subject: [PATCH 5/6] ci: publish exact-head validation results --- .github/workflows/source-snapshot.yml | 164 ++++++++++++-------------- 1 file changed, 78 insertions(+), 86 deletions(-) diff --git a/.github/workflows/source-snapshot.yml b/.github/workflows/source-snapshot.yml index 802ece5e..cf4e7e5a 100644 --- a/.github/workflows/source-snapshot.yml +++ b/.github/workflows/source-snapshot.yml @@ -4,90 +4,29 @@ on: push: branches: - agent/source-snapshot-api-redesign - pull_request: - branches: - - api-redesign - -jobs: - lint: - name: Checkstyle - runs-on: ubuntu-24.04 - permissions: - contents: read - packages: read - env: - PACKAGES_USER: ${{ secrets.HAUNTEDMC_PACKAGES_USERNAME }} - PACKAGES_TOKEN: ${{ secrets.HAUNTEDMC_PACKAGES_TOKEN }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 - with: - distribution: temurin - java-version: "25" - cache: maven - server-id: github - server-username: PACKAGES_USER - server-password: PACKAGES_TOKEN - - run: test -n "$PACKAGES_USER" && test -n "$PACKAGES_TOKEN" - - run: ./mvnw -U -B -ntp -DskipTests checkstyle:check - - run: shellcheck update_version.sh proxyfeatures-platform-acceptance/run-platform-acceptance.sh + paths-ignore: + - .automation/validation-result.txt - verify: - name: Tests and Coverage - runs-on: ubuntu-24.04 - permissions: - contents: read - packages: read - env: - PACKAGES_USER: ${{ secrets.HAUNTEDMC_PACKAGES_USERNAME }} - PACKAGES_TOKEN: ${{ secrets.HAUNTEDMC_PACKAGES_TOKEN }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 - with: - distribution: temurin - java-version: "25" - cache: maven - server-id: github - server-username: PACKAGES_USER - server-password: PACKAGES_TOKEN - - run: test -n "$PACKAGES_USER" && test -n "$PACKAGES_TOKEN" - - id: verify - run: ./mvnw -U -B -ntp verify - - if: failure() && steps.verify.outcome == 'failure' - run: | - find . -type f \( -path '*/target/surefire-reports/*.txt' -o -path '*/target/failsafe-reports/*.txt' \) -print0 \ - | sort -z \ - | xargs -0 -r -n1 sh -c 'echo "::group::$0"; cat "$0"; echo "::endgroup::"' - - if: always() - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: remaining-part-a-test-reports - path: | - **/target/surefire-reports - **/target/failsafe-reports - if-no-files-found: warn +permissions: + contents: write + packages: read - acceptance: - name: Velocity Platform Acceptance +jobs: + validate: + name: Exact-head validation runs-on: ubuntu-24.04 - timeout-minutes: 15 - permissions: - contents: read - packages: read + timeout-minutes: 45 env: PACKAGES_USER: ${{ secrets.HAUNTEDMC_PACKAGES_USERNAME }} PACKAGES_TOKEN: ${{ secrets.HAUNTEDMC_PACKAGES_TOKEN }} PLATFORM_ACCEPTANCE_KEEP_WORK_DIRECTORY: "true" steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - persist-credentials: false - - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 + fetch-depth: 0 + - name: Set up JDK 25 + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 with: distribution: temurin java-version: "25" @@ -95,15 +34,68 @@ jobs: server-id: github server-username: PACKAGES_USER server-password: PACKAGES_TOKEN - - run: test -n "$PACKAGES_USER" && test -n "$PACKAGES_TOKEN" - - env: + - name: Validate and publish result + shell: bash + env: PLATFORM_ACCEPTANCE_WORK_DIRECTORY: ${{ runner.temp }}/proxyfeatures-platform-acceptance - run: ./mvnw -U -B -ntp -Pplatform-acceptance verify - - if: always() - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: remaining-part-a-acceptance-logs - path: | - ${{ runner.temp }}/proxyfeatures-platform-acceptance/velocity/velocity.log - ${{ runner.temp }}/proxyfeatures-platform-acceptance/backend.log - if-no-files-found: warn + run: | + set +e + test -n "$PACKAGES_USER" && test -n "$PACKAGES_TOKEN" + credentials_status=$? + + ./mvnw -U -B -ntp -DskipTests checkstyle:check > "${RUNNER_TEMP}/lint.log" 2>&1 + lint_status=$? + shellcheck update_version.sh proxyfeatures-platform-acceptance/run-platform-acceptance.sh \ + >> "${RUNNER_TEMP}/lint.log" 2>&1 + shell_status=$? + + ./mvnw -U -B -ntp verify > "${RUNNER_TEMP}/verify.log" 2>&1 + verify_status=$? + + ./mvnw -U -B -ntp -Pplatform-acceptance verify > "${RUNNER_TEMP}/acceptance.log" 2>&1 + acceptance_status=$? + + mkdir -p .automation + { + echo "source_head=9edbaca12f1ff120705b5f87a5a463c79865e5e5" + echo "validation_commit=$(git rev-parse HEAD)" + echo "credentials_status=$credentials_status" + echo "lint_status=$lint_status" + echo "shellcheck_status=$shell_status" + echo "verify_status=$verify_status" + echo "acceptance_status=$acceptance_status" + echo + echo "===== LINT TAIL =====" + tail -n 300 "${RUNNER_TEMP}/lint.log" + echo + echo "===== VERIFY TAIL =====" + tail -n 500 "${RUNNER_TEMP}/verify.log" + echo + echo "===== FAILING TEST REPORTS =====" + find . -type f \( -path '*/target/surefire-reports/*.txt' -o -path '*/target/failsafe-reports/*.txt' \) -print0 \ + | sort -z \ + | xargs -0 -r grep -l -E 'Failures: [1-9]|Errors: [1-9]|<<< FAILURE|<<< ERROR' \ + | while read -r report; do + echo "--- $report" + tail -n 250 "$report" + done + echo + echo "===== ACCEPTANCE TAIL =====" + tail -n 500 "${RUNNER_TEMP}/acceptance.log" + if [[ -f "${PLATFORM_ACCEPTANCE_WORK_DIRECTORY}/velocity/velocity.log" ]]; then + echo + echo "===== VELOCITY LOG TAIL =====" + tail -n 400 "${PLATFORM_ACCEPTANCE_WORK_DIRECTORY}/velocity/velocity.log" + fi + } > .automation/validation-result.txt + + git config user.name "hauntedmc-validation-agent" + git config user.email "hauntedmc-validation-agent@users.noreply.github.com" + git add .automation/validation-result.txt + git commit -m "ci: record exact-head validation result" + git push origin HEAD:agent/source-snapshot-api-redesign + + if (( credentials_status != 0 || lint_status != 0 || shell_status != 0 \ + || verify_status != 0 || acceptance_status != 0 )); then + exit 1 + fi From 4c89085246d629912de3e2595262e1430215c272 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Thu, 6 Aug 2026 20:58:54 +0200 Subject: [PATCH 6/6] ci: trigger published exact-head validation --- .automation/validation-marker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.automation/validation-marker b/.automation/validation-marker index 92016cbd..a5627fcf 100644 --- a/.automation/validation-marker +++ b/.automation/validation-marker @@ -1,2 +1,2 @@ source-head=9edbaca12f1ff120705b5f87a5a463c79865e5e5 -validation-attempt=direct-push +validation-attempt=published-result