#24483·mastra

factory: App cannot submit APPROVED review on PRs it authored, so approved PRs sit at CHANGES_REQUESTED

Author: trent-40heroCreated Sep 19, 2026Updated Sep 30, 2026
Labelsbugp: higheffort:lowimpact:mediumstatus: auto-triagedstatus: needs approval

Describe the Bug

The Factory GitHub App authors the pull request, so GitHub rejects an APPROVE review from the same App identity (authors cannot approve their own PRs). The Factory's own re-review comment says so explicitly: "GitHub rejected the approval review because the authenticated app authored the PR". It then falls back to a comment plus the status:auto-approved label.

Result: once any CHANGES_REQUESTED review exists on the PR (for example the human relay described in the companion issue), reviewDecision stays CHANGES_REQUESTED forever from the Factory's side. The Factory shows the work item as Done on its Work and Review boards while GitHub shows the PR blocked. Operators see PRs "stuck after approval" and must submit a non-author APPROVED review by hand.

Observed on every reviewed PR during a pilot (5 PRs, 0.15.1-alpha.0 and 0.16.0-alpha.6).

Steps To Reproduce

  1. Install the Factory GitHub App; let it open a PR and review it.
  2. Submit a formal CHANGES_REQUESTED review as a human (or have any such review exist).
  3. Let the Factory repair and re-review to approve.
  4. Observe: comment + status:auto-approved label; reviewDecision still CHANGES_REQUESTED; Factory boards show Done.

Link to Minimal Reproducible Example

Private repo; exact comment text and timestamps available on request.

Expected Behavior

One of:

  • Reviews submitted under a distinct reviewer identity (separate App installation or a configurable reviewer token) so APPROVE is accepted, or
  • The Factory dismisses its own stale REQUEST_CHANGES review and/or documents clearly that a non-author approval is required, and reflects "awaiting human approval" on the board instead of Done.

Environment Information

  • @mastra/factory: 0.15.1-alpha.0 and 0.16.0-alpha.6
  • @mastra/core: 1.68.0-alpha.0 / 1.68.0-alpha.6
  • Node: 22.23.1, Linux (self-hosted, systemd)
  • LLM Provider: multiple
  • GitHub: GitHub App integration, org-scoped Work Intake

Verification

  • I have searched the existing issues to make sure this is not a duplicate
  • I have included sufficient information for the team to reproduce and understand the issue