Skip to content

feat(core): safely close pull requests already integrated in main - #12

Merged
ellmos-multi-bot merged 2 commits into
mainfrom
multibot/core-close-integrated-prs-20261025
Oct 25, 2026
Merged

ellmos-multi-bot merged 2 commits into
mainfrom
multibot/core-close-integrated-prs-20261025

Conversation

@ellmos-multi-bot

Copy link
Copy Markdown
Collaborator

Adds the missing typed pr.close action for open PRs whose exact heads are already integrated into the current default branch. This allows old stacked drafts to be resolved after a reviewed integration merge.

The action stays disabled by default. It requires permissions.enabled, multi_bot.policy.close_integrated_prs, the configured account, an explicit typed_actions.close_repositories list, the reviewed head SHA, current default-branch SHA and reason integrated. It proves ancestry, repeats identity/target checks immediately before PATCH, and independently reads back the closed state and exact head. No branch deletion, comments, general-purpose cancellation, force or protection changes are included.

GitHub does not offer an atomic expected-head condition for closure. A detected post-write race or ambiguous timeout is reported as unconfirmed and must not be blindly retried.

Documents the policy and updates the Windows launcher test stub to be a regular package, so an installed Core cannot shadow it and accidentally exercise the real CLI.

Validation: 291 tests passed; 2 explicit opt-in wheel/sdist consumer-install tests skipped. Ruff and git diff --check pass. No version bump, dependency installation, local package build or workflow edit.

Add opt-in pr.close with explicit repository scope, pinned default-branch ancestry, repeated identity and head checks, preview-plan binding and independent state readback. Keep branches intact and ambiguous writes unconfirmed. Isolate Windows launcher tests from installed packages.

Agent-Session: 01a16e5b-dcd2-7521-8d7a-e78fe113b4f1
Keep Python AST unchanged while satisfying the repository formatter gate.

Agent-Session: 01a16e5b-dcd2-7521-8d7a-e78fe113b4f1
@ellmos-multi-bot
ellmos-multi-bot marked this pull request as ready for review October 25, 2026 20:32
@ellmos-multi-bot
ellmos-multi-bot merged commit 20d0906 into main Oct 25, 2026
2 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