Skip to content

[ci] Fix triage workflow: pin opencode, use opus-4-8, comment via gh#14650

Open
penalosa wants to merge 1 commit into
mainfrom
penalosa/triage-issue-fixes
Open

[ci] Fix triage workflow: pin opencode, use opus-4-8, comment via gh#14650
penalosa wants to merge 1 commit into
mainfrom
penalosa/triage-issue-fixes

Conversation

@penalosa

Copy link
Copy Markdown
Contributor

Follow-up fix to #14647. The triage workflow as merged fails on every run for two independent reasons; this PR fixes both. Verified end-to-end via workflow_dispatch against issue #10531 (all steps green, comment posted as workers-devprod, breaking-change label applied).

1. Unprovisioned default models → "Invalid Anthropic API Key"

opencode run was called with no explicit model on an unpinned opencode, so it used opencode's built-in defaults (claude-sonnet-4-6 / claude-haiku-4-5), which are not provisioned in our AI Gateway. Fix:

  • Pin opencode to 1.15.13 (matches the working Bonk workflow).
  • Pass --model cloudflare-ai-gateway/anthropic/claude-opus-4-8 to the triage run.
  • Set small_model to claude-sonnet-4-5 so the title/summary agent stops defaulting to the unprovisioned claude-haiku-4-5.

The AI Gateway credentials were never the problem — they're the same secrets Bonk uses.

2. marocchino can't comment on issues → "Could not resolve to a PullRequest"

marocchino/sticky-pull-request-comment is PR-only (it resolves the number as a PullRequest), so it errors on issues. Replaced with a gh-based sticky upsert (find the previous report comment by a hidden marker and edit it, else create a new one). gh is already used elsewhere in this workflow, so this adds no new dependency. The re-triage loop guard now matches the new marker.


  • Tests
    • Automated tests not possible - manual testing has been completed as follows: ran gh workflow run triage-issue.yml -f issue-number=10531 on this branch — the workflow completed successfully (Analyze, Upload, Post comment, Apply labels all green), posted a single triage comment as workers-devprod, and applied the breaking-change label.
  • Public documentation
    • Documentation not necessary because: internal repo automation only; no user-facing product behaviour changes.

The triage workflow merged in #14647 fails for two reasons:

1. It ran `opencode run` with no explicit model on an unpinned opencode,
   so it used opencode's built-in default models (claude-sonnet-4-6 /
   claude-haiku-4-5) which are not provisioned in our AI Gateway, failing
   with "Invalid Anthropic API Key". Pin opencode to 1.15.13, pass
   --model claude-opus-4-8, and set small_model to claude-sonnet-4-5 so
   the title/summary agent no longer defaults to claude-haiku-4-5.

2. It posted the comment with marocchino/sticky-pull-request-comment,
   which only supports PRs and errors with "Could not resolve to a
   PullRequest" on issues. Replace it with a gh-based sticky upsert: find
   the previous report comment by a hidden marker and edit it, otherwise
   create a new one. Update the re-triage loop guard to match the marker.
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c0a40d0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ask-bonk

ask-bonk Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

UnknownError: ProviderInitError

github run

@ask-bonk

ask-bonk Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@penalosa Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@penalosa penalosa marked this pull request as ready for review July 10, 2026 14:36
@pkg-pr-new

pkg-pr-new Bot commented Jul 10, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@14650

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14650

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14650

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14650

miniflare

npm i https://pkg.pr.new/miniflare@14650

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14650

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14650

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14650

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@14650

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14650

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14650

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14650

wrangler

npm i https://pkg.pr.new/wrangler@14650

commit: c0a40d0

@penalosa penalosa added the ci:no-changeset-required Skip pull request checks for a valid changeset label Jul 10, 2026
@workers-devprod workers-devprod requested review from a team and james-elicx and removed request for a team July 10, 2026 14:36
@workers-devprod

workers-devprod commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:no-changeset-required Skip pull request checks for a valid changeset

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

3 participants