From bb8c969709fa348e7bc85065d72a5a408c2a7de3 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 5 Dec 2026 04:08:02 -0800 Subject: [PATCH] block-ci: check host paths in a labelled post-merge-review PR The changed-path list holds module paths and block controls only, so a labelled PR that also changed host files passed on its module part. Add every other changed path with its root name; the allow list refuses it. The spec-trace scope stays module-only. Co-Authored-By: Claude Opus 5.5 --- .github/block/scripts/block-ci-port-test.py | 1 + .github/workflows/block-post-merge-review.yml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/block/scripts/block-ci-port-test.py b/.github/block/scripts/block-ci-port-test.py index b79fee5c8d..4f4633634d 100644 --- a/.github/block/scripts/block-ci-port-test.py +++ b/.github/block/scripts/block-ci-port-test.py @@ -45,6 +45,7 @@ class PortTests(unittest.TestCase): self.assertIn("process-level tests (real binaries)", test) post = (ROOT / ".github/workflows/block-post-merge-review.yml").read_text() self.assertIn("working-directory: ${{ github.workspace }}", post) + self.assertIn("""git -C .. diff -z --name-status --no-renames "$BASE...$HEAD" -- . ':(exclude)seaweed-block/'""", post) def test_known_bugs_use_the_module_verdict_helper(self): text = (ROOT / ".github/workflows/block-known-bugs.yml").read_text() diff --git a/.github/workflows/block-post-merge-review.yml b/.github/workflows/block-post-merge-review.yml index 88635d575d..a1123d21fb 100644 --- a/.github/workflows/block-post-merge-review.yml +++ b/.github/workflows/block-post-merge-review.yml @@ -82,7 +82,12 @@ jobs: set -euo pipefail bash .github/scripts/post-merge-review-check-test.sh git -c fetch.fsckObjects=true fetch --no-tags origin "+refs/pull/${PR}/head:refs/remotes/pr/head" - bash ../.github/block/scripts/post-merge-review-changed.sh "$BASE" "$HEAD" >changed.bin + { + bash ../.github/block/scripts/post-merge-review-changed.sh "$BASE" "$HEAD" + # Host files keep their root path, so the allow list refuses them. + git -C .. diff -z --name-status --no-renames "$BASE...$HEAD" -- . ':(exclude)seaweed-block/' \ + ':(exclude).github/workflows/block-*.yml' ':(exclude).github/dockerfiles/block-*.Dockerfile' ':(exclude).github/block/**' + } >changed.bin bash .github/scripts/post-merge-review-check.sh .github/post-merge-review-allow.txt