From a44542d7d3331c5e5d74389e2a239761833d2cd7 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 2 Feb 2026 13:50:49 +1100 Subject: [PATCH] Add CI job to check for deleted files --- .github/forbidden-files.txt | 6 ++++++ .github/workflows/test-suite.yml | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/forbidden-files.txt diff --git a/.github/forbidden-files.txt b/.github/forbidden-files.txt new file mode 100644 index 00000000000..4e9a48f4ac9 --- /dev/null +++ b/.github/forbidden-files.txt @@ -0,0 +1,6 @@ +# Files that have been intentionally deleted and should not be re-added. +# This prevents accidentally reviving files during botched merges. +# Add one file path per line (relative to repo root). + +beacon_node/beacon_chain/src/otb_verification_service.rs +beacon_node/store/src/partial_beacon_state.rs diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 46fa15da86a..ba32803ed5b 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -72,6 +72,27 @@ jobs: steps: - name: Check that the pull request is not targeting the stable branch run: test ${{ github.base_ref }} != "stable" + + forbidden-files-check: + name: forbidden-files-check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check for forbidden files + run: | + if [ -f .github/forbidden-files.txt ]; then + status=0 + while IFS= read -r file || [ -n "$file" ]; do + # Skip comments and empty lines + [[ "$file" =~ ^#.*$ || -z "$file" ]] && continue + if [ -f "$file" ]; then + echo "::error::Forbidden file exists: $file" + status=1 + fi + done < .github/forbidden-files.txt + exit $status + fi + release-tests-ubuntu: name: release-tests-ubuntu needs: [check-labels] @@ -428,6 +449,7 @@ jobs: needs: [ 'check-labels', 'target-branch-check', + 'forbidden-files-check', 'release-tests-ubuntu', 'beacon-chain-tests', 'op-pool-tests',