From 307af41a7f7aa4e311a153a54c7b9b231ac665b7 Mon Sep 17 00:00:00 2001 From: Vlad Mocanu Date: Fri, 27 Feb 2026 13:52:28 +0200 Subject: [PATCH] fix: allow test-action agent mode to run on claude bot PRs The actor guard (github.actor != 'claude') was skipping test-agent-mode on upstream-sync PRs. Refined the condition to only skip on non-PR events (where tag mode loop risk exists) while allowing PR events through. Co-Authored-By: Claude Opus 4.6 --- .forgejo/kcl-ci/main.k | 6 +++--- .forgejo/workflows/test-action.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.forgejo/kcl-ci/main.k b/.forgejo/kcl-ci/main.k index 6817622..3fe892b 100644 --- a/.forgejo/kcl-ci/main.k +++ b/.forgejo/kcl-ci/main.k @@ -160,9 +160,9 @@ _test_action_workflow = { "test-agent-mode" = { name = "Test Agent Mode on Forgejo" "runs-on" = "grunt" - # Skip when the PR was created by the claude bot (e.g. upstream-sync PRs). - # The self-trigger guard in actor.ts blocks actor=claude matching bot_name=claude[bot]. - "if" = "github.actor != 'claude'" + # Skip claude bot on issue_comment/issues events (tag mode loop risk). + # Allow on pull_request events (e.g. upstream-sync PRs) — no loop risk there. + "if" = "github.actor != 'claude' || github.event_name == 'pull_request'" steps = [ checkout_mod.checkout() { diff --git a/.forgejo/workflows/test-action.yml b/.forgejo/workflows/test-action.yml index 495fccd..513cde6 100644 --- a/.forgejo/workflows/test-action.yml +++ b/.forgejo/workflows/test-action.yml @@ -23,7 +23,7 @@ jobs: test-agent-mode: name: Test Agent Mode on Forgejo runs-on: grunt - if: github.actor != 'claude' + if: github.actor != 'claude' || github.event_name == 'pull_request' steps: - name: Checkout uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2