From 42f4dd6f3313a4d28ddc9eda8cc16b992b655814 Mon Sep 17 00:00:00 2001 From: Arjun Pramanik Date: Fri, 6 Nov 2026 08:58:12 -0500 Subject: [PATCH 1/3] chore(ci): update PR-agent config --- .pr_agent.toml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.pr_agent.toml b/.pr_agent.toml index d80555b..d271549 100644 --- a/.pr_agent.toml +++ b/.pr_agent.toml @@ -2,8 +2,8 @@ # Read-only reviewer with inline comments. No auto-approval or automatic edits. [config] -ai_timeout = 120 -num_retries = 2 +ai_timeout = 300 +num_retries = 4 # All paths are always included, subject to the line budget. repo_context_from_default_branch = true @@ -12,24 +12,11 @@ repo_context_files = [ "AGENTS.md" ] -persistent_inline_comments = true output_run_details = true -publish_output = true -enable_auto_approval = false [pr_reviewer] inline_key_issues = true num_max_findings = 5 -persistent_comment = true -persistent_finding_state = true -publish_output_no_suggestions = false -enable_review_labels_security = false -enable_review_labels_effort = false -require_estimate_effort_to_review = false -require_tests_review = true -require_security_review = true -require_ticket_analysis_review = true -enable_review_coverage_footer = true enable_large_pr_chunking = true max_number_of_calls = 3 From c475347a98af7daacc466d323452456c8299edd9 Mon Sep 17 00:00:00 2001 From: Arjun Pramanik Date: Fri, 6 Nov 2026 09:13:28 -0500 Subject: [PATCH 2/3] chore(ci): fix OIDC client ID and add token logging --- .github/workflows/pr-agent.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index b320d67..5509573 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -27,7 +27,7 @@ jobs: - name: Sign in to OpenCode env: AUDIENCE: https://opencode.ai/console - CLIENT_ID: ${{ vars.OPENCODE_OIDC_CLIENT_ID }} + CLIENT_ID: ${{ secrets.OPENCODE_OIDC_CLIENT_ID }} shell: bash run: | set -euo pipefail @@ -38,6 +38,8 @@ jobs: "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=$AUDIENCE" \ | jq -er '.value') + echo "GitHub OIDC request succeeded" + token=$(curl -sSf https://opencode.ai/console/auth/oauth/token \ -d grant_type=urn:ietf:params:oauth:grant-type:token-exchange \ -d subject_token_type=urn:ietf:params:oauth:token-type:jwt \ @@ -46,6 +48,7 @@ jobs: | jq -er '.access_token') echo "::add-mask::$token" + echo "OpenCode token exchange succeeded" echo "OPENAI_KEY=$token" >> "$GITHUB_ENV" - name: Review with PR-Agent From 7cc2a4cdca63f113d9c859e82358fea05c378661 Mon Sep 17 00:00:00 2001 From: Arjun Pramanik Date: Fri, 6 Nov 2026 09:21:27 -0500 Subject: [PATCH 3/3] chore(ci): update CI to capture error message --- .github/workflows/pr-agent.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index 5509573..b66d362 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -40,12 +40,23 @@ jobs: echo "GitHub OIDC request succeeded" - token=$(curl -sSf https://opencode.ai/console/auth/oauth/token \ + response=$(mktemp) + trap 'rm -f "$response"' EXIT + + status=$(curl -sS -o "$response" -w '%{http_code}' \ + https://opencode.ai/console/auth/oauth/token \ -d grant_type=urn:ietf:params:oauth:grant-type:token-exchange \ -d subject_token_type=urn:ietf:params:oauth:token-type:jwt \ -d "client_id=$CLIENT_ID" \ - -d "subject_token=$oidc" \ - | jq -er '.access_token') + -d "subject_token=$oidc") + + if [[ "$status" != "200" ]]; then + echo "OpenCode token exchange failed: HTTP $status" + jq -r '.error // .code // "No structured error code"' "$response" + exit 1 + fi + + token=$(jq -er '.access_token' "$response") echo "::add-mask::$token" echo "OpenCode token exchange succeeded"