Skip to content

ci: stop the review CLI from updating itself mid-run - #372

Merged
ChiragAgg5k merged 1 commit into
mainfrom
ci/ocr-no-update
Oct 3, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
ci/ocr-no-update

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

The review job started failing on every pull request after OpenCodeReview 1.12.10 and 1.12.11 were published (2026-09-28/29); the last green run was 2026-09-29 09:14, before 1.12.11.

The pinned 1.12.9 launcher (bin/ocr.js) spawns a detached npm i -g @alibaba-group/open-code-review@latest whenever a newer release exists. That reinstall races the action's own ocr calls, so the step fails partway through. On #371 the first attempt died with OpenCodeReview binary not found and the rerun with Cannot find module '/usr/local/bin/ocr', both right after the CLI had run successfully a few calls earlier. The launcher skips the check when OCR_NO_UPDATE is set, which also keeps the CLI on the pinned ocr_version as the workflow already intends.

This workflow runs on pull_request_target, so it always uses main's copy: this PR's own review check runs the broken workflow and will fail. The fix takes effect for pull requests after it merges.

Part of appwrite/appwrite#13828 (blocks #371).

Related: appwrite/appwrite#13828

The ocr launcher spawns a detached `npm i -g @alibaba-group/open-code-review@latest`
whenever a newer release exists. Since 1.12.10 and 1.12.11 shipped, that
reinstall races the action's own ocr calls, so the review step fails with
"binary not found" or "Cannot find module /usr/local/bin/ocr". OCR_NO_UPDATE
turns the check off and keeps the CLI on the pinned 1.12.9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hansi-codes

hansi-codes Bot commented Oct 3, 2026

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The change is scoped to the review action and preserves the existing version pin and workflow behavior.

The review action now receives OCR_NO_UPDATE=1 to disable the CLI launcher's automatic updates. This keeps the CLI on the pinned 1.12.9 release and prevents a background reinstall from racing subsequent review commands.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 1
File Change
.github/workflows/review.yml Set a step-scoped update-disable environment variable and explain why it is needed.

Reviewed 2d9b7db · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit 1f28265 into main Oct 3, 2026
9 of 10 checks passed
@ChiragAgg5k ChiragAgg5k self-assigned this Oct 5, 2026
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