[GH-ISSUE #7985] [Feature]: Dottore: push autofix repairs to fork branches that allow maintainer edits #7505

Closed
opened 2026-10-24 04:03:41 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7985

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

Dottore's autofix (the "Let Dottore fix the open findings" box in the walkthrough, or /dottore autofix) refuses every pull request whose branch lives on a fork:

🩺 Dottore can only push repairs to this repository's own branches; use the repair prompt at the end of the review instead.

Most contributions here come from forks, including organisation members' own forks, so the repair never runs where it is wanted. Example: #7971 (branch chore/7970-concurrent-regressions on Promansis/Marinara-Engine, "Allow edits by maintainers" on) got this refusal twice on 2026-10-21 (15:46 and 16:06 UTC) after the box was ticked.

GitHub already lets anyone with push access to this repository push to a fork's pull request branch when the author allowed edits by maintainers, so the refusal is stricter than it needs to be.

Proposed solution

  • autofix_prompt() in .github/dottore-review/dottore_review.py also reads maintainerCanModify and the head repository. It refuses only a fork pull request that does not allow maintainer edits, and that refusal names the fork and says the author can enable "Allow edits by maintainers" (forks owned by an organisation cannot) or use the repair prompt at the end of the review.
  • meta.json records the head repository (owner/name); the review job exports it as an output.
  • The push job in .github/workflows/dottore-review.yml checks out that repository at the head branch with the Dottore App token, so it pushes to the fork for a fork pull request and to this repository otherwise. The moved-branch check, commit message and rejected-push report stay as they are.
  • .github/dottore-review/README.md describes the new rule.

Open question to prove live before merging: whether the Dottore App's installation token (scoped to this repository) may push to a user fork's branch under maintainer edits. GitHub documents it for users with push access; a workflow_dispatch of the branch's own workflow against #7971 settles it.

Alternatives considered

  • Keep the refusal and rely on the repair prompt: leaves the box useless on most pull requests.
  • Push the repair to a branch in this repository and open a follow-up pull request: more moving parts, a second PR to review, and the original PR still lacks the fix.

Additional context

Owner: @Promansis is implementing this (issue, branch and PR). A follow-up pull request in Pasta-Devs/Marinara-Agents moves its dottore-review.yml pin to the Engine merge commit that contains this change.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7985 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? Dottore's autofix (the "Let Dottore fix the open findings" box in the walkthrough, or `/dottore autofix`) refuses every pull request whose branch lives on a fork: > 🩺 Dottore can only push repairs to this repository's own branches; use the repair prompt at the end of the review instead. Most contributions here come from forks, including organisation members' own forks, so the repair never runs where it is wanted. Example: #7971 (branch `chore/7970-concurrent-regressions` on `Promansis/Marinara-Engine`, "Allow edits by maintainers" on) got this refusal twice on 2026-10-21 (15:46 and 16:06 UTC) after the box was ticked. GitHub already lets anyone with push access to this repository push to a fork's pull request branch when the author allowed edits by maintainers, so the refusal is stricter than it needs to be. ## Proposed solution - `autofix_prompt()` in `.github/dottore-review/dottore_review.py` also reads `maintainerCanModify` and the head repository. It refuses only a fork pull request that does not allow maintainer edits, and that refusal names the fork and says the author can enable "Allow edits by maintainers" (forks owned by an organisation cannot) or use the repair prompt at the end of the review. - `meta.json` records the head repository (`owner/name`); the `review` job exports it as an output. - The `push` job in `.github/workflows/dottore-review.yml` checks out that repository at the head branch with the Dottore App token, so it pushes to the fork for a fork pull request and to this repository otherwise. The moved-branch check, commit message and rejected-push report stay as they are. - `.github/dottore-review/README.md` describes the new rule. Open question to prove live before merging: whether the Dottore App's installation token (scoped to this repository) may push to a user fork's branch under maintainer edits. GitHub documents it for users with push access; a workflow_dispatch of the branch's own workflow against #7971 settles it. ## Alternatives considered - Keep the refusal and rely on the repair prompt: leaves the box useless on most pull requests. - Push the repair to a branch in this repository and open a follow-up pull request: more moving parts, a second PR to review, and the original PR still lacks the fix. ## Additional context Owner: @Promansis is implementing this (issue, branch and PR). A follow-up pull request in Pasta-Devs/Marinara-Agents moves its `dottore-review.yml` pin to the Engine merge commit that contains this change. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7505
No description provided.