fix(ci): Build Timing Report cannot post its PR comment (pull-requests: write) - #632
Conversation
The report job posts its timing comment on the triggering PR via issues.createComment. For comments on pull requests that endpoint requires pull-requests: write (issues: write only covers plain issues), so every recent run fails with 'Resource not accessible by integration' (observed on PRs Verified-zkEVM#602, Verified-zkEVM#626, Verified-zkEVM#629, Verified-zkEVM#631). One-line permission bump; no other behavior change. From The Institute for Ontological Mathematics (IAOM) / Equation Capital dba Apoth3osis.
🤖 PR SummaryFix Build Timing Report workflow token permissions to allow posting PR comments Root cause Fix Safety Impact Infrastructure / CI
This PR contains no mathematical formalization, proof changes, protocol updates, documentation, or refactoring. It is purely a CI permissions fix. Statistics
Lean Declarations
📋 **Additional Analysis**The diff modifies a CI workflow permission (pull-requests: read -> pull-requests: write). This is irrelevant to the supplied instructions, which cover Lean code style, naming, PR title format, and contribution guidelines. No findings. 📄 **Per-File Summaries**
Last updated: 2026-07-10 19:29 UTC. |
|
Thanks for tracking this down. We do want to retain the build-timing PR comment, but I’m going to consolidate the permission fix with the resilience work in #592 rather than land two competing patches. The revised approach should use |
Grant the Build Timing Report job the permissions it uses: `actions: read`, `contents: read`, and `pull-requests: write`. Scope them to the `report` job and remove the redundant `issues` permission. Keep expected PR comment API failures (HTTP 403, 404, 410, 422, and 429) non-blocking while recording the status and message and preserving the rendered report in the job summary. Unexpected JavaScript errors and unexpected HTTP statuses still fail. Consolidates the permission fix from #632.
Grant the Build Timing Report job the permissions it uses: `actions: read`, `contents: read`, and `pull-requests: write`. Scope them to the `report` job and remove the redundant `issues` permission. Keep expected PR comment API failures (HTTP 403, 404, 410, 422, and 429) non-blocking while recording the status and message and preserving the rendered report in the job summary. Unexpected JavaScript errors and unexpected HTTP statuses still fail. Consolidates the permission fix from #632.
Every recent Build Timing Report run fails at the final Upsert build timing PR comment step with
Resource not accessible by integration(observed on PRs #602, #626, #629, #631 — see the workflow history onmain).Root cause: the report posts to the triggering PR via
issues.createComment. For comments on pull requests, that endpoint needspull-requests: write;issues: writeonly covers plain issues. The workflow currently grantsissues: write+pull-requests: read, so the token is rejected at the last step.Fix: one line —
pull-requests: read→pull-requests: write. No other behavior change; the job already runs in the base-repo context (workflow_run), so no fork-token hazard is introduced.We noticed this because our PR #631's timing report failed; the failure predates and is independent of that PR.
— The Institute for Ontological Mathematics (IAOM) / Equation Capital dba Apoth3osis