Repository navigation
Conversation
Fork pull requests run with a read-only token, regardless of the permissions the workflow requests, so posting or updating the result comment always failed with a 403 and marked the whole check as failed, even though the benchmark itself succeeded. Write the benchmark table to the job summary, so the results are visible on the run page for every contributor, and skip the comment step for fork pull requests, where the read-only token cannot post comments. Branches in this repository keep posting the comment as before.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The "Lexer throughput (base vs PR)" check always fails on pull requests from forks, even when the benchmark itself succeeds. GitHub runs fork pull request workflows with a read-only token regardless of the permissions the workflow requests, so the "Post or update the PR comment" step fails with
403 Resource not accessible by integration, marking the whole check as failed. Every external contribution touching lexer files currently reports a red check with the actual benchmark numbers buried in the logs.Recent examples from external forks: #611 (three runs), and the same failure pattern reported by other contributors' lexer changes.
What changed
$GITHUB_STEP_SUMMARY), so the results are visible on the run page for every contributor — no token permissions required. This is the actual goal of the workflow: making the numbers visible.github.event.pull_request.head.repo.fork != true). Fork PR authors read the results from the job summary, and the check succeeds.Testing
This pull request modifies the workflow's own path, so it triggers the workflow on a fork pull request and demonstrates the fixed behavior: the benchmark runs, the results appear in the job summary, the comment step is skipped, and the check is green.