Skip to content

ci: authenticate OCR router base fetch#2136

Merged
Th0rgal merged 1 commit into
mainfrom
paloma/ocr-router-fetch-fix
Jul 9, 2026
Merged

ci: authenticate OCR router base fetch#2136
Th0rgal merged 1 commit into
mainfrom
paloma/ocr-router-fetch-fix

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

  • use a transient tokenized origin URL for the OCR router base-ref fetch on self-hosted runners
  • skip OCR publishing/artifact upload when the router step fails before producing metrics/result JSON

Validation

  • node --check .github/scripts/post-ocr-review.js
  • node --check .github/scripts/ocr-router.js
  • node --check .github/scripts/test-ocr-routing.js
  • node .github/scripts/test-ocr-routing.js
  • PyYAML parse .github/workflows/ocr-review.yml
  • actionlint .github/workflows/ocr-review.yml

Production context

Production /ocr review on #2128 and #2127 after #2133 merged failed in Route OCR review because the authenticated fetch prompted for GitHub credentials on the self-hosted runner. This PR fixes that production blocker.


Note

Low Risk
CI-only workflow changes for git auth and step gating; no application runtime or security-sensitive product code.

Overview
Fixes Route OCR review failing on self-hosted runners when git fetch for the PR base ref prompted for credentials (production blocker after #2133).

The router step no longer relies on git -c http.extraheader=... for auth. It briefly rewrites origin to a x-access-token URL, fetches BASE_REF, then restores the original remote (with an EXIT trap so cleanup still runs on failure).

Post OCR review and Upload OCR metrics now require steps.route.outcome == 'success', so a failed router does not publish a review or upload metrics when result/metrics JSON was never produced.

Reviewed by Cursor Bugbot for commit 5041cee. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
verity Ready Ready Preview, Comment Jul 9, 2026 7:13pm

Request Review

@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_2dee7db9-b396-49b0-ae25-866f3381d702)

@Th0rgal

Th0rgal commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@codex review

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ OpenCodeReview failed to produce valid JSON.

No stderr captured.

@Th0rgal
Th0rgal merged commit 6acf518 into main Jul 9, 2026
18 of 19 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 5041cee775

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant