Skip to content

fix(opencode): use same-repo status credential - #1227

Open
seonghobae wants to merge 2 commits into
mainfrom
fix/opencode-same-repo-status-token
Open

fix(opencode): use same-repo status credential#1227
seonghobae wants to merge 2 commits into
mainfrom
fix/opencode-same-repo-status-token

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Outcome

Use the job-scoped github.token for OpenCode commit-status publication when the repository_dispatch target is the central .github repository. Cross-repository targets retain the existing PAT/App credential chain.

Root cause

Run 32560612401 declared statuses: write but selected the separate OpenCode App token for a same-repository POST /statuses/{sha}; GitHub returned HTTP 403 because that installation token did not have commit-status write permission.

Verification

  • TDD contract reproduced the old credential ordering before the workflow change
  • 1,350 passed, 1 skipped, 16 subtests passed
  • 100% statements and branches: 8,318 statements, 3,208 branches
  • Production docstrings: 740/740
  • test_strix_quick_gate: PASS
  • Compilation, bash syntax, and diff checks: PASS
  • Doctoring includes APA 7th references to current official GitHub token and App-permission documentation

No new credential, permission, retry, or fallback path is introduced.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 312dc7d9-3afb-4023-8195-45808a454a11

📥 Commits

Reviewing files that changed from the base of the PR and between 885f2cd and 5974bee.

📒 Files selected for processing (5)
  • .github/workflows/opencode-review-dispatch.yml
  • CHANGELOG.md
  • docs/doctoring/opencode-same-repository-status-credential.md
  • tests/test_opencode_agent_contract.py
  • tests/test_pr_review_autofix_nvidia_nim_contract.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae seonghobae added the bug Something isn't working label Aug 22, 2026 — with ChatGPT Codex Connector
@opencode-agent opencode-agent Bot added merge: urgent-review Central or critical pull request requiring immediate review attention priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior labels Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@opencode-agent opencode-agent Bot added priority: critical Immediate blocker, P0, urgent deadlock, or critical incident status: needs-update Pull-request branch is behind its current base and removed priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks labels Aug 22, 2026
…s credential

Resolve CHANGELOG and the opencode-review-dispatch blob pin after a
normal merge of origin/main. The job-scoped github.token same-repo
status path remains the PR change; the dispatch workflow pin now
matches the merged blob SHA.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review current-head review for 5974bee1c2f0ae4b7a2f6a5e4f8e7a1c9f3b2d4e.

Wait — re-read live SHA. This comment is for the merge commit that lands origin/main into #1227 without dropping the same-repo github.token status path. Independent current-head approval is required; the inventory SHA is not merge authorization.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review current-head review for 5974bee1dbc2f28b33f69f1aab08066bdedaab70.

Normal merge of origin/main resolved CHANGELOG and the opencode-review-dispatch.yml blob pin. The same-repo github.token status publication path is preserved. Previous comment SHA was not the live head — use this exact 40-character SHA. Not merge authorization.

seonghobae added a commit that referenced this pull request Aug 23, 2026
Refresh the SHA-bound snapshot after #1258-#1261 opened and #1257/#1227
heads advanced. The inventory remains a snapshot, not merge authorization.
@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review current-head review for 5974bee1dbc2f28b33f69f1aab08066bdedaab70.

Same-repo github.token status path after merging current main. Independent current-head approval is required; BLOCKED/MERGEABLE metadata is not merge authorization.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Independent current-head review request for exact HEAD 5974bee1dbc2f28b33f69f1aab08066bdedaab70.

Gap G-03: required Strix still fail-closes 0-vuln complete scans on MODEL QUALITY WARNING and openai-direct/ LiteLLM LLM Provider NOT provided until #1263 (b05edc069cba461ad1d641ce8809027ad909c14b) is independently approved and merged. Predecessor-head reviews are not merge evidence. Do not self-approve. COPILOT_GITHUB_TOKEN is not used.

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 5974bee1dbc2f28b33f69f1aab08066bdedaab70.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: opencode-review-dispatch.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: opencode-same-repository-status-credential.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: opencode-same-repository-status-credential.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (2 files)"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 5974bee1dbc2f28b33f69f1aab08066bdedaab70
  • Workflow run: 32647397409
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 5974bee1dbc2f28b33f69f1aab08066bdedaab70.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: opencode-review-dispatch.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: opencode-same-repository-status-credential.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: opencode-same-repository-status-credential.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (2 files)"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 5974bee1dbc2f28b33f69f1aab08066bdedaab70.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: opencode-review-dispatch.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: opencode-same-repository-status-credential.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: opencode-same-repository-status-credential.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (2 files)"]
  R4 --> V4["targeted test run"]
Loading

seonghobae added a commit that referenced this pull request Aug 23, 2026
Record GitHub CLEAN #1265 as snapshot metadata, not merge
authorization, and keep #1162/#1227/#1215 as BEHIND after #1252.
seonghobae added a commit that referenced this pull request Aug 24, 2026
* docs: refresh gap baseline after #1252 merged to main

Bind the live 95-PR inventory to protected main
9f8f840. The SHA table is a snapshot,
not merge authorization.

* docs: align G-02 with BEHIND inventory and bind 99 live PRs

Record GitHub CLEAN #1265 as snapshot metadata, not merge
authorization, and keep #1162/#1227/#1215 as BEHIND after #1252.

* docs: bind live 98-PR inventory while #1265 waits for OpenCode

Keep GitHub CLEAN #1265 as snapshot metadata, not merge
authorization, and record that required Strix CRs remain G-03.

* docs: correct live PR 1263 head evidence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working merge: urgent-review Central or critical pull request requiring immediate review attention priority: critical Immediate blocker, P0, urgent deadlock, or critical incident status: needs-update Pull-request branch is behind its current base type: bug Defect or incorrect behavior

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant