fix(ci): grant pull-requests write to comment-gateway feedback jobs - #2720
Merged
Conversation
The acknowledge-command and reply-command jobs call the issues API against comments that always live on pull requests, and GitHub gates issues-API calls whose target issue is a PR on the pull-requests scope, so issues: write alone returned HTTP 403 on both feedback POSTs (evidence: run 32630924734 — dispatch succeeded, both feedback jobs failed). Grant pull-requests: write to the two jobs, pin the new permission blocks in the workflow invariant test, and record the scope rule in the command-identity doc. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Collaborator
Author
|
/rerun-test tests/fast/backends/test_fsdp_routing_replay.py |
Temporary evidence workflow, removed before merge. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Started |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Evidence captured in runs 32637432938 (A/B on a same-repository comment) and 32637525392 (fork PR comment reactions). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ |
Collaborator
Author
|
quick merge to unblock |
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.
Summary
Make
/rerun-testreport a real test run from running state through final result in one PR comment.Motivation
/rerun-testfeedback was not trustworthy: the PR comment linked a seconds-long permission probe rather than the dispatched test, showed no in-progress state or elapsed time, and did not update with the test result. The old comment linked run 32637432938, whose jobs only exercised feedback permissions.Usage
Post
/rerun-test tests/fast/backends/test_fsdp_routing_replay.py. The command receives a success reaction, and a status comment shows the exact run asrunning. At completion, that same comment ID changes topassed,failed, orcancelledwith the suite and elapsed time.Design Notes
run-ci-file.ymlagainst the exact PR head. The run creates a status comment whose ID flows through resolver/execution into analways()finalizer; the finalizer maps job results to a terminal state, readsrun_started_at, then patches that ID.issues: writepluspull-requests: write, while the finalizer addsactions: read. Removing the gateway's staticreply-commandleaves one status owner;/rerun-failed-ci, label commands, PR-head checkout, and fork secret withholding are unchanged.slash_command_handler.py, with updates fromupdate_rerun_test_status.py. Miles uses one run-owned comment with whole-workflow elapsed time instead of per-batch lines.Verification
tests/ci/test/test_comment_ci_command.py+tests/ci/test/test_file_run.py: 298 passed; Black and Ruff passed.8a29d8366d: executedpytest tests/fast/backends/test_fsdp_routing_replay.py -v -x, collected 27 tests, and passed all 27.runningtopassed on stage-a-cpu in 3m10s.Review Focus
run-ci-file.yml: the test waits for the status comment ID, and every terminal path reaches the finalizer.comment_ci_command.py: only execution success reportspassed; invalid status inputs fail closed.