Skip to content

fix(ci): bind review-fix scheduler runtime to immutable workflow SHA - #708

Closed
seonghobae wants to merge 2 commits into
mainfrom
fix/review-fix-source-pin
Closed

fix(ci): bind review-fix scheduler runtime to immutable workflow SHA#708
seonghobae wants to merge 2 commits into
mainfrom
fix/review-fix-source-pin

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

What

Bind pr-review-fix-scheduler.yml runtime code checkout to the immutable commit SHA of the called reusable workflow instead of mutable .github@main.

canonical_ref remains backward-compatible as an optional equality assertion: when supplied by a source-pinned caller, it must match the resolved called-workflow SHA and cannot select another ref.

Why

A caller may pin the reusable workflow entrypoint to a reviewed commit while the current implementation still checks out scheduler Python from mutable main. That creates review-to-execution drift and makes downstream claims of immutable central logic incorrect.

Security

  • Resolve the trusted source from workflow job/context metadata.
  • Require a full 40-character commit SHA.
  • Fail closed on unexpected workflow repository, malformed context, unresolved SHA, or caller mismatch.
  • Keep checkout credentials disabled.
  • Add focused contract tests preventing regression to CANONICAL_REF: main.

Verification

  • New source-selection contract tests.
  • Existing central workflow and scheduler test suites through required CI.

Unblocks the source-pinned hourly BandScope maintenance caller.

@coderabbitai

coderabbitai Bot commented Aug 3, 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: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1806c7dd-0b9b-4ae9-a253-bdcb671546ae

📥 Commits

Reviewing files that changed from the base of the PR and between 5983b41 and 0a9c0a4.

📒 Files selected for processing (2)
  • .github/workflows/pr-review-fix-scheduler.yml
  • tests/test_pr_review_fix_workflow_source_pin.py

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

@seonghobae
seonghobae enabled auto-merge (squash) August 3, 2026 04:04

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #704. GitHub's current Actions context reference explicitly supports checking out reusable-workflow co-located files with repository: ${{ job.workflow_repository }} and ref: ${{ job.workflow_sha }}; #704 uses that native, immutable identity directly while also delivering the hourly cadence and bounded retry contract. Keeping a second parser-based implementation with a legacy canonical_ref input would duplicate the same security fix and increase workflow-contract maintenance.

@seonghobae seonghobae closed this Aug 3, 2026
auto-merge was automatically disabled August 3, 2026 04:11

Pull request was closed

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