From 70db91fa1aaca9293eaa7a1679b85188a4af64af Mon Sep 17 00:00:00 2001 From: codex-bot-andresmgsl <304681515+codex-bot-andresmgsl@users.noreply.github.com> Date: Thu, 23 Jul 2026 10:47:30 +0000 Subject: [PATCH] fix: wire dogfood issue reconciliation --- .github/workflows/labels.yml | 3 +++ .github/workflows/self-labels.yml | 2 ++ test/issueflow-reconcile.test.sh | 13 +++++++++++++ 3 files changed, 18 insertions(+) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 1ad9bad..0c69c8a 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -92,6 +92,9 @@ jobs: uses: ./actions/labels-reconcile with: bootstrap: ${{ github.event_name == 'workflow_dispatch' && 'yes' || 'no' }} + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} - name: reconcile issue flow if: github.repository != 'heavy-duty/ceremony' uses: ./.ceremony-src/actions/issueflow-reconcile diff --git a/.github/workflows/self-labels.yml b/.github/workflows/self-labels.yml index b6d17e8..9c94d39 100644 --- a/.github/workflows/self-labels.yml +++ b/.github/workflows/self-labels.yml @@ -7,6 +7,8 @@ name: labels on: schedule: [{cron: "*/15 * * * *"}] # advisory; the handoff label is the real wake workflow_dispatch: # bootstraps missing labels on a fresh repo + issues: + types: [opened, edited, assigned, unassigned, labeled, unlabeled, closed, reopened] pull_request_target: types: [opened, reopened, ready_for_review, converted_to_draft, synchronize, labeled, unlabeled] permissions: diff --git a/test/issueflow-reconcile.test.sh b/test/issueflow-reconcile.test.sh index 442bd0e..e94b0b5 100644 --- a/test/issueflow-reconcile.test.sh +++ b/test/issueflow-reconcile.test.sh @@ -23,6 +23,19 @@ check "missing triage actors fails loudly" 1 "missing triage-actors=" load_issue printf '%s\n' 'triage-actors=one' 'triage-actors=two' >"$TMP/duplicate.conf" check "duplicate triage actors fails loudly" 1 "duplicate triage-actors" load_issueflow_config "$TMP/duplicate.conf" +# The dogfood caller and reusable workflow must expose the same runtime facts +# as the documented consumer stub. Static pins catch YAML blocks drifting to +# the adjacent composite step, which otherwise fails only after merge. +check "dogfood caller wakes on issue events" 0 " issues:" \ + grep -F " issues:" "$ROOT/.github/workflows/self-labels.yml" +dogfood_pr_step="$(sed -n \ + '/name: reconcile state + stale (dogfood/,/name: reconcile issue flow/p' \ + "$ROOT/.github/workflows/labels.yml")" +check "dogfood PR reconcile receives repository" 0 ' REPO: ${{ github.repository }}' \ + grep -F ' REPO: ${{ github.repository }}' <<<"$dogfood_pr_step" +check "dogfood PR reconcile receives token" 0 ' GH_TOKEN: ${{ github.token }}' \ + grep -F ' GH_TOKEN: ${{ github.token }}' <<<"$dogfood_pr_step" + # Invariant 1: exactly one queue category. check "one ready queue label is valid" 0 "KEEP" queue_decision <<<"ready" check "zero queue labels is derivably needs-triage" 0 "ADD_NEEDS_TRIAGE" queue_decision <<<"enhancement"