From 0fc958493bf7742571bd725f24bb37339983c00a Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Mon, 13 Jul 2026 16:51:33 +0900 Subject: [PATCH] fix(opencode): dispatch exhausted-pool retry via CENTRAL_WORKFLOW_REF env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The opencode-exhausted-retry job from #520 passed the literal `--ref main` to gh workflow run, which violates the test_strix_quick_gate.sh contract pin "opencode scheduler dispatch must support develop-default repositories" (assert_file_not_contains "--ref main"). The ref is semantically correct — it names the trusted ref of the CENTRAL workflow repository, not the target repository's default branch — so move the literal into a CENTRAL_WORKFLOW_REF env var, mirroring how the merge scheduler carries the same value in SCHEDULER_REQUIRED_WORKFLOW_REF. Found by running the bash contract suite's opencode workflow assertions against #520 after merge; the suite's opencode pin section otherwise passes apart from pre-existing 180s/540s cadence pins that drifted from the 300s values already on main (tracked separately). Verification: pytest tests/test_opencode_agent_contract.py tests/test_opencode_workflow_shell_syntax.py (26 passed); the extracted assert_file_not_contains "--ref main" pin now passes. Co-Authored-By: Claude Fable 5 --- .github/workflows/opencode-review.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/opencode-review.yml b/.github/workflows/opencode-review.yml index 2d1b7bb7..913ca649 100644 --- a/.github/workflows/opencode-review.yml +++ b/.github/workflows/opencode-review.yml @@ -7143,6 +7143,12 @@ jobs: RETRY_DELAY_SECONDS: "300" CENTRAL_WORKFLOW_REPOSITORY: ContextualWisdomLab/.github CENTRAL_WORKFLOW_FILE: opencode-review.yml + # The trusted ref of the CENTRAL workflow repository, not the target + # repository's default branch; develop-default target repositories + # still dispatch the central workflow from its own default branch, + # the same way the merge scheduler's SCHEDULER_REQUIRED_WORKFLOW_REF + # does. + CENTRAL_WORKFLOW_REF: main PR_NUMBER: ${{ github.event.pull_request.number }} PR_BASE_REF: ${{ github.event.pull_request.base.ref }} PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} @@ -7172,7 +7178,7 @@ jobs: if ! GH_TOKEN="$RETRY_DISPATCH_TOKEN" gh workflow run "$CENTRAL_WORKFLOW_FILE" \ --repo "$CENTRAL_WORKFLOW_REPOSITORY" \ - --ref main \ + --ref "$CENTRAL_WORKFLOW_REF" \ -f "target_repository=${GITHUB_REPOSITORY}" \ -f "pr_number=${PR_NUMBER}" \ -f "pr_base_ref=${PR_BASE_REF}" \