From c755e6eff01a9c407d4d468e5ecc22db5b7d35a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Papp=20=28TWiStErRob=29?= Date: Tue, 12 May 2026 11:34:24 +0100 Subject: [PATCH] AI(claude-opus-4.6): Debug workflow_call event context propagation Add reusable workflow that dumps both the native GITHUB_EVENT_PATH and a caller-passed toJSON(github.event) as artifacts for comparison. This verifies whether workflow_call inherits the caller's event payload or only receives a minimal workflow_call-specific payload. --- .../workflows/debug-event-context-caller.yml | 18 ++++++++ .github/workflows/debug-event-context.yml | 46 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/debug-event-context-caller.yml create mode 100644 .github/workflows/debug-event-context.yml diff --git a/.github/workflows/debug-event-context-caller.yml b/.github/workflows/debug-event-context-caller.yml new file mode 100644 index 0000000..75017d7 --- /dev/null +++ b/.github/workflows/debug-event-context-caller.yml @@ -0,0 +1,18 @@ +name: "Debug Event Context Caller" + +on: + pull_request: + push: + branches: + - main + +jobs: + + debug-event-context: + name: "Debug Event Context" + uses: ./.github/workflows/debug-event-context.yml + with: + event-name: ${{ github.event_name }} + event-json: ${{ toJSON(github.event) }} + permissions: + contents: read diff --git a/.github/workflows/debug-event-context.yml b/.github/workflows/debug-event-context.yml new file mode 100644 index 0000000..b866757 --- /dev/null +++ b/.github/workflows/debug-event-context.yml @@ -0,0 +1,46 @@ +name: "Debug Event Context" + +on: + workflow_call: + inputs: + event-name: + description: "The github.event_name from the caller workflow." + type: string + required: true + event-json: + description: "The full github.event payload as JSON from the caller workflow (toJSON(github.event))." + type: string + required: true + +jobs: + + dump: + name: "Dump Event Context" + runs-on: ubuntu-latest + defaults: + run: + shell: bash + permissions: + contents: read + timeout-minutes: 5 + steps: + + - name: "Dump event payloads" + env: + CALLER_EVENT_NAME: ${{ inputs.event-name }} + CALLER_EVENT_JSON: ${{ inputs.event-json }} + # language=bash + run: | + mkdir -p debug-events + echo "GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME}" + echo "CALLER_EVENT_NAME=${CALLER_EVENT_NAME}" + echo "GITHUB_EVENT_PATH=${GITHUB_EVENT_PATH}" + cp "${GITHUB_EVENT_PATH}" debug-events/github-event-path.json + printf '%s' "${CALLER_EVENT_JSON}" > debug-events/caller-event-json.json + printf '%s\n%s\n' "native: ${GITHUB_EVENT_NAME}" "caller: ${CALLER_EVENT_NAME}" > debug-events/event-names.txt + + - name: "Upload artifact" + uses: actions/upload-artifact@v4 + with: + name: event-context-debug + path: debug-events/