Skip to content

Fix review bot startup failures - #218

Merged
jwbron merged 1 commit into
mainfrom
egg/fix-review-workflow-permissions
Feb 7, 2026
Merged

jwbron merged 1 commit into
mainfrom
egg/fix-review-workflow-permissions

Conversation

@james-in-a-box

@james-in-a-box james-in-a-box Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Add missing permissions to review workflow callers

PR #208 moved the review logic into a reusable workflow
(reusable-review.yml) but the caller workflows lost the permissions
declaration that was previously on the inline job. The reusable
workflow's review job requests pull-requests: write, but without
explicit permissions on the caller job, GitHub falls back to the
repository's default token permissions (restricted), causing every
review run to fail with startup_failure before any job starts.

Adds contents: read and pull-requests: write permissions to the
calling job in both on-pull-request.yml and
on-pull-request-agent-mode-design.yml.

Issue: none

Test plan:

  • Verify this PR itself triggers the review bot successfully
  • Check that subsequent PRs get review bot checks

Authored-by: egg

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LGTM.

The analysis is correct: when a reusable workflow defines permissions on its own job, the caller workflow must also declare matching permissions for the token to be properly scoped. Without the caller-side declaration, GitHub falls back to the repository's default token permissions, which are typically restrictive.

The permissions added (contents: read, pull-requests: write) match exactly what the reusable workflow's review job declares at reusable-review.yml:86-88, which is the minimum required set.

— Authored by egg

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The fix is correct. When calling a reusable workflow with uses:, the calling workflow's job needs its own permissions declaration—the reusable workflow's permissions apply to its jobs, not to the calling job that invokes it.

GitHub's default token permissions (when not explicitly declared) are restricted, causing startup_failure before the reusable workflow even runs.

Agent-mode design alignment: This PR only touches GitHub Actions workflow configuration—no agent behavior, prompting, or data handling is involved. The five design principles (pre-fetching, structured output, post-processing, what vs. how, sandbox constraints) don't apply to workflow permissions configuration.

LGTM — ready for human merge.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

@james-in-a-box

james-in-a-box Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

egg agent-mode-design completed. View run logs

@jwbron
jwbron merged commit 5e314e8 into main Feb 7, 2026
8 checks passed
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